No momento, esta página não está disponível em português
Adyen-for-platform icon

Make a cashout request

Learn how to make a cashout request using Adyen's API.

Limited availability
Cashouts are in pilot phase. Some of the processes and documentation may change as the feature evolves.


When you make a cashout, your user's pending funds are instantly made available in your user's balance account. In your cashout request, you can also specify to pay out the funds to the user's transfer instrument.

To make a cashout request:

  1. (Recommended) Get the pending balance on the user's balance account: Ensure that your user has enough funds for the cashout.
  2. Initiate the cashout: Specify the details of the cashout in an API request.
  3. Get updates on the status of the cashout: Listen to webhooks to check the status of the cashout.

The following sections explain how to perform these steps.

Requirements

Before you initiate a cashout:

  • Contact our Support Team to enable cashout for your platform.
  • Ensure that your API credential has roles to use the Transfers API.
  • Ensure that the sales day settlement model is enabled in your user's balance account.
  • Ensure that your account and your user's account have the receiveFromBalanceAccount capability.
  • Ensure that your user's account has the sendToBalanceAccount.
  • Ensure that your user's account has the sendToTransferInstrument . This is only required for cashout requests that include a transferInstrumentId.

    From LEM API v3, this capability is verified at the level of the transfer instrument, such as a bank account. This means that transfers are possible to a verified transfer instrument independently of the verification status of other transfer instruments that the legal entity has.

  • Ensure that your server receives and accepts webhooks.

(Recommended) Get the pending balance on the balance account

Before initiating a cashout for a user, we recommend that you get the pending balance on the user's balance account. By doing this, you can:

  • Show the pending balance to your user, so that they know the maximum amount that they can ask for.
  • Check that the amount that your user is asking for is less or equal to the pending balance.

To get the pending balance on your user's balance account:

  1. Make a GET /balanceAccounts/{id} request.
  2. In the response, note the value of the balances.pending parameter.

Initiate a cashout

To initiate a cashout, make a POST /cashouts request, specifying the following parameters in the request body:

Parameter Required Description
instructingBalanceAccountId -white_check_mark- The unique identifier of the balance account where the cashout amount is settled.
amount.value -white_check_mark- The amount of the cashout. This is the amount that is settled and paid out to your user. This value cannot be higher than the pending balance.
amount.currency -white_check_mark- The currency of the cashout amount.
transferInstrumentId -white_check_mark-
Required to pay out the funds to the user's transfer instrument.
The unique identifier of the user's transfer instrument to which the funds are paid out.

If you do not provide this value, the funds are not paid out, but remain in the user's balance account.
fee.amount.value The amount (in minor units) of the fee that your platform charges for the cashout. Note that:
  • The fee amount cannot be higher than the cashout amount.
  • The sum of the cashout and fee amounts cannot be higher than the pending balance.
fee.amount.currency The currency of the fee that your platform charges for the cashout. This value must be the same as amount.currency.

The following example shows a cashout request for EUR 1000, with a fee of EUR 10.

Initiate a cashout request
Expand view
Copy link to code block
Copy code
Copy code
curl https://balanceplatform-api-test.adyen.com/btl/v4/cashouts \
-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
"instructingBalanceAccountId": "BA00000000000000000000001",
"transferInstrumentId": "SE00000000000000000000001",
"amount": {
"currency": "EUR",
"value": 100000
},
"fee": {
"amount":{
"currency": "EUR",
"value": 1000
}
}
}'

The following tabs show the responses that you receive after a successful or failed request.

If the request succeeds, note the following response parameters, which help you identify cashout-related transfers:

Response parameter
Description
id The unique identifier of the cashout.
transfers An array of objects that contain information about the transfers created in relation to the cashout.
transfers.type Specifies the type of transfer data that the object contains.
Possible values:
  • cashoutRepayment: Corresponds to the transfer created to deduct the cashout amount after settlement.
  • cashoutFee: Corresponds to the transfer created to debit the cashout fee form the user's balance account.

The following example shows a successful response for a created cashout.

Response for a created cashout
Expand view
Copy link to code block
Copy code
Copy code
{
"id": "CAOT0000000000000000000000001",
"amount": {
"currency": "EUR",
"value": 100000
},
"fee": {
"amount": {
"currency": "EUR",
"value": 1000
}
},
"instructingBalanceAccountId": "BA00000000000000000000001",
"transerInstrumentId": "SE00000000000000000000001",
"transfers": [
{
"amount": {
"currency": "EUR",
"value": 100000
},
"category": "internal",
"id": "400F6060JMB1I0AB",
"type": "cashoutRepayment"
},
{
"amount": {
"currency": "EUR",
"value": 1000
},
"category": "internal",
"id": "400F6060JMB1I0AA",
"type": "cashoutFee"
}
]
}

After you make the cashout request, Adyen will process it asynchronously. To track any updates related to your cashout request, use the webhooks that Adyen sends to your server.

Get updates on the status of the cashout

A cashout involves multiple funds transfers, which you can track by listening to webhooks. Webhooks inform you about any status change in the transfers, and whether the transfers succeed or fail.

Adyen sends three types of webhooks for each transfer:

To listen to these webhooks:

  1. Ensure that your server can receive and accept webhooks.
  2. Subscribe to Transfer webhooks and Transaction webhooks in your Balance Platform Customer Area.

Alternatively, you can view the transfer details in your Customer Area.

See also