--- title: "Surcharge" description: "Enable your users to pass on payment acceptance fees to their customers as a surcharge to their payments." url: "https://docs.adyen.com/platforms/online-payments/surcharge" source_url: "https://docs.adyen.com/platforms/online-payments/surcharge.md" canonical: "https://docs.adyen.com/platforms/online-payments/surcharge" last_modified: "2023-02-10T14:17:00+01:00" language: "en" --- # Surcharge Enable your users to pass on payment acceptance fees to their customers as a surcharge to their payments. Payment brands, such as card schemes and debit network providers, charge a fee for accepting payments on their payment network, called a payment acceptance fee. As a platform, you must have agreements in place with your users about how the payment acceptance fee is charged for each payment. Your users can pass on these costs to their customers by adding a surcharge to their payments. Similar to the other [transaction fees](/platforms/in-person-payments/transaction-fees), you can use split instructions to define how to book the surcharge. By default, the surcharge amount on a payment is booked to your liable balance account. However, you can book this amount directly to your user's balance account. ## Requirements | Requirement | Description | | | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an Adyen for Platforms implementation with an [API-only online payments](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=API%20only\&version=latest) integration that can accept card payments with either:- [Raw card data](/payment-methods/cards/raw-card-data/) - [Encrypted card data](/payment-methods/cards/custom-card-integration/) | | | **[API credential roles](/development-resources/api-credentials/roles/)** | You need an API credential with an API key and the **Checkout webservice role**. | | | **[Webhooks](/development-resources/webhooks)** | Ensure that your server can receive and accept [standard webhooks](/development-resources/webhooks). To track fund movements in your platform, you can subscribe to any of the following webhooks:- [Transfer webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/overview): Notifies you of all fund movements and transfer status changes. - [Transaction webhooks](https://docs.adyen.com/api-explorer/transaction-webhooks/latest/overview): Notifies you when funds are credited to or debited from a balance account. | | | **Limitations** | Make sure that you take into account the following:- The surcharge feature is in pilot, and restrictions may apply. Reach out to your Adyen contact to be part of the pilot. - Surcharges cannot be applied to [authorization adjustments](/online-payments/adjust-authorisation/) or [overcaptures](/get-started-with-adyen/adyen-glossary#overcapture). The surcharge amount cannot be higher than the surcharge amount that was shown to the customer at the moment of purchase. | | | **Setup steps** | Before you begin:- Make sure you comply with the general and regional compliance requirements mentioned in our [Surcharge compliance guide](/development-resources/surcharge-compliance/). - We recommend consulting your own legal advisor on compliance with regulatory requirements, and reviewing the scheme rules for the latest information. | | ## Compliance Surcharges must comply with legal, regulatory, and card scheme requirements. For example, schemes require that you provide signage to inform customers about the payment methods that are subject to surcharges, and the related costs such as the surcharge percentage. Surcharging is also subject to specific local/jurisdictional restrictions. For example, in the European Economic Area (EEA) surcharges are not allowed on payments made with a consumer card that was issued in the EEA. And in the US surcharges are not allowed on payments made with a debit card. The Adyen surcharge feature does not include automated global compliance enforcement. You must validate your setup against the compliance considerations and local mandates. We strongly recommend you consult your own legal advisor on compliance with regulatory and legal implications and use the correct settings based on our [Surcharge compliance guide](/development-resources/surcharge-compliance). ## How it works When your user's customer pays: 1. You collect the customer's card details on your checkout page. 2. From your server, you make a [/cardDetails](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails) request using the customer's card details, to get the information that helps to make a decision about the surcharge. 3. The logic you implemented decides if a surcharge is allowed and calculates the surcharge amount, using the data from the [/cardDetails](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails) response. 4. You display the surcharge amount on your checkout page. 5. When the customer proceeds to pay, you make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request that includes the surcharge amount. ## Get card details Use the customer's raw or encrypted card number to make an API request that retrieves the details of the card that helps to determine whether you can apply surcharge to a payment. 1. In your payment form, collect the card number of the customer with either of the following: * [Custom payment form to collect raw card data](/payment-methods/cards/raw-card-data/#build-your-payment-form-for-cards) * [Custom Card Component integration to collect encrypted card data](/payment-methods/cards/custom-card-integration/) 2. From your server, make a [/cardDetails](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails) request, including: | Parameter | Required | Description | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [cardNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#request-cardNumber) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | If you accept card payments using [raw card data](/payment-methods/cards/raw-card-data/), pass this field. Minimum length: first eight digits of the card number. We recommend to pass the full card number for the best result.You must be [fully PCI compliant](/development-resources/pci-dss-compliance-guide/) to collect raw card data. | | [encryptedCardNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#request-encryptedCardNumber) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | If you accept card payments using our [Custom Card Component with encrypted card data](/payment-methods/cards/custom-card-integration/), pass this field. The encrypted card number you get in the `state.data` when the [Component](/payment-methods/cards/custom-card-integration/#show-the-available-cards-in-your-payment-form) calls the `onSubmit` event. | | [merchantAccount](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#request-merchantAccount) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The name of your merchant account. | **Make a request to get information about the card** #### curl ```bash curl https://checkout-test.adyen.com/v71/cardDetails \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "encryptedCardNumber": "adyenjs_0_1_18$MT6ppy0FAMVMLH..." }' ``` #### Java ```java // Adyen Java API Library v40.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) CardDetailsRequest cardDetailsRequest = new CardDetailsRequest() .encryptedCardNumber("adyenjs_0_1_18$MT6ppy0FAMVMLH...") .merchantAccount("YOUR_MERCHANT_ACCOUNT"); // Send the request PaymentsApi service = new PaymentsApi(client); CardDetailsResponse response = service.cardDetails(cardDetailsRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $cardDetailsRequest = new CardDetailsRequest(); $cardDetailsRequest ->setEncryptedCardNumber("adyenjs_0_1_18\$MT6ppy0FAMVMLH...") ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->cardDetails($cardDetailsRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v32.2.1 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) CardDetailsRequest cardDetailsRequest = new CardDetailsRequest { EncryptedCardNumber = "adyenjs_0_1_18$MT6ppy0FAMVMLH...", MerchantAccount = "YOUR_MERCHANT_ACCOUNT" }; // Send the request var service = new PaymentsService(client); var response = service.CardDetails(cardDetailsRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const cardDetailsRequest = { merchantAccount: "YOUR_MERCHANT_ACCOUNT", encryptedCardNumber: "adyenjs_0_1_18$MT6ppy0FAMVMLH..." } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.cardDetails(cardDetailsRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/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) cardDetailsRequest := checkout.CardDetailsRequest{ EncryptedCardNumber: common.PtrString("adyenjs_0_1_18$MT6ppy0FAMVMLH..."), MerchantAccount: "YOUR_MERCHANT_ACCOUNT", } // Send the request service := client.Checkout() req := service.PaymentsApi.CardDetailsInput().IdempotencyKey("UUID").CardDetailsRequest(cardDetailsRequest) res, httpRes, err := service.PaymentsApi.CardDetails(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.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 = { "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "encryptedCardNumber": "adyenjs_0_1_18$MT6ppy0FAMVMLH..." } # Send the request result = adyen.checkout.payments_api.card_details(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 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 = { :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :encryptedCardNumber => 'adyenjs_0_1_18$MT6ppy0FAMVMLH...' } # Send the request result = adyen.checkout.payments_api.card_details(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const cardDetailsRequest: Types.checkout.CardDetailsRequest = { encryptedCardNumber: "adyenjs_0_1_18$MT6ppy0FAMVMLH...", merchantAccount: "YOUR_MERCHANT_ACCOUNT" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.cardDetails(cardDetailsRequest, { idempotencyKey: "UUID" }); ``` 3. In the response, note the following data to: * Determine whether a surcharge is applicable for a payment. * Calculate the surcharge amount that you can apply. | Response parameter | Description | | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | [brands.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#responses-200-brands-type) | The name of the card brand. | | [fundingSource](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#responses-200-fundingSource) | The funding source of the card, for example, **DEBIT**, **CREDIT**, or **PREPAID**. | | [isCardCommercial](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#responses-200-isCardCommercial) | Indicates if this is a commercial card or a consumer card. When **true**, it is a commercial card. When **false**, it is a consumer card. | | [issuingCountryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/cardDetails#responses-200-issuingCountryCode) | The two-letter country code of the country where the card was issued. | **Example /cardDetails response** ```json { "brands": [ { "type": "visa", "supported": true }, { "type": "cartebancaire", "supported": true } ], "fundingSource": "CREDIT", "isCardCommercial": false, "issuingCountryCode": "US" } ``` 4. Use the data from the response to build your logic that determines whether you can apply surcharge on a payment with this card, and calculate the surcharge amount. Refer to our [Surcharge compliance guide](/development-resources/surcharge-compliance/) when determining to which transactions you can apply a surcharge. ## Make a payment with a surcharge A surcharge is a type of transaction fee imposed by the card scheme, paid by your user's customer. Similar to the other [transaction fees](/platforms/online-payments/transaction-fees), you can use split instructions to define how to book the surcharge. You can book the surcharge amount either to your user's balance account, or to your liable balance account. 1. Make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request with your [API only with raw card data integration](/payment-methods/cards/raw-card-data/#make-a-payment), or with your [API only with encrypted card data integration](/payment-methods/cards/custom-card-integration/). 2. In your request include a [surcharge](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-surcharge) object, that specifies the `value` of the surcharge you apply to the transaction. 3. Calculate the value you need to pass in the `amount.value` field in your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request by adding the surcharge amount to the original transaction amount. 4. In the [splits](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits) array, add a split item for the surcharge. 5. For the split item of the surcharge, specify the following fields: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [account](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-account) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The `balanceAccountId` of one of your user's balance accounts that will receive the surcharge amount. | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-amount-currency) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The currency of the part of the surcharge you want to book the specified `account`. | | [amount.value](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-amount-value) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The value of the surcharge you want to book to the specified `account`. | | [type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-type) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Defines the part of the payment you want to book to the specified `account`. Set to **Surcharge**. | | [reference](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-reference) | ![Recommended](/user/pages/reuse/image-library/01.icons/recommended/recommended.svg?decoding=auto\&fetchpriority=auto) | Your reference for the surcharge, reflected in the [Balance Platform Accounting Report](/platforms/reports-and-fees/balance-platform-accounting-report). You need this for reconciliation purposes. | | [description](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits-reference) | | Your description for the surcharge, reflected in the [Balance Platform Accounting Report](/platforms/reports-and-fees/balance-platform-accounting-report). | ### Example split payment with surcharge Here is an example of how you can split the payment and surcharge amount at the time of payment, when a customer pays EUR 400.00. * EUR 394.00 are booked to your user's balance account as payment for the goods or services. * EUR 2.00 are booked to your user's balance account as the surcharge. * EUR 4.00 are booked to your liable balance account as your platform's commission. * All transaction fees are booked to your user's balance account, deducted from the sale amount. **Split funds at time of payment** #### 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": 40000, "currency": "EUR" }, "surcharge": { "value": 200 }, "store": "USER_STORE_REFERENCE", "reference": "YOUR_ORDER_NUMBER", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "returnUrl": "https://your-company.example.com/...", "splits":[ { "amount": { "value": 39400 }, "type": "BalanceAccount", "account": "BA00000000000000000000001", "reference": "Your reference for the payment", "description": "Your description for the payment" }, { "amount": { "value": 400 }, "type": "Commission", "reference": "Your reference for the commission", "description": "Your description for the commission" }, { "amount": { "value": 200 }, "type": "Surcharge", "account": "BA00000000000000000000001", "reference": "Your reference for the surcharge", "description": "Your description for the surcharge" }, { "type": "PaymentFee", "account": "BA00000000000000000000001", "reference": "Your reference for the transaction fees", "description": "Your description for the transaction fees" } ] }' ``` #### Java ```java // Adyen Java API Library v40.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(39400L); SplitAmount splitAmount2 = new SplitAmount() .value(400L); SplitAmount splitAmount3 = new SplitAmount() .value(200L); Surcharge surcharge = new Surcharge() .value(200L); Amount amount = new Amount() .currency("EUR") .value(40000L); Split split1 = new Split() .reference("Your reference for the payment") .amount(splitAmount1) .description("Your description for the payment") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000001"); Split split2 = new Split() .reference("Your reference for the commission") .amount(splitAmount2) .description("Your description for the commission") .type(Split.TypeEnum.COMMISSION); Split split3 = new Split() .reference("Your reference for the surcharge") .amount(splitAmount3) .description("Your description for the surcharge") .type(Split.TypeEnum.SURCHARGE) .account("BA00000000000000000000001"); Split split4 = 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() .surcharge(surcharge) .reference("YOUR_ORDER_NUMBER") .amount(amount) .splits(Arrays.asList(split1, split2, split3, split4)) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .paymentMethod(new CheckoutPaymentMethod(cardDetails)) .store("USER_STORE_REFERENCE") .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 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(39400); $splitAmount2 = new SplitAmount(); $splitAmount2 ->setValue(400); $splitAmount3 = new SplitAmount(); $splitAmount3 ->setValue(200); $surcharge = new Surcharge(); $surcharge ->setValue(200); $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(40000); $split1 = new Split(); $split1 ->setReference("Your reference for the payment") ->setAmount($splitAmount1) ->setDescription("Your description for the payment") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000001"); $split2 = new Split(); $split2 ->setReference("Your reference for the commission") ->setAmount($splitAmount2) ->setDescription("Your description for the commission") ->setType("Commission"); $split3 = new Split(); $split3 ->setReference("Your reference for the surcharge") ->setAmount($splitAmount3) ->setDescription("Your description for the surcharge") ->setType("Surcharge") ->setAccount("BA00000000000000000000001"); $split4 = new Split(); $split4 ->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 ->setSurcharge($surcharge) ->setReference("YOUR_ORDER_NUMBER") ->setAmount($amount) ->setSplits(array($split1, $split2, $split3, $split4)) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setPaymentMethod($checkoutPaymentMethod) ->setStore("USER_STORE_REFERENCE") ->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 v32.2.1 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 = 39400 }; SplitAmount splitAmount2 = new SplitAmount { Value = 400 }; SplitAmount splitAmount3 = new SplitAmount { Value = 200 }; Surcharge surcharge = new Surcharge { Value = 200 }; Amount amount = new Amount { Currency = "EUR", Value = 40000 }; Split split1 = new Split { Reference = "Your reference for the payment", Amount = splitAmount1, Description = "Your description for the payment", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000001" }; Split split2 = new Split { Reference = "Your reference for the commission", Amount = splitAmount2, Description = "Your description for the commission", Type = Split.TypeEnum.Commission }; Split split3 = new Split { Reference = "Your reference for the surcharge", Amount = splitAmount3, Description = "Your description for the surcharge", Type = Split.TypeEnum.Surcharge, Account = "BA00000000000000000000001" }; Split split4 = 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 { Surcharge = surcharge, Reference = "YOUR_ORDER_NUMBER", Amount = amount, Splits = new List{ split1, split2, split3, split4 }, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PaymentMethod = new CheckoutPaymentMethod(cardDetails), Store = "USER_STORE_REFERENCE", 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 v30.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRequest = { paymentMethod: { type: "scheme", number: "4111111111111111", cvc: "737", expiryMonth: "03", expiryYear: "2030", holderName: "John Smith" }, amount: { value: 40000, currency: "EUR" }, surcharge: { value: 200 }, store: "USER_STORE_REFERENCE", reference: "YOUR_ORDER_NUMBER", merchantAccount: "YOUR_MERCHANT_ACCOUNT", returnUrl: "https://your-company.example.com/...", splits: [ { amount: { value: 39400 }, type: "BalanceAccount", account: "BA00000000000000000000001", reference: "Your reference for the payment", description: "Your description for the payment" }, { amount: { value: 400 }, type: "Commission", reference: "Your reference for the commission", description: "Your description for the commission" }, { amount: { value: 200 }, type: "Surcharge", account: "BA00000000000000000000001", reference: "Your reference for the surcharge", description: "Your description for the surcharge" }, { 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 v21.1.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/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: 39400, } splitAmount2 := checkout.SplitAmount{ Value: 400, } splitAmount3 := checkout.SplitAmount{ Value: 200, } surcharge := checkout.Surcharge{ Value: 200, } amount := checkout.Amount{ Currency: "EUR", Value: 40000, } split1 := checkout.Split{ Reference: common.PtrString("Your reference for the payment"), Amount: &splitAmount1, Description: common.PtrString("Your description for the payment"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000001"), } split2 := checkout.Split{ Reference: common.PtrString("Your reference for the commission"), Amount: &splitAmount2, Description: common.PtrString("Your description for the commission"), Type: "Commission", } split3 := checkout.Split{ Reference: common.PtrString("Your reference for the surcharge"), Amount: &splitAmount3, Description: common.PtrString("Your description for the surcharge"), Type: "Surcharge", Account: common.PtrString("BA00000000000000000000001"), } split4 := 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{ Surcharge: &surcharge, Reference: "YOUR_ORDER_NUMBER", Amount: amount, Splits: []checkout.Split{ split1, split2, split3, split4, }, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails), Store: common.PtrString("USER_STORE_REFERENCE"), 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 v14.0.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": 40000, "currency": "EUR" }, "surcharge": { "value": 200 }, "store": "USER_STORE_REFERENCE", "reference": "YOUR_ORDER_NUMBER", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "returnUrl": "https://your-company.example.com/...", "splits": [ { "amount": { "value": 39400 }, "type": "BalanceAccount", "account": "BA00000000000000000000001", "reference": "Your reference for the payment", "description": "Your description for the payment" }, { "amount": { "value": 400 }, "type": "Commission", "reference": "Your reference for the commission", "description": "Your description for the commission" }, { "amount": { "value": 200 }, "type": "Surcharge", "account": "BA00000000000000000000001", "reference": "Your reference for the surcharge", "description": "Your description for the surcharge" }, { "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 v11.0.0 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 => 40000, :currency => 'EUR' }, :surcharge => { :value => 200 }, :store => 'USER_STORE_REFERENCE', :reference => 'YOUR_ORDER_NUMBER', :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :returnUrl => 'https://your-company.example.com/...', :splits => [ { :amount => { :value => 39400 }, :type => 'BalanceAccount', :account => 'BA00000000000000000000001', :reference => 'Your reference for the payment', :description => 'Your description for the payment' }, { :amount => { :value => 400 }, :type => 'Commission', :reference => 'Your reference for the commission', :description => 'Your description for the commission' }, { :amount => { :value => 200 }, :type => 'Surcharge', :account => 'BA00000000000000000000001', :reference => 'Your reference for the surcharge', :description => 'Your description for the surcharge' }, { :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 v30.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const splitAmount1: Types.checkout.SplitAmount = { value: 39400 }; const splitAmount2: Types.checkout.SplitAmount = { value: 400 }; const splitAmount3: Types.checkout.SplitAmount = { value: 200 }; const surcharge: Types.checkout.Surcharge = { value: 200 }; const amount: Types.checkout.Amount = { currency: "EUR", value: 40000 }; const split1: Types.checkout.Split = { reference: "Your reference for the payment", amount: splitAmount1, description: "Your description for the payment", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000001" }; const split2: Types.checkout.Split = { reference: "Your reference for the commission", amount: splitAmount2, description: "Your description for the commission", type: Types.checkout.Split.TypeEnum.Commission }; const split3: Types.checkout.Split = { reference: "Your reference for the surcharge", amount: splitAmount3, description: "Your description for the surcharge", type: Types.checkout.Split.TypeEnum.Surcharge, account: "BA00000000000000000000001" }; const split4: 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 = { surcharge: surcharge, reference: "YOUR_ORDER_NUMBER", amount: amount, splits: [split1, split2, split3, split4], merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: cardDetails, store: "USER_STORE_REFERENCE", returnUrl: "https://your-company.example.com/..." }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` In the response, note that your `reference` from the request is returned as the `merchantReference`. You need this information for reconciliation. **Response** ```json { "additionalData": {...}, "pspReference": "HGGKZCD6J3RZNN82", "resultCode": "Authorised", "amount": { "currency": "EUR", "value": 40000 }, ... "merchantReference": "YOUR_ORDER_NUMBER", "paymentMethod": { "brand": "visa", "type": "scheme" } } ``` ## Track fund movements To track the status of the fund transfers initiated by a surcharge: 1. Listen to the following webhooks: * [Transfer webhooks](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/overview): 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 funds will be credited to balance accounts, and [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhooks after every status change. * [Transaction webhooks](https://docs.adyen.com/api-explorer/transaction-webhooks/latest/overview): Adyen sends a [balancePlatform.transaction.created](https://docs.adyen.com/api-explorer/transaction-webhooks/latest/post/balancePlatform.transaction.created) webhook to inform your server that funds have been credited to a balance account. 2. Acknowledge the webhooks. We send these webhooks for every split item in the payment. 3. In the [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook payload, note that the `event` array includes all previous transfer events, and the `sequenceNumber` defines the number of webhooks sent for the transfer, including the current one. ### Webhook examples The following examples show the webhooks you receive for a surcharge. We send webhooks for each balance account involved in the payment, and each split of the payment amount, including the surcharge. You can identify surcharge-related transfer webhooks by the following values: | Parameter | Description | Value | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | | [category](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-category) | Specifies the category of the transfer. | **platformPayment** | | [direction](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-direction) | The direction of the transfer based on the balance account. | **incoming** | | [type](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-type) | Specifies the type of the transfer. | **payment** | | [platformPaymentType](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-categoryData-PlatformPayment-platformPaymentType) | Specifies the nature of each transfer on the balance platform. This parameter helps categorize transfers so you can reconcile transactions at a later time using the [Balance Platform Accounting Report](/platforms/reports-and-fees/balance-platform-accounting-report/). | **Surcharge** | ** ### 1. Incoming transfer received When a transfer request is received to credit funds for the surcharge to your user's balance account, Adyen sends a [balancePlatform.transfer.created](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created) webhook with `status` **received** and `direction` **incoming**. The webhook provides information about the transfer, such as the payment and split references and which user and balance account is credited with the funds. **Transfer received** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 200 }, "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": 200 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "PPKFQ89R6QRXGN82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Surcharge", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2025-10-20T13:30:05+02:00", "description": "Your description for the surcharge", "direction": "incoming", "events": [ { "bookingDate": "2025-10-20T13:30:18+02:00", "id": "SKRL00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": 200 } ], "status": "received", "type": "accounting" } ], "id": "JN4227222422265", "reason": "approved", "reference": "Your reference for the surcharge", "sequenceNumber": 1, "status": "received", "type": "payment" }, "environment": "test", "type": "balancePlatform.transfer.created" } ``` ** ### 2. Incoming transfer authorized When the transfer request is authorized, Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook with `status` **authorised**. **Transfer authorized** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 200 }, "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": 200 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "PPKFQ89R6QRXGN82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Surcharge", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2025-10-20T13:30:05+02:00", "description": "Your description for the surcharge", "direction": "incoming", "events": [ { "bookingDate": "2025-10-20T13:30:18+02:00", "id": "SKRL00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": 200 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2025-10-20T13:30:18+02:00", "id": "SKRL00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": -200, "reserved": 200 } ], "status": "authorised", "type": "accounting" } ], "id": "JN4227222422265", "reason": "approved", "reference": "Your reference for the surcharge", "sequenceNumber": 2, "status": "authorised", "type": "payment" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 3. Incoming transfer captured When the funds are credited to your user's balance account, Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook with `status` **captured** and the `transactionId`. **Transfer captured** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 200 }, "balanceAccount": { "description": "Your description for the balance account", "id": "BA00000000000000000000001", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "balance": 200, "currency": "EUR", "received": 0, "reserved": 0 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "PPKFQ89R6QRXGN82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Surcharge", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2025-10-20T13:30:05+02:00", "description": "Your description for the surcharge", "direction": "incoming", "events": [ { "bookingDate": "2025-10-20T13:30:18+02:00", "id": "SKRL00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": 200 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2025-10-20T13:30:18+02:00", "id": "SKRL00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": -200, "reserved": 200 } ], "status": "authorised", "type": "accounting" }, { "bookingDate": "2025-10-20T13:30:20+02:00", "id": "SKRL00000000000000000000000003", "mutations": [ { "balance": 200, "currency": "EUR", "received": 0, "reserved": -200 } ], "status": "captured", "transactionId": "EVJN42272224222B5JB8BRC84N686ZEUR", "type": "accounting", "valueDate": "2023-03-01T00:00:00+02:00" } ], "id": "JN4227222422265", "reason": "approved", "reference": "Your reference for the surcharge", "sequenceNumber": 3, "status": "captured", "type": "payment" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 4. Transaction booked When the funds are credited, Adyen also sends a [balancePlatform.transaction.created](https://docs.adyen.com/api-explorer/transaction-webhooks/latest/post/balancePlatform.transaction.created) webhook, which includes information about the related transaction. **Transaction created** ```json { "data": { "id": "EVJN42272224222B5JB8BRC84N686ZEUR", "amount": { "value": 200, "currency": "EUR" }, "status": "booked", "transfer": { "id": "JN4227222422265", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "PPKFQ89R6QRXGN82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Surcharge", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "reference": "Your reference for the surcharge" }, "valueDate": "2023-03-01T00:00:00+02:00", "bookingDate": "2025-10-20T13:30:20+02:00", "creationDate": "2025-10-20T13:30:05+02:00", "accountHolder": { "id": "AH00000000000000000000001", "description": "Your description for the account holder", "reference": "Your reference for the account holder" }, "balanceAccount": { "id": "BA00000000000000000000001", "description": "Your description for the balance account", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM" }, "type": "balancePlatform.transaction.created", "environment": "test" } ``` ## Reports and reconciliation To have full visibility of the surcharge amounts that were added to payments, we strongly recommend you [add an extra column](/reporting/invoice-reconciliation/payment-accounting-report/#configure-report-columns) **Surcharge Amount** to the following reports: * [Payment Accounting Report](/reporting/invoice-reconciliation/payment-accounting-report) (PAR) * [Settlement Detail Report](/reporting/settlement-reconciliation/transaction-level/settlement-details-report) (SDR) If you specify the split type **Surcharge** in the payment request or in the split configuration, a separate incoming transfer is generated for the surcharge amount. The following reports are affected: * The [Balance Platform Accounting Report](/platforms/reports-and-fees/balance-platform-accounting-report) (BPAR) contains extra lines with information related to surcharges. * The [Balance Platform Statement Report](/platforms/reports-and-fees/statement-report) (BPSR) contains extra lines showing the impact of the surcharges on the balance account. ## See also * [Surcharge compliance guide](/development-resources/surcharge-compliance) * [Surcharge with in-person payments](/platforms/in-person-payments/surcharge) * [Split payments automatically](/platforms/automatic-split-configuration)