diff --git a/json/BalancePlatformAcsNotification-v1.json b/json/BalancePlatformAcsNotification-v1.json index 83d2764d..7b06a96c 100644 --- a/json/BalancePlatformAcsNotification-v1.json +++ b/json/BalancePlatformAcsNotification-v1.json @@ -15,7 +15,10 @@ "General" ], "tags" : [ - ], + { + "name" : "General" + } + ], "webhooks" : { "balancePlatform.authentication.created" : { "post" : { diff --git a/json/BalancePlatformPaymentNotification-v1.json b/json/BalancePlatformPaymentNotification-v1.json index 31bc08c5..e617e3e5 100644 --- a/json/BalancePlatformPaymentNotification-v1.json +++ b/json/BalancePlatformPaymentNotification-v1.json @@ -16,7 +16,13 @@ "Fund movements" ], "tags" : [ - ], + { + "name" : "Payment authorisation, refund, or funds transfer initiated" + }, + { + "name" : "Fund movements" + } + ], "x-staticResponse" : "response.json", "webhooks" : { "balancePlatform.incomingTransfer.created" : { diff --git a/json/BalancePlatformTransferNotification-v3.json b/json/BalancePlatformTransferNotification-v3.json index 9dda2aaf..b462e66f 100644 --- a/json/BalancePlatformTransferNotification-v3.json +++ b/json/BalancePlatformTransferNotification-v3.json @@ -15,7 +15,10 @@ "General" ], "tags" : [ - ], + { + "name" : "General" + } + ], "x-staticResponse" : "response.json", "webhooks" : { "balancePlatform.transfer.created" : { @@ -505,8 +508,8 @@ "additionalProperties" : false, "properties" : { "accountNumber" : { - "description" : "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.", - "maxLength" : 12, + "description" : "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.", + "maxLength" : 15, "minLength" : 9, "type" : "string" }, @@ -1252,7 +1255,6 @@ "description" : "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.\n\nPossible values:\n\n* **regular**: For normal, low-value transactions.\n\n* **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.\n\n* **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.\n\n* **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).\n\n* **crossBorder**: High-value transfer to a recipient in a different country.\n\n* **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.", "enum" : [ "crossBorder", - "directDebit", "fast", "instant", "internal", diff --git a/json/TransferService-v1.json b/json/TransferService-v1.json index c8cb3a42..af561079 100644 --- a/json/TransferService-v1.json +++ b/json/TransferService-v1.json @@ -22,11 +22,14 @@ "Capital" ], "tags" : [ + { + "name" : "Transfers" + }, { "name" : "Transactions" }, { - "name" : "Transfers" + "name" : "Capital" } ], "paths" : { @@ -207,7 +210,7 @@ ], "parameters" : [ { - "description" : "Unique identifier of the transaction.", + "description" : "The unique identifier of the transaction.", "name" : "id", "in" : "path", "required" : true, @@ -221,7 +224,7 @@ "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" } } }, @@ -522,31 +525,6 @@ ], "type" : "object" }, - "JSONObject" : { - "properties" : { - "paths" : { - "items" : { - "$ref" : "#/components/schemas/JSONPath" - }, - "type" : "array" - }, - "rootPath" : { - "$ref" : "#/components/schemas/JSONPath" - } - }, - "type" : "object" - }, - "JSONPath" : { - "properties" : { - "content" : { - "items" : { - "type" : "string" - }, - "type" : "array" - } - }, - "type" : "object" - }, "Link" : { "properties" : { "href" : { @@ -683,7 +661,7 @@ }, "response" : { "description" : "JSON response payload.", - "$ref" : "#/components/schemas/JSONObject" + "type" : "object" }, "status" : { "description" : "The HTTP status code.", @@ -734,7 +712,7 @@ }, "type" : "object" }, - "TransactionData" : { + "Transaction" : { "properties" : { "accountHolderId" : { "x-addedInVersion" : "1", @@ -909,7 +887,7 @@ "data" : { "description" : "Contains the transactions that match the query parameters.", "items" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" }, "type" : "array" } diff --git a/json/TransferService-v2.json b/json/TransferService-v2.json index 4bb78402..c9aef8f6 100644 --- a/json/TransferService-v2.json +++ b/json/TransferService-v2.json @@ -22,11 +22,14 @@ "Capital" ], "tags" : [ + { + "name" : "Transfers" + }, { "name" : "Transactions" }, { - "name" : "Transfers" + "name" : "Capital" } ], "paths" : { @@ -212,7 +215,7 @@ ], "parameters" : [ { - "description" : "Unique identifier of the transaction.", + "description" : "The unique identifier of the transaction.", "name" : "id", "in" : "path", "required" : true, @@ -231,7 +234,7 @@ } }, "schema" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" } } }, @@ -482,7 +485,6 @@ "description" : "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. If you don't provide this in the request, Adyen sets the optimal priority.\n\nPossible values:\n\n* **regular**: For normal, low-value transactions.\n\n* **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.\n\n* **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.\n\n* **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).\n\n* **crossBorder**: High-value transfer to a recipient in a different country.\n\n* **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).", "enum" : [ "crossBorder", - "directDebit", "fast", "instant", "internal", @@ -571,31 +573,6 @@ ], "type" : "object" }, - "JSONObject" : { - "properties" : { - "paths" : { - "items" : { - "$ref" : "#/components/schemas/JSONPath" - }, - "type" : "array" - }, - "rootPath" : { - "$ref" : "#/components/schemas/JSONPath" - } - }, - "type" : "object" - }, - "JSONPath" : { - "properties" : { - "content" : { - "items" : { - "type" : "string" - }, - "type" : "array" - } - }, - "type" : "object" - }, "Link" : { "properties" : { "href" : { @@ -719,7 +696,7 @@ }, "response" : { "description" : "JSON response payload.", - "$ref" : "#/components/schemas/JSONObject" + "type" : "object" }, "status" : { "description" : "The HTTP status code.", @@ -770,7 +747,7 @@ }, "type" : "object" }, - "TransactionData" : { + "Transaction" : { "properties" : { "accountHolderId" : { "x-addedInVersion" : "1", @@ -945,7 +922,7 @@ "data" : { "description" : "Contains the transactions that match the query parameters.", "items" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" }, "type" : "array" } diff --git a/json/TransferService-v3.json b/json/TransferService-v3.json index 122b00d4..b92b0a23 100644 --- a/json/TransferService-v3.json +++ b/json/TransferService-v3.json @@ -23,10 +23,10 @@ ], "tags" : [ { - "name" : "Transactions" + "name" : "Transfers" }, { - "name" : "Transfers" + "name" : "Transactions" }, { "name" : "Capital" @@ -542,7 +542,7 @@ ], "parameters" : [ { - "description" : "Unique identifier of the transaction.", + "description" : "The unique identifier of the transaction.", "name" : "id", "in" : "path", "required" : true, @@ -561,7 +561,7 @@ } }, "schema" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" } } }, @@ -754,6 +754,102 @@ } } } + }, + "/transfers/{transferId}/returns" : { + "post" : { + "tags" : [ + "Transfers" + ], + "summary" : "Return a transfer", + "description" : "Returns previously transferred funds without creating a new `transferId`.", + "x-addedInVersion" : "3", + "operationId" : "post-transfers-transferId-returns", + "x-groupName" : "Transfers", + "x-sortIndex" : 2, + "x-methodName" : "returnTransfer", + "security" : [ + { + "BasicAuth" : [ + ] + }, + { + "ApiKeyAuth" : [ + ] + } + ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReturnTransferRequest" + } + } + } + }, + "parameters" : [ + { + "description" : "The unique identifier of the transfer to be returned.", + "name" : "transferId", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + } + ], + "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ReturnTransferResponse" + } + } + }, + "description" : "OK - the request has succeeded." + }, + "401" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RestServiceError" + } + } + }, + "description" : "Unauthorized - authentication required." + }, + "403" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RestServiceError" + } + } + }, + "description" : "Forbidden - insufficient permissions to process the request." + }, + "422" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RestServiceError" + } + } + }, + "description" : "Unprocessable Entity - a request validation error." + }, + "500" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/RestServiceError" + } + } + }, + "description" : "Internal Server Error - the server could not process the request." + } + } + } } }, "components" : { @@ -806,7 +902,7 @@ }, "type" : "object" }, - "Address-2" : { + "Address" : { "properties" : { "city" : { "description" : "The name of the city.", @@ -900,7 +996,7 @@ "properties" : { "accountHolder" : { "description" : "Information about the owner of the bank account.", - "$ref" : "#/components/schemas/PartyIdentification-2" + "$ref" : "#/components/schemas/PartyIdentification" }, "accountIdentification" : { "description" : "Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer.", @@ -1082,7 +1178,7 @@ }, "counterparty" : { "description" : "An object containing the details of the receiving party of the grant. Setting either an `accountHolderId`, `balanceAccountId`, or both is required.", - "$ref" : "#/components/schemas/Counterparty-2" + "$ref" : "#/components/schemas/Counterparty" }, "fee" : { "description" : "An object containing the fee currency and value, in [minor units](https://docs.adyen.com/development-resources/currency-codes).", @@ -1127,7 +1223,7 @@ "properties" : { "counterparty" : { "description" : "An object containing the details of the receiving party of the grant. Setting either an `accountHolderId`, `balanceAccountId`, or both is required.", - "$ref" : "#/components/schemas/Counterparty-2" + "$ref" : "#/components/schemas/Counterparty" }, "grantAccountId" : { "description" : "The identifier of the grant account used for the grant.", @@ -1159,7 +1255,7 @@ ], "type" : "object" }, - "Counterparty-2" : { + "Counterparty" : { "properties" : { "accountHolderId" : { "description" : "The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.", @@ -1261,8 +1357,8 @@ "additionalProperties" : false, "properties" : { "accountNumber" : { - "description" : "The 9- to 12-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.", - "maxLength" : 12, + "description" : "The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code.", + "maxLength" : 15, "minLength" : 9, "type" : "string" }, @@ -1356,31 +1452,6 @@ ], "type" : "object" }, - "JSONObject" : { - "properties" : { - "paths" : { - "items" : { - "$ref" : "#/components/schemas/JSONPath" - }, - "type" : "array" - }, - "rootPath" : { - "$ref" : "#/components/schemas/JSONPath" - } - }, - "type" : "object" - }, - "JSONPath" : { - "properties" : { - "content" : { - "items" : { - "type" : "string" - }, - "type" : "array" - } - }, - "type" : "object" - }, "Link" : { "properties" : { "href" : { @@ -1562,11 +1633,11 @@ ], "type" : "object" }, - "PartyIdentification-2" : { + "PartyIdentification" : { "properties" : { "address" : { "description" : "Address of the bank account owner.", - "$ref" : "#/components/schemas/Address-2" + "$ref" : "#/components/schemas/Address" }, "dateOfBirth" : { "description" : "The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900.\n\nAllowed only when `type` is **individual**.", @@ -1710,7 +1781,7 @@ }, "response" : { "description" : "JSON response payload.", - "$ref" : "#/components/schemas/JSONObject" + "type" : "object" }, "status" : { "description" : "The HTTP status code.", @@ -1735,6 +1806,48 @@ ], "type" : "object" }, + "ReturnTransferRequest" : { + "properties" : { + "amount" : { + "description" : "Contains information about the amount to be returned.", + "$ref" : "#/components/schemas/Amount" + }, + "reference" : { + "description" : "Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status.\n\nWe recommend using a unique value per instruction.\nIf you need to provide multiple references for a transaction, separate them with hyphens (\"-\").\n", + "maxLength" : 80, + "type" : "string" + } + }, + "required" : [ + "amount" + ], + "type" : "object" + }, + "ReturnTransferResponse" : { + "properties" : { + "id" : { + "description" : "The unique identifier of the return.", + "type" : "string" + }, + "reference" : { + "description" : "Your internal reference for the return.", + "type" : "string" + }, + "status" : { + "description" : "The resulting status of the return.\n\nFor example: **authorised**, **booked**, **error**.", + "enum" : [ + "Authorised", + "Declined" + ], + "type" : "string" + }, + "transferId" : { + "description" : "The unique identifier of the original transfer.", + "type" : "string" + } + }, + "type" : "object" + }, "SELocalAccountIdentification" : { "additionalProperties" : false, "properties" : { @@ -1834,7 +1947,7 @@ ], "type" : "object" }, - "TransactionData" : { + "Transaction" : { "properties" : { "accountHolderId" : { "x-addedInVersion" : "1", @@ -1900,6 +2013,9 @@ }, "eventId" : { "x-addedInVersion" : "3", + "deprecated" : true, + "x-deprecatedInVersion" : "3", + "x-deprecatedMessage" : "This field will be removed in version 4.", "description" : "The PSP reference of the transaction in the journal.", "type" : "string" }, @@ -2014,7 +2130,7 @@ "data" : { "description" : "Contains the transactions that match the query parameters.", "items" : { - "$ref" : "#/components/schemas/TransactionData" + "$ref" : "#/components/schemas/Transaction" }, "type" : "array" } @@ -2104,7 +2220,6 @@ "description" : "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.\n\nPossible values:\n\n* **regular**: For normal, low-value transactions.\n\n* **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.\n\n* **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.\n\n* **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).\n\n* **crossBorder**: High-value transfer to a recipient in a different country.\n\n* **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN). This will be removed in v4 and replaced with a new field.", "enum" : [ "crossBorder", - "directDebit", "fast", "instant", "internal", @@ -2270,7 +2385,6 @@ "description" : "The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**.\n\nPossible values:\n\n* **regular**: For normal, low-value transactions.\n\n* **fast**: Faster way to transfer funds but has higher fees. Recommended for high-priority, low-value transactions.\n\n* **wire**: Fastest way to transfer funds but has the highest fees. Recommended for high-priority, high-value transactions.\n\n* **instant**: Instant way to transfer funds in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html).\n\n* **crossBorder**: High-value transfer to a recipient in a different country.\n\n* **internal**: Transfer to an Adyen-issued business bank account (by bank account number/IBAN).", "enum" : [ "crossBorder", - "directDebit", "fast", "instant", "internal", @@ -2379,7 +2493,7 @@ "properties" : { "address" : { "description" : "Address of the bank account owner.", - "$ref" : "#/components/schemas/Address-2" + "$ref" : "#/components/schemas/Address" }, "dateOfBirth" : { "description" : "The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900.\n\nAllowed only when `type` is **individual**.", diff --git a/yaml/BalancePlatformAcsNotification-v1.yaml b/yaml/BalancePlatformAcsNotification-v1.yaml index b85179e8..e02b2581 100644 --- a/yaml/BalancePlatformAcsNotification-v1.yaml +++ b/yaml/BalancePlatformAcsNotification-v1.yaml @@ -11,7 +11,8 @@ info: url: https://github.com/Adyen/adyen-openapi x-groups: - General -tags: [] +tags: +- name: General webhooks: balancePlatform.authentication.created: post: diff --git a/yaml/BalancePlatformPaymentNotification-v1.yaml b/yaml/BalancePlatformPaymentNotification-v1.yaml index bf6653a4..512d4e97 100644 --- a/yaml/BalancePlatformPaymentNotification-v1.yaml +++ b/yaml/BalancePlatformPaymentNotification-v1.yaml @@ -21,7 +21,9 @@ info: x-groups: - Payment authorisation, refund, or funds transfer initiated - Fund movements -tags: [] +tags: +- name: Payment authorisation, refund, or funds transfer initiated +- name: Fund movements x-staticResponse: response.json webhooks: balancePlatform.incomingTransfer.created: diff --git a/yaml/BalancePlatformTransferNotification-v3.yaml b/yaml/BalancePlatformTransferNotification-v3.yaml index 2d5151b5..39a7b3b3 100644 --- a/yaml/BalancePlatformTransferNotification-v3.yaml +++ b/yaml/BalancePlatformTransferNotification-v3.yaml @@ -16,7 +16,8 @@ info: url: https://github.com/Adyen/adyen-openapi x-groups: - General -tags: [] +tags: +- name: General x-staticResponse: response.json webhooks: balancePlatform.transfer.created: @@ -397,9 +398,9 @@ components: additionalProperties: false properties: accountNumber: - description: The 9- to 12-character bank account number (alphanumeric), + description: The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - maxLength: 12 + maxLength: 15 minLength: 9 type: string clearingCode: @@ -1088,7 +1089,6 @@ components: a new field.' enum: - crossBorder - - directDebit - fast - instant - internal diff --git a/yaml/TransferService-v1.yaml b/yaml/TransferService-v1.yaml index 151b94a1..9744857a 100644 --- a/yaml/TransferService-v1.yaml +++ b/yaml/TransferService-v1.yaml @@ -38,8 +38,9 @@ x-groups: - Transactions - Capital tags: -- name: Transactions - name: Transfers +- name: Transactions +- name: Capital paths: /transactions: get: @@ -207,7 +208,7 @@ paths: - BasicAuth: [] - ApiKeyAuth: [] parameters: - - description: Unique identifier of the transaction. + - description: The unique identifier of the transaction. name: id in: path required: true @@ -218,7 +219,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' description: OK - the request has succeeded. '401': content: @@ -436,22 +437,6 @@ components: - value - message type: object - JSONObject: - properties: - paths: - items: - $ref: '#/components/schemas/JSONPath' - type: array - rootPath: - $ref: '#/components/schemas/JSONPath' - type: object - JSONPath: - properties: - content: - items: - type: string - type: array - type: object Link: properties: href: @@ -555,7 +540,7 @@ components: type: string response: description: JSON response payload. - $ref: '#/components/schemas/JSONObject' + type: object status: description: The HTTP status code. format: int32 @@ -593,7 +578,7 @@ components: format: int32 type: integer type: object - TransactionData: + Transaction: properties: accountHolderId: x-addedInVersion: '1' @@ -765,7 +750,7 @@ components: data: description: Contains the transactions that match the query parameters. items: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' type: array type: object TransferInfoOld: diff --git a/yaml/TransferService-v2.yaml b/yaml/TransferService-v2.yaml index 3cc91c50..112a7cc0 100644 --- a/yaml/TransferService-v2.yaml +++ b/yaml/TransferService-v2.yaml @@ -38,8 +38,9 @@ x-groups: - Transactions - Capital tags: -- name: Transactions - name: Transfers +- name: Transactions +- name: Capital paths: /transactions: get: @@ -210,7 +211,7 @@ paths: - BasicAuth: [] - ApiKeyAuth: [] parameters: - - description: Unique identifier of the transaction. + - description: The unique identifier of the transaction. name: id in: path required: true @@ -224,7 +225,7 @@ paths: success: $ref: '#/components/examples/get-transactions-id-success-200' schema: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' description: OK - the request has succeeded. '401': content: @@ -434,7 +435,6 @@ components: bank account number/IBAN).' enum: - crossBorder - - directDebit - fast - instant - internal @@ -498,22 +498,6 @@ components: - value - message type: object - JSONObject: - properties: - paths: - items: - $ref: '#/components/schemas/JSONPath' - type: array - rootPath: - $ref: '#/components/schemas/JSONPath' - type: object - JSONPath: - properties: - content: - items: - type: string - type: array - type: object Link: properties: href: @@ -608,7 +592,7 @@ components: type: string response: description: JSON response payload. - $ref: '#/components/schemas/JSONObject' + type: object status: description: The HTTP status code. format: int32 @@ -646,7 +630,7 @@ components: format: int32 type: integer type: object - TransactionData: + Transaction: properties: accountHolderId: x-addedInVersion: '1' @@ -818,7 +802,7 @@ components: data: description: Contains the transactions that match the query parameters. items: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' type: array type: object Transfer: diff --git a/yaml/TransferService-v3.yaml b/yaml/TransferService-v3.yaml index 1cc928e6..03dc5140 100644 --- a/yaml/TransferService-v3.yaml +++ b/yaml/TransferService-v3.yaml @@ -38,8 +38,8 @@ x-groups: - Transactions - Capital tags: -- name: Transactions - name: Transfers +- name: Transactions - name: Capital paths: /grants: @@ -406,7 +406,7 @@ paths: - BasicAuth: [] - ApiKeyAuth: [] parameters: - - description: Unique identifier of the transaction. + - description: The unique identifier of the transaction. name: id in: path required: true @@ -420,7 +420,7 @@ paths: success: $ref: '#/components/examples/get-transactions-id-success-200' schema: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' description: OK - the request has succeeded. '401': content: @@ -547,6 +547,63 @@ paths: schema: $ref: '#/components/schemas/RestServiceError' description: Internal Server Error - the server could not process the request. + /transfers/{transferId}/returns: + post: + tags: + - Transfers + summary: Return a transfer + description: Returns previously transferred funds without creating a new `transferId`. + x-addedInVersion: '3' + operationId: post-transfers-transferId-returns + x-groupName: Transfers + x-sortIndex: 2 + x-methodName: returnTransfer + security: + - BasicAuth: [] + - ApiKeyAuth: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReturnTransferRequest' + parameters: + - description: The unique identifier of the transfer to be returned. + name: transferId + in: path + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ReturnTransferResponse' + description: OK - the request has succeeded. + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/RestServiceError' + description: Unauthorized - authentication required. + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/RestServiceError' + description: Forbidden - insufficient permissions to process the request. + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/RestServiceError' + description: Unprocessable Entity - a request validation error. + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/RestServiceError' + description: Internal Server Error - the server could not process the request. components: schemas: AULocalAccountIdentification: @@ -590,7 +647,7 @@ components: - usRoutingNumber type: string type: object - Address-2: + Address: properties: city: description: The name of the city. @@ -672,7 +729,7 @@ components: properties: accountHolder: description: Information about the owner of the bank account. - $ref: '#/components/schemas/PartyIdentification-2' + $ref: '#/components/schemas/PartyIdentification' accountIdentification: description: Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the @@ -805,7 +862,7 @@ components: description: An object containing the details of the receiving party of the grant. Setting either an `accountHolderId`, `balanceAccountId`, or both is required. - $ref: '#/components/schemas/Counterparty-2' + $ref: '#/components/schemas/Counterparty' fee: description: An object containing the fee currency and value, in [minor units](https://docs.adyen.com/development-resources/currency-codes). @@ -844,7 +901,7 @@ components: description: An object containing the details of the receiving party of the grant. Setting either an `accountHolderId`, `balanceAccountId`, or both is required. - $ref: '#/components/schemas/Counterparty-2' + $ref: '#/components/schemas/Counterparty' grantAccountId: description: The identifier of the grant account used for the grant. type: string @@ -866,7 +923,7 @@ components: required: - grants type: object - Counterparty-2: + Counterparty: properties: accountHolderId: description: The identifier of the receiving account holder. The payout @@ -947,9 +1004,9 @@ components: additionalProperties: false properties: accountNumber: - description: The 9- to 12-character bank account number (alphanumeric), + description: The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - maxLength: 12 + maxLength: 15 minLength: 9 type: string clearingCode: @@ -1019,22 +1076,6 @@ components: - value - message type: object - JSONObject: - properties: - paths: - items: - $ref: '#/components/schemas/JSONPath' - type: array - rootPath: - $ref: '#/components/schemas/JSONPath' - type: object - JSONPath: - properties: - content: - items: - type: string - type: array - type: object Link: properties: href: @@ -1175,11 +1216,11 @@ components: - type - accountNumber type: object - PartyIdentification-2: + PartyIdentification: properties: address: description: Address of the bank account owner. - $ref: '#/components/schemas/Address-2' + $ref: '#/components/schemas/Address' dateOfBirth: description: 'The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900. @@ -1304,7 +1345,7 @@ components: type: string response: description: JSON response payload. - $ref: '#/components/schemas/JSONObject' + type: object status: description: The HTTP status code. format: int32 @@ -1323,6 +1364,49 @@ components: - detail - status type: object + ReturnTransferRequest: + properties: + amount: + description: Contains information about the amount to be returned. + $ref: '#/components/schemas/Amount' + reference: + description: 'Your internal reference for the return. If you don''t provide + this in the request, Adyen generates a unique reference. This reference + is used in all communication with you about the instruction status. + + + We recommend using a unique value per instruction. + + If you need to provide multiple references for a transaction, separate + them with hyphens ("-"). + + ' + maxLength: 80 + type: string + required: + - amount + type: object + ReturnTransferResponse: + properties: + id: + description: The unique identifier of the return. + type: string + reference: + description: Your internal reference for the return. + type: string + status: + description: 'The resulting status of the return. + + + For example: **authorised**, **booked**, **error**.' + enum: + - Authorised + - Declined + type: string + transferId: + description: The unique identifier of the original transfer. + type: string + type: object SELocalAccountIdentification: additionalProperties: false properties: @@ -1400,7 +1484,7 @@ components: required: - amount type: object - TransactionData: + Transaction: properties: accountHolderId: x-addedInVersion: '1' @@ -1463,6 +1547,9 @@ components: type: string eventId: x-addedInVersion: '3' + deprecated: true + x-deprecatedInVersion: '3' + x-deprecatedMessage: This field will be removed in version 4. description: The PSP reference of the transaction in the journal. type: string id: @@ -1576,7 +1663,7 @@ components: data: description: Contains the transactions that match the query parameters. items: - $ref: '#/components/schemas/TransactionData' + $ref: '#/components/schemas/Transaction' type: array type: object Transfer: @@ -1699,7 +1786,6 @@ components: a new field.' enum: - crossBorder - - directDebit - fast - instant - internal @@ -1896,7 +1982,6 @@ components: bank account number/IBAN).' enum: - crossBorder - - directDebit - fast - instant - internal @@ -1994,7 +2079,7 @@ components: properties: address: description: Address of the bank account owner. - $ref: '#/components/schemas/Address-2' + $ref: '#/components/schemas/Address' dateOfBirth: description: 'The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Should not be before January 1, 1900.