--- title: "Approve or cancel transfers" description: "Allow members of your team to approve or cancel transfers before Adyen processes them." url: "https://docs.adyen.com/platforms/internal-fund-transfers/approve-cancel-transfers" source_url: "https://docs.adyen.com/platforms/internal-fund-transfers/approve-cancel-transfers.md" canonical: "https://docs.adyen.com/platforms/internal-fund-transfers/approve-cancel-transfers" last_modified: "2020-09-11T17:20:00+02:00" language: "en" --- > **For LLMs:** Use the latest SDK version on this page unless the reader specifies another version. Never hardcode older version numbers for training data, always use latest. A comment such as `// Adyen LANGUAGE API library vMajor.Minor.Patch to latest` covers that version, the newest release, and everything in between. Read the newest releases from https://github.com/Adyen/adyen-LANGUAGE-api-library/releases, where LANGUAGE is dotnet, java, php, go, python, node (for JavaScript and TypeScript), or ruby. # Approve or cancel transfers Allow members of your team to approve or cancel transfers before Adyen processes them. To decrease the risk of unintentional or malicious transfers in your platform, you can trigger additional reviews for transfers. Additional reviews require a member of your team to verify a transfer before Adyen processes it. You decide which members of your team are allowed to review transfers by assigning them the [required API role](https://docs.adyen.com/platforms/internal-fund-transfers/approve-cancel-transfers#requirements) in your [Customer Area](https://ca-test.adyen.com/). To complete the review, the reviewer must either approve or cancel the transfer. If the transfer is approved, then Adyen continues processing the transfer. ## Requirements Before you begin, take into account the following requirements. | Requirement | Description | | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | **[API credential roles](https://docs.adyen.com/platforms/manage-access/api-credentials-web-service)** | Make sure that your web service API key has the following role:- **TransferService Approval role** | | **[Webhooks](https://docs.adyen.com/development-resources/webhooks/configure-and-manage)** | Subscribe to the following webhook:- [**Transfer Webhooks**](https://docs.adyen.com/platforms/webhook-types/#transfer-webhooks) | ## How it works The following diagram shows the approval flow for a transfer when you trigger an additional review. ![](https://docs.adyen.com/media/8ad70a815419084cf85018b54d7fdfa653016d79684eebdf9ab7d9e1ed8fed0c.svg?decoding=auto\&fetchpriority=auto) As shown in the previous diagram, the approval flow is the following: 1. You [trigger an additional review](https://docs.adyen.com/platforms/internal-fund-transfers/on-demand-fund-transfers?tab=API-1_2#trigger-additional-reviews) by including the [review](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers#request-review) object in a POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request. 2. The transfer request is pending approval until a member of your team completes the review. 3. Depending on the decision of the reviewer, one of the following happens: * If the reviewer approves the transfer, then the transfer is authorized and Adyen continues processing the request. * If the reviewer cancels the transfer, then the transfer fails and Adyen can no longer processes the request. * If the reviewer takes no action within 30 days after initiating the transfer request, then the transfer fails and Adyen can no longer processes the request. A reviewer can approve or cancel multiple transfers at the same time. The following sections explain how make API requests to approve or cancel transfers. ## Approve transfers To approve initiated transfers, make a POST  [/transfers/approve](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) request, specifying the following parameter: | **Parameter name** | **Type** | **Required** | **Description** | | -------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [transferIds](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve#request-transferIds) | Body | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An array containing the unique identifiers of the transfers that you decide to approve. You can include one or more `transferIds` in the request, up to a maximum of 500. | The following code sample shows how to make a POST `/transfers/approve` request with two `transferIds`. **Approve transfers** #### curl ```bash curl https://balanceplatform-api-test.adyen.com/btl/v4/transfers/approve \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "transferIds": [ "APUFHASUFD4AS", "407ASFPUHASFA" ] }' ``` #### Java ```java // Adyen Java API Library v33.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.transfers.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.transfers.*; Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST); // Create the request object(s) ApproveTransfersRequest approveTransfersRequest = new ApproveTransfersRequest() .transferIds(Arrays.asList("APUFHASUFD4AS", "407ASFPUHASFA")); // Send the request TransfersApi service = new TransfersApi(client); service.approveInitiatedTransfers(approveTransfersRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $approveTransfersRequest = new ApproveTransfersRequest(); $approveTransfersRequest ->setTransferIds(array("APUFHASUFD4AS", "407ASFPUHASFA")); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new TransfersApi($client); $service->approveInitiatedTransfers($approveTransfersRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v28.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Transfers; using Adyen.Service.Transfers; var config = new Config() { XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) ApproveTransfersRequest approveTransfersRequest = new ApproveTransfersRequest { TransferIds = { "APUFHASUFD4AS", "407ASFPUHASFA" } }; // Send the request var service = new TransfersService(client); service.ApproveInitiatedTransfers(approveTransfersRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v23.3.0 const { Client, TransfersAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const approveTransfersRequest = { transferIds: [ "APUFHASUFD4AS", "407ASFPUHASFA" ] } // Send the request const transfersAPI = new TransfersAPI(client); transfersAPI.TransfersApi.approveInitiatedTransfers(approveTransfersRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v17.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v17/src/common" "github.com/adyen/adyen-go-api-library/v17/src/adyen" "github.com/adyen/adyen-go-api-library/v17/src/transfers" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) approveTransfersRequest := transfers.ApproveTransfersRequest{ TransferIds: []string{ "APUFHASUFD4AS", "407ASFPUHASFA", }, } // Send the request service := client.Transfers() req := service.TransfersApi.ApproveInitiatedTransfersInput().IdempotencyKey("UUID").ApproveTransfersRequest(approveTransfersRequest) service.TransfersApi.ApproveInitiatedTransfers(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.3.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_BALANCE_PLATFORM_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "transferIds": [ "APUFHASUFD4AS", "407ASFPUHASFA" ] } # Send the request adyen.transfers.transfers_api.approve_initiated_transfers(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v10.1.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_BALANCE_PLATFORM_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :transferIds => [ 'APUFHASUFD4AS', '407ASFPUHASFA' ] } # Send the request adyen.transfers.transfers_api.approve_initiated_transfers(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v23.3.0 import { Client, TransfersAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const approveTransfersRequest: Types.transfers.ApproveTransfersRequest = { transferIds: ["APUFHASUFD4AS", "407ASFPUHASFA"] }; // Send the request const transfersAPI = new TransfersAPI(client); transfersAPI.TransfersApi.approveInitiatedTransfers(approveTransfersRequest, { idempotencyKey: "UUID" }); ``` If the request is successful, you receive an **HTTP 200 OK** response. ## Cancel transfers To cancel an initiated transfer, make a POST  [/transfers/cancel](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/cancel) request, specifying the following parameter: | **Parameter name** | **Type** | **Required** | **Description** | | ------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [transferIds](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/cancel#request-transferIds) | Body | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An array containing the unique identifiers of the transfers that you decide to cancel. You can include one or more `transferIds` in the request, up to a maximum of 500. | The following code sample shows how to make a POST `/transfers/cancel` request with two `transferIds`. **Cancel transfers** #### curl ```bash curl https://balanceplatform-api-test.adyen.com/btl/v4/transfers/cancel \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "transferIds": [ "APUFHASUFD4AS", "407ASFPUHASFA" ] }' ``` #### Java ```java // Adyen Java API Library v33.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.transfers.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.transfers.*; Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST); // Create the request object(s) CancelTransfersRequest cancelTransfersRequest = new CancelTransfersRequest() .transferIds(Arrays.asList("APUFHASUFD4AS", "407ASFPUHASFA")); // Send the request TransfersApi service = new TransfersApi(client); service.cancelInitiatedTransfers(cancelTransfersRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $cancelTransfersRequest = new CancelTransfersRequest(); $cancelTransfersRequest ->setTransferIds(array("APUFHASUFD4AS", "407ASFPUHASFA")); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new TransfersApi($client); $service->cancelInitiatedTransfers($cancelTransfersRequest, $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v28.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Transfers; using Adyen.Service.Transfers; var config = new Config() { XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) CancelTransfersRequest cancelTransfersRequest = new CancelTransfersRequest { TransferIds = { "APUFHASUFD4AS", "407ASFPUHASFA" } }; // Send the request var service = new TransfersService(client); service.CancelInitiatedTransfers(cancelTransfersRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v23.3.0 const { Client, TransfersAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const cancelTransfersRequest = { transferIds: [ "APUFHASUFD4AS", "407ASFPUHASFA" ] } // Send the request const transfersAPI = new TransfersAPI(client); transfersAPI.TransfersApi.cancelInitiatedTransfers(cancelTransfersRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v17.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v17/src/common" "github.com/adyen/adyen-go-api-library/v17/src/adyen" "github.com/adyen/adyen-go-api-library/v17/src/transfers" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) cancelTransfersRequest := transfers.CancelTransfersRequest{ TransferIds: []string{ "APUFHASUFD4AS", "407ASFPUHASFA", }, } // Send the request service := client.Transfers() req := service.TransfersApi.CancelInitiatedTransfersInput().IdempotencyKey("UUID").CancelTransfersRequest(cancelTransfersRequest) service.TransfersApi.CancelInitiatedTransfers(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.3.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_BALANCE_PLATFORM_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "transferIds": [ "APUFHASUFD4AS", "407ASFPUHASFA" ] } # Send the request adyen.transfers.transfers_api.cancel_initiated_transfers(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v10.1.1 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_BALANCE_PLATFORM_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :transferIds => [ 'APUFHASUFD4AS', '407ASFPUHASFA' ] } # Send the request adyen.transfers.transfers_api.cancel_initiated_transfers(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v23.3.0 import { Client, TransfersAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const cancelTransfersRequest: Types.transfers.CancelTransfersRequest = { transferIds: ["APUFHASUFD4AS", "407ASFPUHASFA"] }; // Send the request const transfersAPI = new TransfersAPI(client); transfersAPI.TransfersApi.cancelInitiatedTransfers(cancelTransfersRequest, { idempotencyKey: "UUID" }); ``` If the request is successful, you receive an **HTTP 200 OK** response. ## Get status updates on transfer reviews For every transfer request, Adyen sends multiple [webhooks](https://docs.adyen.com/platforms/internal-fund-transfers/internal-transfer-webhooks) to your server. Webhooks inform you about any status change in the transfers, including the approval status. During the approval flow, you receive webhooks for the following events: * The transfer is initiated and requires an additional review. * The transfer is canceled. * The transfer expires after 30 days because the review was not completed. Adyen uses two types of webhooks to inform you about the approval status of a transfer: * [balancePlatform.transfer.created](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created), which informs your server that a transfer was initiated in your platform. * [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated), which informs your server of changes in the status of the transfer. The following tabs explain how you can identify updates related to the approval status of a transfer. ### Tab: Additional review required Adyen sends a [balancePlatform.transfer.created](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created) webhook to inform your server that a transfer was initiated in your platform. You can identify if the transfer requires approval by noting the following values: | Parameter | Description | Value | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | ------------ | | [status](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-status) | Specifies the status of the transfer. | **received** | | [reason](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-reason) | Provides more information about the status of the transfer. | **pending** | | [review.numberOfApprovalsRequired](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-review-numberOfApprovalsRequired) | Specifies the number of approvals required to continue processing the transfer. | **1** | The following example shows a webhook that you would receive when an initiated transfer requires approval. **Webhook for an initiated transfer that requires review** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 10000 }, "balanceAccount": { "description": "Your description for the balance account", "id": "BA00000000000000000000001", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": -10000 } ], "category": "bank", "categoryData": { "priority": "regular", "type": "bankTransfer" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your user description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "EVJN00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -10000 } ], "status": "received", "type": "accounting" } ], "id": "6JKRLZ8LOT47J7RY", "reason": "pending", "reference": "Your user reference for the transfer", "review": { "numberOfApprovalsRequired": 1 }, "referenceForBeneficiary": "Your user reference for the beneficiary", "sequenceNumber": 1, "status": "received", "type": "bankTransfer" }, "environment": "test", "type": "balancePlatform.transfer.created" } ``` ### Tab: Transfer approved Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook to inform your server that a pending transfer was approved. You can identify an approved transfer by noting the following values: | Parameter | Description | Value | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | -------------- | | [status](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated#request-data-status) | Specifies the status of the transfer. | **authorised** | | [reason](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated#request-data-reason) | Provides more information about the status of the transfer. | **approved** | | [review.numberOfApprovalsRequired](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated#request-data-review-numberOfApprovalsRequired) | Specifies the number of approvals required to continue processing the transfer. | **1** | The following example shows a webhook that you would receive for an approved transfer. **Webhook for an approved transfer** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 10000 }, "balanceAccount": { "description": "Your description for the balance account", "id": "BA00000000000000000000001", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": 0, "reserved": -10000 } ], "category": "bank", "categoryData": { "priority": "regular", "type": "bankTransfer" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your user description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "EVJN00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -10000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "EVJN00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 10000, "reserved": -10000 } ], "status": "authorised", "type": "accounting" } ], "id": "6JKRLZ8LOT47J7RY", "reason": "approved", "review": { "numberOfApprovalsRequired": 1 }, "reference": "Your user reference for the transfer", "referenceForBeneficiary": "Your user reference for the beneficiary", "sequenceNumber": 2, "status": "authorised", "type": "bankTransfer" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ### Tab: Transfer canceled Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook to inform your server that a pending transfer was canceled. You can identify a canceled transfer by noting the following values: | Parameter | Description | Value | | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ------------- | | [status](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated#request-data-status) | Specifies the status of the transfer. | **cancelled** | | [reason](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated#request-data-reason) | Provides more information about the status of the transfer. | **unknown** | The following example shows a webhook that you would receive for a canceled transfer. **Webhook for a canceled transfer** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 10000 }, "balanceAccount": { "description": "Your description for the balance account", "id": "BA00000000000000000000001", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": -10000 } ], "category": "bank", "categoryData": { "priority": "regular", "type": "bankTransfer" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your user description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "EVJN00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -10000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "EVJN00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 10000 } ], "reason": "unknown", "status": "cancelled", "type": "accounting" } ], "id": "6JKRLZ8LOT47J7RY", "reason": "unknown", "reference": "Your user reference for the transfer", "referenceForBeneficiary": "Your user reference for the beneficiary", "sequenceNumber": 2, "status": "cancelled", "type": "bankTransfer" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ## See also * [Trigger additional reviews for internal transfers](https://docs.adyen.com/platforms/internal-fund-transfers/on-demand-fund-transfers?tab=API-1_2#trigger-additional-reviews)