---
title: "Top up on demand"
description: "Make payment requests to top up balance accounts on demand."
url: "https://docs.adyen.com/platforms/top-up-balance-account/on-demand-top-ups"
source_url: "https://docs.adyen.com/platforms/top-up-balance-account/on-demand-top-ups.md"
canonical: "https://docs.adyen.com/platforms/top-up-balance-account/on-demand-top-ups"
last_modified: "2026-06-01T15:33:15+02:00"
language: "en"
---

# Top up on demand

Make payment requests to top up balance accounts on demand.

[View source](/platforms/top-up-balance-account/on-demand-top-ups.md)

You can submit requests to manually top-up your users' balance accounts when needed. In this case, you create a one-off payment funded by your user, that increases the balance in their balance account.

## Requirements

| Requirement                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------- |   |
| **Integration type**                                                      | Adyen for Platforms                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **[API credential roles](/development-resources/api-credentials/roles/)** | Make sure that you have the credentials for the [Checkout API](https://docs.adyen.com/api-explorer/Checkout/latest/overview).                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **[Webhooks](/development-resources/webhooks)**                           | Ensure that your server can receive and accept [standard webhooks](/development-resources/webhooks). Subscribe to the following webhooks:- [Transfer webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/overview)
- [Transaction webhooks](https://docs.adyen.com/api-explorer/transaction-webhooks/latest/overview)                                                                                                                                                                                                                                                    |
| **[Capabilities](/platforms/verification-overview/capabilities)**         | Make sure your user has the right capabilities to [fund the top-up](#fund-the-top-up). To top up using your user's [verified transfer transfer instrument (bank account)](/platforms/top-up-balance-account/on-demand-top-ups/?tab=transfer-instrument-example_1), they need the following capabilities:- **receiveFromPlatformPayments**
- **receiveFromTransferInstrument** To top up using [other payment methods](/platforms/top-up-balance-account/on-demand-top-ups/?tab=other-payment-methods-example_2), your user needs the following capability:- **receiveFromPlatformPayments** |
| **Limitations**                                                           | To top-up using your user's [verified transfer instrument (bank account)](/platforms/top-up-balance-account/on-demand-top-ups/?tab=transfer-instrument-example_1), your user must have a bank account in the SEPA zone, the UK, or the US.                                                                                                                                                                                                                                                                                                                                                  |
| **Setup steps**                                                           | Before you begin:- Ask our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable on-demand top-ups for your platform.
- To top up using your user's verified transfer instrument, make sure that you [stay compliant with the direct debit regulations](#compliance) in your user's region.                                                                                                                                                                                                                                                          |

## Fund the top-up

Top-ups of your users' balance account are usually funded by your users themselves.

Your users can fund the top-up of their balance accounts in the following ways:

#### Option 1: Using their [verified transfer instrument](/platforms/onboard-users/onboarding-steps/) (bank account)

* The following capabilities must be **allowed** for your user, and have a **valid** [verificationStatus](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)#responses-200-capabilities-verificationStatus):

  * **receiveFromPlatformPayments**
  * **receiveFromTransferInstrument**

* Your user must have a bank account in the SEPA zone, the UK, or the US. You cannot fund a top-up with bank accounts from other regions.

#### Option 2: Using any other payment method

Make sure that following capability is **allowed** for your user, and has a **valid** [verificationStatus](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)#responses-200-capabilities-verificationStatus): **receiveFromPlatformPayments**

## Differentiate the top-up

When you process a payment to top up a balance account, you can include instructions to define the top-up and differentiate it from regular payments. This allows you to:

* Reconcile top-ups separately from other payments using our reports.
* For users based in the US, exclude top-ups from tax filings. Top-ups do not count towards your user's revenue, and are not included in the 1099-K tax forms.

When you provide instructions to define the top-up, you can also specify where to book the top-up amount and the transaction fees it incurs.

## How it works

To top up your user's balance account on demand:

1. Determine how you want to fund the top-up: using your user's verified transfer instrument, or another payment method.
2. (Conditional) If you top up using your user's verified transfer instrument, make sure that you stay compliant with the direct debit regulations in your user's region.
3. Make a payment request for the top-up amount. You can use the `splits` array to differentiate the top-ups from other payments.
4. Listen to transfer and transaction webhooks to stay informed about the status of your top-up.

## Make a top-up request

To top up a balance account, make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request for the amount you want to top up.

You cannot initiate a top-up using a [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions) request.

The following tabs show you how to initiate a top-up using your user's transfer instrument or another payment method.

### Tab: Transfer instrument

In your payment request, specify the following fields:

| Parameter                                                                                                                     | Required                                                                                                                      | Description                                                                                                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-amount-currency)                  | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") Required for currency conversion. | The currency of the top-up.                                                                                                                                                                                                                                                                                     |
| [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-amount-currency)                     | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | The value of the top-up.                                                                                                                                                                                                                                                                                        |
| [merchantAccount](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-merchantAccount)                  | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | Your merchant account name.                                                                                                                                                                                                                                                                                     |
| [reference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-reference)                              | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | Your unique reference for this payment.                                                                                                                                                                                                                                                                         |
| [returnUrl](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-returnUrl)                              | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | URL to where the shopper should be taken back to after a redirection. The URL can contain a maximum of 1024 characters and should include the protocol: `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number.                  |
| [paymentMethod.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod)                 | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | The type of payment method. Possible values: - **ach**: for payments from verified bank accounts in the US, made in USD.
- **sepadirectdebit**: for payments from verified bank accounts in the SEPA zone, made in EUR.
- **directdebit\_GB**: for payments from verified bank accounts in the UK, made in GBP. |
| [paymentMethod.transferInstrumentId](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | The unique identifier of your user's verified transfer instrument (bank account).                                                                                                                                                                                                                               |
| [splits](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits)                                    |                                                                                                                               | An array containing instructions for each split of the total payment amount. You can define instructions for the top-up here. If you do not include a splits array, the funds are booked to your liable account, and classified as a regular payment.                                                           |

### Splits array

To define the top-up and differentiate it from regular payments, include the following objects in your [splits](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits) array:

* An object for the top-up amount
* One or more objects for the [transaction fees](/platforms/online-payments/transaction-fees).

In each object within the array, specify:

| Parameter                                                                                                            | Required                                                                                                                   | Description                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [splits.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-type)                 | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                | Defines the top-up and the transaction fees.- Top-up amount: set to **TopUp**.
- Transaction fees: set to the necessary [transaction fee type](/platforms/online-payments/transaction-fees/#transaction-fee-types).                    |
| [splits.account](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-account)           |                                                                                                                            | The balance account that is credited or debited.- Top-up amount: the unique identifier of the balance account you want to top up.
- Transaction fees: the unique identifier of the balance account to which you want to book the fees. |
| [splits.amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-amount-value) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") Required for the top-up object | The amount of the top-up. You do not need to specify this field for the transaction fees object, because they are not known at the time of payment.                                                                                    |

Here is an example of a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request to top up your user's balance account with EUR 100.00 using their transfer instrument with ID **SE00000000000000000000001**. In this example, your user is based in the SEPA zone.

**Top-up request using a bank account from the SEPA zone**

```bash
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
      "paymentMethod": {
        "type": "sepadirectdebit",
        "transferInstrumentId": "SE00000000000000000000001"
      },
      "amount": {
        "value": 10000,
        "currency": "EUR"
      },
      "reference": "YOUR_ORDER_NUMBER",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "returnUrl": "https://your-company.example.com/...",
      "splits": [
          {
            "amount": {
              "value": 10000
            },
            "type": "TopUp",
            "account": "BA00000000000000000000001",
            "reference": "Your reference for the top-up.",
            "description": "Your description for the top-up."
          },
          {
            "type": "PaymentFee",
            "account": "BA00000000000000000000001",
            "reference": "Your reference for the transaction fees.",
            "description": "Your description for the transaction fees."
          }
      ]
    }'
```

After you make the request, you receive the following response:

**Response**

```json

{
   "additionalData": {
       "sepadirectdebit.dateOfSignature": "2024-05-02",
       "sepadirectdebit.mandateId": "FJM726V375BV9D82",
       "sepadirectdebit.sequenceType": "Recurring"
   },
   "pspReference": "QFQTPCQ8HXSKGK82",
   "resultCode": "Authorised",
   "amount": {
       "currency": "EUR",
       "value": 10000
   },
   "merchantReference": "YOUR_ORDER_NUMBER",
   "paymentMethod": {
       "type": "sepadirectdebit"
   }
}
```

### Tab: Other payment methods

In your payment request, specify the following fields:

| Parameter                                                                                                    | Required                                                                                                                      | Description                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-amount-currency) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") Required for currency conversion. | The currency of the top-up.                                                                                                                                                                                                                                                                    |
| [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-amount-currency)    | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | The value of the top-up.                                                                                                                                                                                                                                                                       |
| [merchantAccount](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-merchantAccount) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | Your merchant account name.                                                                                                                                                                                                                                                                    |
| [reference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-reference)             | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | Your unique reference for this payment.                                                                                                                                                                                                                                                        |
| [returnUrl](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-returnUrl)             | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | URL to where the shopper should be taken back to after a redirection. The URL can contain a maximum of 1024 characters and should include the protocol: `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. |
| [paymentMethod](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod)     | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                   | The details of the payment method. You can check which parameters to include for each payment method by selecting that payment method in the drop down list in [API explorer](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod).                        |
| [splits](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits)                   |                                                                                                                               | An array containing instructions for each split of the total payment amount. You can define instructions for the top-up here. If you do not include a splits array, the funds are booked to your liable account, and classified as a regular payment.                                          |

### Splits array

To define the top-up and differentiate it from regular payments, include the following objects in your [splits](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits) array:

* An object for the top-up amount
* One or more objects for the [transaction fees](/platforms/online-payments/transaction-fees).

In each object within the array, specify:

| Parameter                                                                                                            | Required                                                                                                                   | Description                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [splits.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-type)                 | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-")                                | Defines the top-up and the transaction fees.- Top-up amount: set to **TopUp**.
- Transaction fees: set to the necessary [transaction fee type](/platforms/online-payments/transaction-fees/#transaction-fee-types).                    |
| [splits.account](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-account)           |                                                                                                                            | The balance account that is credited or debited.- Top-up amount: the unique identifier of the balance account you want to top up.
- Transaction fees: the unique identifier of the balance account to which you want to book the fees. |
| [splits.amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-amount-value) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") Required for the top-up object | The amount of the top-up. You do not need to specify this field for the transaction fees object, because they are not known at the time of payment.                                                                                    |

Here is an example of a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request to top up your user's balance account with EUR 100.00 using a Visa credit card.

**Top-up request using a Visa credit card**

#### curl

```bash
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
      "paymentMethod": {
        "type": "scheme",
        "number": "4111111111111111",
        "cvc": "737",
        "expiryMonth": "03",
        "expiryYear": "2030",
        "holderName": "John Smith"
      },
      "amount": {
        "value": 10000,
        "currency": "EUR"
      },
      "reference": "YOUR_ORDER_NUMBER",
      "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
      "returnUrl": "https://your-company.example.com/...",
      "splits": [
          {
            "amount": {
              "value": 10000
            },
            "type": "TopUp",
            "account": "BA00000000000000000000001",
            "reference": "Your reference for the top-up.",
            "description": "Your description for the top-up."
          },
          {
            "type": "PaymentFee",
            "account": "BA00000000000000000000001",
            "reference": "Your reference for the transaction fees.",
            "description": "Your description for the transaction fees."
          }
      ]
    }'
```

#### Java

```java
// Adyen Java API Library v33.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.checkout.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.model.RequestOptions;
import com.adyen.service.checkout.*;

// For the LIVE environment, also include your liveEndpointUrlPrefix.
Client client = new Client("ADYEN_API_KEY", Environment.TEST);

// Create the request object(s)
SplitAmount splitAmount1 = new SplitAmount()
  .value(10000L);

Amount amount = new Amount()
  .currency("EUR")
  .value(10000L);

Split split1 = new Split()
  .reference("Your reference for the top-up.")
  .amount(splitAmount1)
  .description("Your description for the top-up.")
  .type(Split.TypeEnum.TOPUP)
  .account("BA00000000000000000000001");

Split split2 = new Split()
  .reference("Your reference for the transaction fees.")
  .description("Your description for the transaction fees.")
  .type(Split.TypeEnum.PAYMENTFEE)
  .account("BA00000000000000000000001");

CardDetails cardDetails = new CardDetails()
  .number("4111111111111111")
  .cvc("737")
  .holderName("John Smith")
  .expiryMonth("03")
  .expiryYear("2030")
  .type(CardDetails.TypeEnum.SCHEME);

PaymentRequest paymentRequest = new PaymentRequest()
  .reference("YOUR_ORDER_NUMBER")
  .amount(amount)
  .splits(Arrays.asList(split1, split2))
  .merchantAccount("YOUR_MERCHANT_ACCOUNT")
  .paymentMethod(new CheckoutPaymentMethod(cardDetails))
  .returnUrl("https://your-company.example.com/...");

// Send the request
PaymentsApi service = new PaymentsApi(client);
PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID"));
```

#### PHP

```php
<?php
// Adyen PHP API Library v24.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Checkout\Amount;
use Adyen\Model\Checkout\Split;
use Adyen\Model\Checkout\CheckoutPaymentMethod;
use Adyen\Model\Checkout\SplitAmount;
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Service\Checkout\PaymentsApi;

$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
// For the LIVE environment, also include your liveEndpointUrlPrefix.
$client->setEnvironment(Environment::TEST);


// Create the request object(s)
$splitAmount1 = new SplitAmount();
$splitAmount1
  ->setValue(10000);

$amount = new Amount();
$amount
  ->setCurrency("EUR")
  ->setValue(10000);

$split1 = new Split();
$split1
  ->setReference("Your reference for the top-up.")
  ->setAmount($splitAmount1)
  ->setDescription("Your description for the top-up.")
  ->setType("TopUp")
  ->setAccount("BA00000000000000000000001");

$split2 = new Split();
$split2
  ->setReference("Your reference for the transaction fees.")
  ->setDescription("Your description for the transaction fees.")
  ->setType("PaymentFee")
  ->setAccount("BA00000000000000000000001");

$checkoutPaymentMethod = new CheckoutPaymentMethod();
$checkoutPaymentMethod
  ->setNumber("4111111111111111")
  ->setCvc("737")
  ->setHolderName("John Smith")
  ->setExpiryMonth("03")
  ->setExpiryYear("2030")
  ->setType("scheme");

$paymentRequest = new PaymentRequest();
$paymentRequest
  ->setReference("YOUR_ORDER_NUMBER")
  ->setAmount($amount)
  ->setSplits(array($split1, $split2))
  ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT")
  ->setPaymentMethod($checkoutPaymentMethod)
  ->setReturnUrl("https://your-company.example.com/...");

$requestOptions['idempotencyKey'] = 'UUID';

// Send the request
$service = new PaymentsApi($client);
$response = $service->payments($paymentRequest, $requestOptions);
```

#### C\#

```cs
// Adyen .net API Library v27.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Checkout;
using Adyen.Service.Checkout;

// For the LIVE environment, also include your liveEndpointUrlPrefix.
var config = new Config()
{
    XApiKey = "ADYEN_API_KEY",
    Environment = Environment.Test
};
var client = new Client(config);

// Create the request object(s)
SplitAmount splitAmount1 = new SplitAmount
{
  Value = 10000
};

Amount amount = new Amount
{
  Currency = "EUR",
  Value = 10000
};

Split split1 = new Split
{
  Reference = "Your reference for the top-up.",
  Amount = splitAmount1,
  Description = "Your description for the top-up.",
  Type = Split.TypeEnum.TopUp,
  Account = "BA00000000000000000000001"
};

Split split2 = new Split
{
  Reference = "Your reference for the transaction fees.",
  Description = "Your description for the transaction fees.",
  Type = Split.TypeEnum.PaymentFee,
  Account = "BA00000000000000000000001"
};

CardDetails cardDetails = new CardDetails
{
  Number = "4111111111111111",
  Cvc = "737",
  HolderName = "John Smith",
  ExpiryMonth = "03",
  ExpiryYear = "2030",
  Type = CardDetails.TypeEnum.Scheme
};

PaymentRequest paymentRequest = new PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  Splits = new List<Split>{ split1, split2 },
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  PaymentMethod = new CheckoutPaymentMethod(cardDetails),
  ReturnUrl = "https://your-company.example.com/..."
};

// Send the request
var service = new PaymentsService(client);
var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});
```

#### NodeJS (JavaScript)

```js
// Adyen Node API Library v23.3.0
const { Client, CheckoutAPI } = require('@adyen/api-library');

// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const paymentRequest = {
  paymentMethod: {
    type: "scheme",
    number: "4111111111111111",
    cvc: "737",
    expiryMonth: "03",
    expiryYear: "2030",
    holderName: "John Smith"
  },
  amount: {
    value: 10000,
    currency: "EUR"
  },
  reference: "YOUR_ORDER_NUMBER",
  merchantAccount: "YOUR_MERCHANT_ACCOUNT",
  returnUrl: "https://your-company.example.com/...",
  splits: [ {
    amount: {
      value: 10000
    },
    type: "TopUp",
    account: "BA00000000000000000000001",
    reference: "Your reference for the top-up.",
    description: "Your description for the top-up."
  }, {
    type: "PaymentFee",
    account: "BA00000000000000000000001",
    reference: "Your reference for the transaction fees.",
    description: "Your description for the transaction fees."
  } ]
}

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
```

#### Go

```go
// Adyen Go API Library v16.3.0
import (
  "context"
  "github.com/adyen/adyen-go-api-library/v16/src/common"
  "github.com/adyen/adyen-go-api-library/v16/src/adyen"
  "github.com/adyen/adyen-go-api-library/v16/src/checkout"
)
// For the LIVE environment, also include your liveEndpointUrlPrefix.
client := adyen.NewClient(&common.Config{
  ApiKey:      "ADYEN_API_KEY",
  Environment: common.TestEnv,
})

// Create the request object(s)
splitAmount1 := checkout.SplitAmount{
  Value: 10000,
}

amount := checkout.Amount{
  Currency: "EUR",
  Value: 10000,
}

split1 := checkout.Split{
  Reference: common.PtrString("Your reference for the top-up."),
  Amount: &splitAmount1,
  Description: common.PtrString("Your description for the top-up."),
  Type: "TopUp",
  Account: common.PtrString("BA00000000000000000000001"),
}

split2 := checkout.Split{
  Reference: common.PtrString("Your reference for the transaction fees."),
  Description: common.PtrString("Your description for the transaction fees."),
  Type: "PaymentFee",
  Account: common.PtrString("BA00000000000000000000001"),
}

cardDetails := checkout.CardDetails{
  Number: common.PtrString("4111111111111111"),
  Cvc: common.PtrString("737"),
  HolderName: common.PtrString("John Smith"),
  ExpiryMonth: common.PtrString("03"),
  ExpiryYear: common.PtrString("2030"),
  Type: common.PtrString("scheme"),
}

paymentRequest := checkout.PaymentRequest{
  Reference: "YOUR_ORDER_NUMBER",
  Amount: amount,
  Splits: []checkout.Split{
      split1, split2,
  },
  MerchantAccount: "YOUR_MERCHANT_ACCOUNT",
  PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails),
  ReturnUrl: "https://your-company.example.com/...",
}

// Send the request
service := client.Checkout()
req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)
```

#### Python

```py
# Adyen Python API Library v13.3.0
import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.client.platform = "test" # The environment to use library in.

# Create the request object(s)
json_request = {
  "paymentMethod": {
    "type": "scheme",
    "number": "4111111111111111",
    "cvc": "737",
    "expiryMonth": "03",
    "expiryYear": "2030",
    "holderName": "John Smith"
  },
  "amount": {
    "value": 10000,
    "currency": "EUR"
  },
  "reference": "YOUR_ORDER_NUMBER",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
  "returnUrl": "https://your-company.example.com/...",
  "splits": [ {
    "amount": {
      "value": 10000
    },
    "type": "TopUp",
    "account": "BA00000000000000000000001",
    "reference": "Your reference for the top-up.",
    "description": "Your description for the top-up."
  }, {
    "type": "PaymentFee",
    "account": "BA00000000000000000000001",
    "reference": "Your reference for the transaction fees.",
    "description": "Your description for the transaction fees."
  } ]
}

# Send the request
result = adyen.checkout.payments_api.payments(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_API_KEY'
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.env = :test # Set to "live" for live environment

# Create the request object(s)
request_body = {
  :paymentMethod => {
    :type => 'scheme',
    :number => '4111111111111111',
    :cvc => '737',
    :expiryMonth => '03',
    :expiryYear => '2030',
    :holderName => 'John Smith'
  },
  :amount => {
    :value => 10000,
    :currency => 'EUR'
  },
  :reference => 'YOUR_ORDER_NUMBER',
  :merchantAccount => 'YOUR_MERCHANT_ACCOUNT',
  :returnUrl => 'https://your-company.example.com/...',
  :splits => [ {
    :amount => {
      :value => 10000
    },
    :type => 'TopUp',
    :account => 'BA00000000000000000000001',
    :reference => 'Your reference for the top-up.',
    :description => 'Your description for the top-up.'
  }, {
    :type => 'PaymentFee',
    :account => 'BA00000000000000000000001',
    :reference => 'Your reference for the transaction fees.',
    :description => 'Your description for the transaction fees.'
  } ]
}

# Send the request
result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' })
```

#### NodeJS (TypeScript)

```ts
// Adyen Node API Library v23.3.0
import { Client, CheckoutAPI, Types } from "@adyen/api-library";

// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const splitAmount1: Types.checkout.SplitAmount = {
  value: 10000
};

const amount: Types.checkout.Amount = {
  currency: "EUR",
  value: 10000
};

const split1: Types.checkout.Split = {
  reference: "Your reference for the top-up.",
  amount: splitAmount1,
  description: "Your description for the top-up.",
  type: Types.checkout.Split.TypeEnum.TopUp,
  account: "BA00000000000000000000001"
};

const split2: Types.checkout.Split = {
  reference: "Your reference for the transaction fees.",
  description: "Your description for the transaction fees.",
  type: Types.checkout.Split.TypeEnum.PaymentFee,
  account: "BA00000000000000000000001"
};

const cardDetails: Types.checkout.CardDetails = {
  number: "4111111111111111",
  cvc: "737",
  holderName: "John Smith",
  expiryMonth: "03",
  expiryYear: "2030",
  type: Types.checkout.CardDetails.TypeEnum.Scheme
};

const paymentRequest: Types.checkout.PaymentRequest = {
  reference: "YOUR_ORDER_NUMBER",
  amount: amount,
  splits: [split1, split2],
  merchantAccount: "YOUR_MERCHANT_ACCOUNT",
  paymentMethod: cardDetails,
  returnUrl: "https://your-company.example.com/..."
};

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
```

After you make the request, you receive the following response:

**Response**

```json

{
   "additionalData": {...},
   "pspReference": "WNV97K8PPLC52VT5",
   "resultCode": "Authorised",
   "amount": {
       "currency": "EUR",
       "value": 10000
   },
   "merchantReference": "YOUR_ORDER_NUMBER",
   "paymentMethod": {
       "brand": "visa",
       "type": "scheme"
   }
}
```

## Get updates when a top-up is triggered

Use [top-up webhooks](/platforms/top-up-balance-account/top-up-webhooks) to track incoming payment requests related to on-demand top-ups. These webhooks provide the status of the incoming payment request, from the time when Adyen received the request and the payment was authorised, up to when the funds were added to the balance account. These webhooks also inform you if the payment failed.

## Compliance

When you initiate a top-up from your user's verified transfer instrument (bank account), you must ensure that you stay compliant with the direct debit regulations in your user's region. If your user's bank account is in the SEPA zone or the UK, you must do the following:

### SEPA Direct Debit

To initiate top-ups from bank accounts in the SEPA zone using SEPA Direct Debit, your users must first accept a mandate that authorizes you to debit their accounts. We recommend that you use the following text for the mandate:

> *By providing your payment details and confirming this payment, you authorize (A) {Name of your platform} and Adyen, our payment service provider, to send instructions to your bank to debit your account and (B) your bank to debit your account by the payment instruction. As part of your rights, you're entitled to a refund from your bank under the terms and conditions of your agreement with your bank. You must claim a refund within 8 weeks from the date your account was debited. You can request a statement from your bank explaining your rights.*

Your users only need to accept this mandate once. You can either add the recommended text to their service agreement document with your platform, or send it to them in an email.

### BACS Direct Debit

For each top-up you initiate from bank accounts in the UK using BACS Direct Debit, your users must confirm the following:

* They authorize you to debit their bank account to cover negative balances on their balance account.
* The bank account is in their name.
* They are the only signatory required to authorize the direct debit on this account.

We recommend that you use the following text for the confirmations:

> * *I agree that {name of your platform} can deduct funds from my bank account to cover negative balances on my balance account.*
>
> * *I confirm that the bank account is in my name and that I am the only signatory required to authorize the direct debit on this bank account.*

You must also send an advance notice to your users by email for each top-up you initiate. According to scheme rules, your users may file a chargeback when they do not receive a notification at least 10 days before a charge. The notice must contain the following:

* The total amount to be debited from your user’s account.
* The direct debit due date (day, month, and year). This is 2 business days after the top-up is initiated.
* The [recurringDetailReference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-BacsDirectDebitDetails-storedPaymentMethodId) of the payment.
* The name of your platform.
* Your contact phone number and email address.

We recommend that you use the following text for the notice:

> *Subject: ADVANCE NOTICE OF DIRECT DEBIT COLLECTION\
> \
> We will debit your bank account on or shortly after **{Settlement date (dd/mm/yy)}**. This payment will appear on your bank statement as **ADYEN RE&#x20;****{Your platform name}**, with recurring detail reference {Your `recurringDetailReference`}.\
> \
> Name of your user: {Your user's legal entity name}\
> Direct debit amount due: {Top-up amount}\
> \
> Please check the details provided. If you have any queries about this notification, or would like to cancel or make changes, please contact {Your company name and telephone number}.\
> \
> You have the right to cancel your direct debit at any time. Bacs Direct Debits are covered by the Direct Debit Guarantee.*
