Requirements
Before you begin, take into account the following requirements and preparations:| Requirement | Description |
|---|---|
| Integration type | You need an Adyen for Platforms integration. |
| API credentials | Your API credential for the Transfers API must have the following role: - TransferService Webservice Initiate role |
| Customer Area roles | You need the following roles: - Initiate internal transfers Balance platform base role |
| Webhooks | Make sure that your server receives and accepts webhooks. In your Customer Area, subscribe to Transfer webhooks. |
| Capabilities | If the balance accounts involved in the transfer do not belong to the same account holder, check the capabilities of the account holders: The account holder of the balance account that sends the the transfer request must have the sendToBalanceAccount capability. The account holder of the balance account that receives the transfer request must have the receiveFromBalanceAccount capability. |
| Setup steps | Before you begin your integration, contact our Support Team to enable transfers for the source balance account. |
Initiate an internal transfer
To send on-demand payouts, use your Customer Area or make an POST /transfers request. The following tabs explain both methods.- Customer Area
- API
In your Customer Area, initiate the transfer as follows:
- Go to Transactions > Transfers.
- In the Balance platform dropdown, select the balance platform. You can view transfers from one balance platform at a time.
- Select Transfer funds.
- In the Source balance account field, enter the ID of the balance account where the funds will be debited.
- In the Counterparty Type field, select balanceAccount.
- Select the Counterparty balance account ID. This is where the funds will be credited.
- Select the currency and enter the amount to be transferred.
-
Optional. Enter the following information:
- Reference: your reference for the transfer, used internally within your platform. If you do not provide this, Adyen generates a unique reference. Maximum 80 characters.
- Description: a description of the transfer that is sent to the recipient of the transfer request. Supported characters:
[a-z][A-Z][0-9]/ - ? : ( ) . , ' + Space. We recommend a maximum of 140 characters. - Reference for beneficiary: a reference that is sent to the recipient of the transfer request. It is also sent in all the webhooks related to the transfer. Supported characters:
[a-z][A-Z][0-9]. Maximum 80 characters.
- Select Transfer funds > Yes, Transfer.
Example — Move funds to another balance account
You want to send EUR 150.00 from balance account 1 to balance account 2.The following table shows the details you need to enter to initiate the transfer:| Field | Details |
|---|---|
| Source balance account | BA00000000000000000000001 |
| Counterparty Type | balanceAccount |
| Counterparty balance account ID | BA00000000000000000000002 |
| Amount | EUR 150 |
| Reference (optional) | Your internal reference for the transfer |
| Description (optional) | Your description of the transfer |
| Reference for beneficiary (optional) | Your reference for the recipient of the transfer request |
-
To move funds between balance accounts, make a POST /transfers request. In the body of the request, specify the following fields:
The following example shows how to push EUR 100.00 from your liable balance account to your user’s balance account. Push funds to another balance account
Parameter Required Description amount 
An object containing the currency and value of the transfer. balanceAccountId 
The unique identifier of the source balance account: the balance account that initiates the transfer request. counterparty.balanceAccountId 
The unique identifier of the target balance account: the balance account that receives the transfer. The funds are credited to this balance account. category 
Set to internal. description Your description of the transfer. You can use this to identify the transfer in the webhooks that you receive. reference Your unique reference for the transfer. You can use this to identify the transfer in the webhooks that you receive. referenceForBeneficiary Text to inform the recipient about the push or pull transfer. This reference is also included in all webhooks. Supported characters: a-z, A-Z, 0-9. curl
curl https://balanceplatform-api-test.adyen.com/btl/v4/transfers \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "amount": { "currency": "EUR", "value": 10000 }, "balanceAccountId": "BA00000000000000000000001", "counterparty": { "balanceAccountId": "BA00000000000000000000002" }, "category" : "internal", "referenceForBeneficiary": "Your-reference-sent-to-the-counterparty", "description": "YOUR_DESCRIPTION_OF_THE_TRANSFER", "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER" }'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) Amount amount = new Amount() .currency("EUR") .value(10000L); CounterpartyInfoV3 counterpartyInfoV3 = new CounterpartyInfoV3() .balanceAccountId("BA00000000000000000000002"); TransferInfo transferInfo = new TransferInfo() .balanceAccountId("BA00000000000000000000001") .reference("YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER") .amount(amount) .referenceForBeneficiary("Your-reference-sent-to-the-counterparty") .counterparty(counterpartyInfoV3) .description("YOUR_DESCRIPTION_OF_THE_TRANSFER") .category(TransferInfo.CategoryEnum.INTERNAL); // Send the request TransfersApi service = new TransfersApi(client); Transfer response = service.transferFunds(transferInfo, new RequestOptions().idempotencyKey("UUID"));PHP
<?php // Adyen PHP API Library v24.0.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Transfers\Amount; use Adyen\Model\Transfers\CounterpartyInfoV3; use Adyen\Model\Transfers\TransferInfo; use Adyen\Service\Transfers\TransfersApi; $client = new Client(); $client->setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(10000); $counterpartyInfoV3 = new CounterpartyInfoV3(); $counterpartyInfoV3 ->setBalanceAccountId("BA00000000000000000000002"); $transferInfo = new TransferInfo(); $transferInfo ->setBalanceAccountId("BA00000000000000000000001") ->setReference("YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER") ->setAmount($amount) ->setReferenceForBeneficiary("Your-reference-sent-to-the-counterparty") ->setCounterparty($counterpartyInfoV3) ->setDescription("YOUR_DESCRIPTION_OF_THE_TRANSFER") ->setCategory("internal"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new TransfersApi($client); $response = $service->transferFunds($transferInfo, $requestOptions);C#
// 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) Amount amount = new Amount { Currency = "EUR", Value = 10000 }; CounterpartyInfoV3 counterpartyInfoV3 = new CounterpartyInfoV3 { BalanceAccountId = "BA00000000000000000000002" }; TransferInfo transferInfo = new TransferInfo { BalanceAccountId = "BA00000000000000000000001", Reference = "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER", Amount = amount, ReferenceForBeneficiary = "Your-reference-sent-to-the-counterparty", Counterparty = counterpartyInfoV3, Description = "YOUR_DESCRIPTION_OF_THE_TRANSFER", Category = TransferInfo.CategoryEnum.Internal }; // Send the request var service = new TransfersService(client); var response = service.TransferFunds(transferInfo, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});NodeJS (JavaScript)
// 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 transferInfo = { amount: { currency: "EUR", value: 10000 }, balanceAccountId: "BA00000000000000000000001", counterparty: { balanceAccountId: "BA00000000000000000000002" }, category: "internal", referenceForBeneficiary: "Your-reference-sent-to-the-counterparty", description: "YOUR_DESCRIPTION_OF_THE_TRANSFER", reference: "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER" } // Send the request const transfersAPI = new TransfersAPI(client); const response = transfersAPI.TransfersApi.transferFunds(transferInfo, { idempotencyKey: "UUID" });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) amount := transfers.Amount{ Currency: "EUR", Value: 10000, } counterpartyInfoV3 := transfers.CounterpartyInfoV3{ BalanceAccountId: common.PtrString("BA00000000000000000000002"), } transferInfo := transfers.TransferInfo{ BalanceAccountId: common.PtrString("BA00000000000000000000001"), Reference: common.PtrString("YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER"), Amount: amount, ReferenceForBeneficiary: common.PtrString("Your-reference-sent-to-the-counterparty"), Counterparty: counterpartyInfoV3, Description: common.PtrString("YOUR_DESCRIPTION_OF_THE_TRANSFER"), Category: "internal", } // Send the request service := client.Transfers() req := service.TransfersApi.TransferFundsInput().IdempotencyKey("UUID").TransferInfo(transferInfo) res, httpRes, err := service.TransfersApi.TransferFunds(context.Background(), req)Python
# 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 = { "amount": { "currency": "EUR", "value": 10000 }, "balanceAccountId": "BA00000000000000000000001", "counterparty": { "balanceAccountId": "BA00000000000000000000002" }, "category": "internal", "referenceForBeneficiary": "Your-reference-sent-to-the-counterparty", "description": "YOUR_DESCRIPTION_OF_THE_TRANSFER", "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER" } # Send the request result = adyen.transfers.transfers_api.transfer_funds(request=json_request, idempotency_key="UUID")Ruby
# 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 = { :amount => { :currency => 'EUR', :value => 10000 }, :balanceAccountId => 'BA00000000000000000000001', :counterparty => { :balanceAccountId => 'BA00000000000000000000002' }, :category => 'internal', :referenceForBeneficiary => 'Your-reference-sent-to-the-counterparty', :description => 'YOUR_DESCRIPTION_OF_THE_TRANSFER', :reference => 'YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER' } # Send the request result = adyen.transfers.transfers_api.transfer_funds(request_body, headers: { 'Idempotency-Key' => 'UUID' })NodeJS (TypeScript)
// 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 amount: Types.transfers.Amount = { currency: "EUR", value: 10000 }; const counterpartyInfoV3: Types.transfers.CounterpartyInfoV3 = { balanceAccountId: "BA00000000000000000000002" }; const transferInfo: Types.transfers.TransferInfo = { balanceAccountId: "BA00000000000000000000001", reference: "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER", amount: amount, referenceForBeneficiary: "Your-reference-sent-to-the-counterparty", counterparty: counterpartyInfoV3, description: "YOUR_DESCRIPTION_OF_THE_TRANSFER", category: Types.transfers.TransferInfo.CategoryEnum.Internal }; // Send the request const transfersAPI = new TransfersAPI(client); const response = transfersAPI.TransfersApi.transferFunds(transferInfo, { idempotencyKey: "UUID" }); -
In the response, note the following:
id: the unique ID of the transfer.status: the result of the transfer.reason: an explanation of the status.
For example, the reason for a refused status can be notEnoughBalance.
{ "creationDate": "2023-08-08T13:52:08+02:00", "id": "48NJIB9TWQJ6L7U7", "accountHolder": { "description": "Your account holder description", "id": "AH00000000000000000000001", "reference": "Your account holder reference" }, "amount": { "currency": "EUR", "value": 10000 }, "balanceAccount": { "description": "Your balance account description", "id": "BA00000000000000000000001", "reference": "Your balance account reference" }, "category" : "internal", "categoryData": { "type": "internal" }, "counterparty": { "balanceAccountId": "BA00000000000000000000002" }, "description": "YOUR_DESCRIPTION_OF_THE_TRANSFER", "direction": "outgoing", "reason": "pending", "reference": "YOUR_UNIQUE_REFERENCE_FOR_THE_TRANSFER", "referenceForBeneficiary": "Your-reference-sent-to-the-counterparty", "status": "received", "type": "internalTransfer" } - Wait for the transfer webhooks to confirm that the transfer has been booked.