--- title: "Split chargebacks" description: "Learn how to handle the disputed amount during a chargeback." url: "https://docs.adyen.com/platforms/online-payments/split-transactions/split-chargebacks" source_url: "https://docs.adyen.com/platforms/online-payments/split-transactions/split-chargebacks.md" canonical: "https://docs.adyen.com/platforms/online-payments/split-transactions/split-chargebacks" last_modified: "2023-04-28T17:05:00+02:00" language: "en" --- # Split chargebacks Learn how to handle the disputed amount during a chargeback. [View source](/platforms/online-payments/split-transactions/split-chargebacks.md) If a payment is reversed by a customer of your user, and the issuer has started a [dispute process](/risk-management/understanding-disputes/dispute-process-and-flow), Adyen withdraws the disputed funds from your platform's liable balance account. This transaction is called a **chargeback**. You can either accept the chargeback on behalf of your user, or ask them to supply defense documents and upload them to Adyen. ## Requirements If your platform can already process online payments, there are no special requirements for handling chargebacks. ## Chargeback events If the chargeback is defended successfully, or the customer repays the funds, Adyen transfers the funds back to your platform's liable balance account. This transaction is called a **chargeback reversal**. If the issuing bank declines the material submitted during defense of the original chargeback, the disputed amount is deducted from your platform's liable balance account again. This transaction is called a **second chargeback**. This means that during the dispute process, the entire disputed amount is debited (chargeback or second chargeback) or credited (chargeback reversal) to your platform's liable balance account. You can change this behavior by booking the disputed amount to any of the balance accounts in your platform, or even splitting it between the accounts. ## Chargeback logic You can choose between three different ways to handle potential chargeback events: * Book the full disputed amount to your platform's liable balance account. * Book the full disputed amount to one of your user's balance accounts. * Book different amounts to different balance accounts, according to the split ratio defined in the `splits` array of your [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-splits) or [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions#request-splits) request. You can define the chargeback logic on two levels: * **Balance platform level**: Set a default logic to handle all chargeback events. Contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to configure a default logic on balance platform level. If you choose the logic that deducts the amount from a single balance account, you must specify the balance account from which you want to deduct all chargebacks that occur on your platform. * **Payment level**: Set a logic for each payment. The chargeback event handling logic you set at payment level overrides any default logic set at balance platform level. If you decide to set the chargeback logic on a payment level, you can do so in your payment or capture request. The chargeback logic sent in a capture request overrides the logic you specified in your payment request. ## Configure the chargeback logic for a payment To configure the logic for a potential chargeback: 1. Make a [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments), [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions), or [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/captures) request. 2. Depending on how you want to handle the chargeback, include the following parameters and values in the `platformChargebackLogic` object. | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `behavior` | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The method of handling potential chargebacks. Possible values:- **deductFromLiableAccount**: Deducts the full amount from your platform's liable balance account. - **deductFromOneBalanceAccount**: Deducts the full amount from the balance account specified in `targetAccount`. - **deductAccordingToSplitRatio**: Deducts the funds according to the split ratio defined in the `splits` array. | | `targetAccount` | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if `behavior` is **deductFromOneBalanceAccount** The ID of the balance account to which the disputed amount is booked. | | `costAllocationAccount` | | The ID of the balance account to which you want to book the fees incurred by the chargeback. | 3. Listen to the [CHARGEBACK](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CHARGEBACK) webhooks to get notified when a chargeback occurs in your platform. ### Troubleshooting The API request validates only the format of the split instructions, **not** the balance accounts specified in the request. This means that even if the transaction is successful, it is possible that the funds are not credited to/deducted from the specified balance account. If the balance account does not exist, or it is linked to an account holder with a **closed** [status](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/accountHolders#responses-200-status), the full transaction and its fees are booked to your platform's liable balance account. To correct the balances, you can [transfer the funds](/platforms/internal-fund-transfers) between the balance accounts in your platform. ## Use cases The following tabs show you examples of the different ways to handle chargebacks in a payment or capture request. ### Tab: Liable balance account To deduct the full disputed amount from your liable balance account: 1. Make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments), [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions), or [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/captures) request.\ In the `platformChargebackLogic` object, include the following parameters and values: | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `behavior` | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The method of handling chargebacks. Set this to **deductFromLiableAccount**. | | `costAllocationAccount` | | The ID of the balance account to which the chargeback fees are booked. By default, this is your liable balance account. | The following example shows the full payment request, where a potential chargeback will be booked to your liable balance account. **Book disputed amount to your liable balance account** #### 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 '{ "amount": { "currency": "USD", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductFromLiableAccount" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] }' ``` #### 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(7000L); SplitAmount splitAmount2 = new SplitAmount() .value(2000L); SplitAmount splitAmount3 = new SplitAmount() .value(1000L); Amount amount = new Amount() .currency("USD") .value(10000L); Split split1 = new Split() .reference("YOUR_REFERENCE_1") .amount(splitAmount1) .description("YOUR_DESCRIPTION_1") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000001"); Split split2 = new Split() .reference("YOUR_REFERENCE_2") .amount(splitAmount2) .description("YOUR_DESCRIPTION_2") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000002"); Split split3 = new Split() .reference("YOUR_REFERENCE_3") .amount(splitAmount3) .description("YOUR_DESCRIPTION_3") .type(Split.TypeEnum.COMMISSION); PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic() .behavior(PlatformChargebackLogic.BehaviorEnum.DEDUCTFROMLIABLEACCOUNT); CardDetails cardDetails = new CardDetails() .cvc("737") .number("4111111111111111") .holderName("John Smith") .expiryMonth("03") .expiryYear("2030") .type(CardDetails.TypeEnum.SCHEME); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_PAYMENT_REFERENCE") .amount(amount) .splits(Arrays.asList(split1, split2, split3)) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .platformChargebackLogic(platformChargebackLogic) .paymentMethod(new CheckoutPaymentMethod(cardDetails)); // 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(7000); $splitAmount2 = new SplitAmount(); $splitAmount2 ->setValue(2000); $splitAmount3 = new SplitAmount(); $splitAmount3 ->setValue(1000); $amount = new Amount(); $amount ->setCurrency("USD") ->setValue(10000); $split1 = new Split(); $split1 ->setReference("YOUR_REFERENCE_1") ->setAmount($splitAmount1) ->setDescription("YOUR_DESCRIPTION_1") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000001"); $split2 = new Split(); $split2 ->setReference("YOUR_REFERENCE_2") ->setAmount($splitAmount2) ->setDescription("YOUR_DESCRIPTION_2") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000002"); $split3 = new Split(); $split3 ->setReference("YOUR_REFERENCE_3") ->setAmount($splitAmount3) ->setDescription("YOUR_DESCRIPTION_3") ->setType("Commission"); $platformChargebackLogic = new PlatformChargebackLogic(); $platformChargebackLogic ->setBehavior("deductFromLiableAccount"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setCvc("737") ->setNumber("4111111111111111") ->setHolderName("John Smith") ->setExpiryMonth("03") ->setExpiryYear("2030") ->setType("scheme"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setAmount($amount) ->setSplits(array($split1, $split2, $split3)) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setPlatformChargebackLogic($platformChargebackLogic) ->setPaymentMethod($checkoutPaymentMethod); $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 = 7000 }; SplitAmount splitAmount2 = new SplitAmount { Value = 2000 }; SplitAmount splitAmount3 = new SplitAmount { Value = 1000 }; Amount amount = new Amount { Currency = "USD", Value = 10000 }; Split split1 = new Split { Reference = "YOUR_REFERENCE_1", Amount = splitAmount1, Description = "YOUR_DESCRIPTION_1", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000001" }; Split split2 = new Split { Reference = "YOUR_REFERENCE_2", Amount = splitAmount2, Description = "YOUR_DESCRIPTION_2", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000002" }; Split split3 = new Split { Reference = "YOUR_REFERENCE_3", Amount = splitAmount3, Description = "YOUR_DESCRIPTION_3", Type = Split.TypeEnum.Commission }; PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic { Behavior = PlatformChargebackLogic.BehaviorEnum.DeductFromLiableAccount }; CardDetails cardDetails = new CardDetails { Cvc = "737", Number = "4111111111111111", HolderName = "John Smith", ExpiryMonth = "03", ExpiryYear = "2030", Type = CardDetails.TypeEnum.Scheme }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_PAYMENT_REFERENCE", Amount = amount, Splits = new List{ split1, split2, split3 }, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic = platformChargebackLogic, PaymentMethod = new CheckoutPaymentMethod(cardDetails) }; // 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 = { amount: { currency: "USD", value: 10000 }, merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: { cvc: "737", expiryMonth: "03", expiryYear: "2030", holderName: "John Smith", number: "4111111111111111", type: "scheme" }, reference: "YOUR_PAYMENT_REFERENCE", platformChargebackLogic: { behavior: "deductFromLiableAccount" }, splits: [ { account: "BA00000000000000000000001", amount: { value: 7000 }, description: "YOUR_DESCRIPTION_1", reference: "YOUR_REFERENCE_1", type: "BalanceAccount" }, { account: "BA00000000000000000000002", amount: { value: 2000 }, description: "YOUR_DESCRIPTION_2", reference: "YOUR_REFERENCE_2", type: "BalanceAccount" }, { amount: { value: 1000 }, description: "YOUR_DESCRIPTION_3", reference: "YOUR_REFERENCE_3", type: "Commission" } ] } // 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: 7000, } splitAmount2 := checkout.SplitAmount{ Value: 2000, } splitAmount3 := checkout.SplitAmount{ Value: 1000, } amount := checkout.Amount{ Currency: "USD", Value: 10000, } split1 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_1"), Amount: &splitAmount1, Description: common.PtrString("YOUR_DESCRIPTION_1"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000001"), } split2 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_2"), Amount: &splitAmount2, Description: common.PtrString("YOUR_DESCRIPTION_2"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000002"), } split3 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_3"), Amount: &splitAmount3, Description: common.PtrString("YOUR_DESCRIPTION_3"), Type: "Commission", } platformChargebackLogic := checkout.PlatformChargebackLogic{ Behavior: common.PtrString("deductFromLiableAccount"), } cardDetails := checkout.CardDetails{ Cvc: common.PtrString("737"), Number: common.PtrString("4111111111111111"), HolderName: common.PtrString("John Smith"), ExpiryMonth: common.PtrString("03"), ExpiryYear: common.PtrString("2030"), Type: common.PtrString("scheme"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_PAYMENT_REFERENCE", Amount: amount, Splits: []checkout.Split{ split1, split2, split3, }, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic: &platformChargebackLogic, PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails), } // 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 = { "amount": { "currency": "USD", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductFromLiableAccount" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] } # 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 = { :amount => { :currency => 'USD', :value => 10000 }, :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :paymentMethod => { :cvc => '737', :expiryMonth => '03', :expiryYear => '2030', :holderName => 'John Smith', :number => '4111111111111111', :type => 'scheme' }, :reference => 'YOUR_PAYMENT_REFERENCE', :platformChargebackLogic => { :behavior => 'deductFromLiableAccount' }, :splits => [ { :account => 'BA00000000000000000000001', :amount => { :value => 7000 }, :description => 'YOUR_DESCRIPTION_1', :reference => 'YOUR_REFERENCE_1', :type => 'BalanceAccount' }, { :account => 'BA00000000000000000000002', :amount => { :value => 2000 }, :description => 'YOUR_DESCRIPTION_2', :reference => 'YOUR_REFERENCE_2', :type => 'BalanceAccount' }, { :amount => { :value => 1000 }, :description => 'YOUR_DESCRIPTION_3', :reference => 'YOUR_REFERENCE_3', :type => 'Commission' } ] } # 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: 7000 }; const splitAmount2: Types.checkout.SplitAmount = { value: 2000 }; const splitAmount3: Types.checkout.SplitAmount = { value: 1000 }; const amount: Types.checkout.Amount = { currency: "USD", value: 10000 }; const split1: Types.checkout.Split = { reference: "YOUR_REFERENCE_1", amount: splitAmount1, description: "YOUR_DESCRIPTION_1", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000001" }; const split2: Types.checkout.Split = { reference: "YOUR_REFERENCE_2", amount: splitAmount2, description: "YOUR_DESCRIPTION_2", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000002" }; const split3: Types.checkout.Split = { reference: "YOUR_REFERENCE_3", amount: splitAmount3, description: "YOUR_DESCRIPTION_3", type: Types.checkout.Split.TypeEnum.Commission }; const platformChargebackLogic: Types.checkout.PlatformChargebackLogic = { behavior: Types.checkout.PlatformChargebackLogic.BehaviorEnum.DeductFromLiableAccount }; const cardDetails: Types.checkout.CardDetails = { cvc: "737", number: "4111111111111111", holderName: "John Smith", expiryMonth: "03", expiryYear: "2030", type: Types.checkout.CardDetails.TypeEnum.Scheme }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_PAYMENT_REFERENCE", amount: amount, splits: [split1, split2, split3], merchantAccount: "YOUR_MERCHANT_ACCOUNT", platformChargebackLogic: platformChargebackLogic, paymentMethod: cardDetails }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` 2. Listen to the [CHARGEBACK](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CHARGEBACK) webhooks to get notified when a chargeback occurs in your platform. ### Tab: User's balance account You can book the entire disputed amount to a balance account of your choice. Use this logic if you want to make your user liable for all chargeback-related events on the payment. The currency and amount do not need to match those of the original payment. To book the full disputed amount to your user's balance account for a potential chargeback event: 1. Make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments), [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions), or [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/captures) request.\ In the `platformChargebackLogic` object, include the following parameters and values: | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `behavior` | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The method of handling chargebacks. Set this to **deductFromOneBalanceAccount**. | | `targetAccount` | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The ID of your user's balance account to which the disputed amount is booked. | | `costAllocationAccount` | | The ID of the balance account to which the chargeback fees are booked. By default, chargeback fees are booked to your liable balance account. | The following example shows the full payment request, where a potential chargeback will be booked to your user's balance account. **Book disputed amount to your user** #### 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 '{ "amount": { "currency": "EUR", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductFromOneBalanceAccount", "targetAccount": "BA00000000000000000000001", "costAllocationAccount": "BA00000000000000000000001" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] }' ``` #### 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(7000L); SplitAmount splitAmount2 = new SplitAmount() .value(2000L); SplitAmount splitAmount3 = new SplitAmount() .value(1000L); Amount amount = new Amount() .currency("EUR") .value(10000L); Split split1 = new Split() .reference("YOUR_REFERENCE_1") .amount(splitAmount1) .description("YOUR_DESCRIPTION_1") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000001"); Split split2 = new Split() .reference("YOUR_REFERENCE_2") .amount(splitAmount2) .description("YOUR_DESCRIPTION_2") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000002"); Split split3 = new Split() .reference("YOUR_REFERENCE_3") .amount(splitAmount3) .description("YOUR_DESCRIPTION_3") .type(Split.TypeEnum.COMMISSION); PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic() .costAllocationAccount("BA00000000000000000000001") .targetAccount("BA00000000000000000000001") .behavior(PlatformChargebackLogic.BehaviorEnum.DEDUCTFROMONEBALANCEACCOUNT); CardDetails cardDetails = new CardDetails() .cvc("737") .number("4111111111111111") .holderName("John Smith") .expiryMonth("03") .expiryYear("2030") .type(CardDetails.TypeEnum.SCHEME); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_PAYMENT_REFERENCE") .amount(amount) .splits(Arrays.asList(split1, split2, split3)) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .platformChargebackLogic(platformChargebackLogic) .paymentMethod(new CheckoutPaymentMethod(cardDetails)); // 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(7000); $splitAmount2 = new SplitAmount(); $splitAmount2 ->setValue(2000); $splitAmount3 = new SplitAmount(); $splitAmount3 ->setValue(1000); $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(10000); $split1 = new Split(); $split1 ->setReference("YOUR_REFERENCE_1") ->setAmount($splitAmount1) ->setDescription("YOUR_DESCRIPTION_1") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000001"); $split2 = new Split(); $split2 ->setReference("YOUR_REFERENCE_2") ->setAmount($splitAmount2) ->setDescription("YOUR_DESCRIPTION_2") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000002"); $split3 = new Split(); $split3 ->setReference("YOUR_REFERENCE_3") ->setAmount($splitAmount3) ->setDescription("YOUR_DESCRIPTION_3") ->setType("Commission"); $platformChargebackLogic = new PlatformChargebackLogic(); $platformChargebackLogic ->setCostAllocationAccount("BA00000000000000000000001") ->setTargetAccount("BA00000000000000000000001") ->setBehavior("deductFromOneBalanceAccount"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setCvc("737") ->setNumber("4111111111111111") ->setHolderName("John Smith") ->setExpiryMonth("03") ->setExpiryYear("2030") ->setType("scheme"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setAmount($amount) ->setSplits(array($split1, $split2, $split3)) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setPlatformChargebackLogic($platformChargebackLogic) ->setPaymentMethod($checkoutPaymentMethod); $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 = 7000 }; SplitAmount splitAmount2 = new SplitAmount { Value = 2000 }; SplitAmount splitAmount3 = new SplitAmount { Value = 1000 }; Amount amount = new Amount { Currency = "EUR", Value = 10000 }; Split split1 = new Split { Reference = "YOUR_REFERENCE_1", Amount = splitAmount1, Description = "YOUR_DESCRIPTION_1", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000001" }; Split split2 = new Split { Reference = "YOUR_REFERENCE_2", Amount = splitAmount2, Description = "YOUR_DESCRIPTION_2", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000002" }; Split split3 = new Split { Reference = "YOUR_REFERENCE_3", Amount = splitAmount3, Description = "YOUR_DESCRIPTION_3", Type = Split.TypeEnum.Commission }; PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic { CostAllocationAccount = "BA00000000000000000000001", TargetAccount = "BA00000000000000000000001", Behavior = PlatformChargebackLogic.BehaviorEnum.DeductFromOneBalanceAccount }; CardDetails cardDetails = new CardDetails { Cvc = "737", Number = "4111111111111111", HolderName = "John Smith", ExpiryMonth = "03", ExpiryYear = "2030", Type = CardDetails.TypeEnum.Scheme }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_PAYMENT_REFERENCE", Amount = amount, Splits = new List{ split1, split2, split3 }, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic = platformChargebackLogic, PaymentMethod = new CheckoutPaymentMethod(cardDetails) }; // 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 = { amount: { currency: "EUR", value: 10000 }, merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: { cvc: "737", expiryMonth: "03", expiryYear: "2030", holderName: "John Smith", number: "4111111111111111", type: "scheme" }, reference: "YOUR_PAYMENT_REFERENCE", platformChargebackLogic: { behavior: "deductFromOneBalanceAccount", targetAccount: "BA00000000000000000000001", costAllocationAccount: "BA00000000000000000000001" }, splits: [ { account: "BA00000000000000000000001", amount: { value: 7000 }, description: "YOUR_DESCRIPTION_1", reference: "YOUR_REFERENCE_1", type: "BalanceAccount" }, { account: "BA00000000000000000000002", amount: { value: 2000 }, description: "YOUR_DESCRIPTION_2", reference: "YOUR_REFERENCE_2", type: "BalanceAccount" }, { amount: { value: 1000 }, description: "YOUR_DESCRIPTION_3", reference: "YOUR_REFERENCE_3", type: "Commission" } ] } // 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: 7000, } splitAmount2 := checkout.SplitAmount{ Value: 2000, } splitAmount3 := checkout.SplitAmount{ Value: 1000, } amount := checkout.Amount{ Currency: "EUR", Value: 10000, } split1 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_1"), Amount: &splitAmount1, Description: common.PtrString("YOUR_DESCRIPTION_1"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000001"), } split2 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_2"), Amount: &splitAmount2, Description: common.PtrString("YOUR_DESCRIPTION_2"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000002"), } split3 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_3"), Amount: &splitAmount3, Description: common.PtrString("YOUR_DESCRIPTION_3"), Type: "Commission", } platformChargebackLogic := checkout.PlatformChargebackLogic{ CostAllocationAccount: common.PtrString("BA00000000000000000000001"), TargetAccount: common.PtrString("BA00000000000000000000001"), Behavior: common.PtrString("deductFromOneBalanceAccount"), } cardDetails := checkout.CardDetails{ Cvc: common.PtrString("737"), Number: common.PtrString("4111111111111111"), HolderName: common.PtrString("John Smith"), ExpiryMonth: common.PtrString("03"), ExpiryYear: common.PtrString("2030"), Type: common.PtrString("scheme"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_PAYMENT_REFERENCE", Amount: amount, Splits: []checkout.Split{ split1, split2, split3, }, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic: &platformChargebackLogic, PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails), } // 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 = { "amount": { "currency": "EUR", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductFromOneBalanceAccount", "targetAccount": "BA00000000000000000000001", "costAllocationAccount": "BA00000000000000000000001" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] } # 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 = { :amount => { :currency => 'EUR', :value => 10000 }, :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :paymentMethod => { :cvc => '737', :expiryMonth => '03', :expiryYear => '2030', :holderName => 'John Smith', :number => '4111111111111111', :type => 'scheme' }, :reference => 'YOUR_PAYMENT_REFERENCE', :platformChargebackLogic => { :behavior => 'deductFromOneBalanceAccount', :targetAccount => 'BA00000000000000000000001', :costAllocationAccount => 'BA00000000000000000000001' }, :splits => [ { :account => 'BA00000000000000000000001', :amount => { :value => 7000 }, :description => 'YOUR_DESCRIPTION_1', :reference => 'YOUR_REFERENCE_1', :type => 'BalanceAccount' }, { :account => 'BA00000000000000000000002', :amount => { :value => 2000 }, :description => 'YOUR_DESCRIPTION_2', :reference => 'YOUR_REFERENCE_2', :type => 'BalanceAccount' }, { :amount => { :value => 1000 }, :description => 'YOUR_DESCRIPTION_3', :reference => 'YOUR_REFERENCE_3', :type => 'Commission' } ] } # 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: 7000 }; const splitAmount2: Types.checkout.SplitAmount = { value: 2000 }; const splitAmount3: Types.checkout.SplitAmount = { value: 1000 }; const amount: Types.checkout.Amount = { currency: "EUR", value: 10000 }; const split1: Types.checkout.Split = { reference: "YOUR_REFERENCE_1", amount: splitAmount1, description: "YOUR_DESCRIPTION_1", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000001" }; const split2: Types.checkout.Split = { reference: "YOUR_REFERENCE_2", amount: splitAmount2, description: "YOUR_DESCRIPTION_2", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000002" }; const split3: Types.checkout.Split = { reference: "YOUR_REFERENCE_3", amount: splitAmount3, description: "YOUR_DESCRIPTION_3", type: Types.checkout.Split.TypeEnum.Commission }; const platformChargebackLogic: Types.checkout.PlatformChargebackLogic = { costAllocationAccount: "BA00000000000000000000001", targetAccount: "BA00000000000000000000001", behavior: Types.checkout.PlatformChargebackLogic.BehaviorEnum.DeductFromOneBalanceAccount }; const cardDetails: Types.checkout.CardDetails = { cvc: "737", number: "4111111111111111", holderName: "John Smith", expiryMonth: "03", expiryYear: "2030", type: Types.checkout.CardDetails.TypeEnum.Scheme }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_PAYMENT_REFERENCE", amount: amount, splits: [split1, split2, split3], merchantAccount: "YOUR_MERCHANT_ACCOUNT", platformChargebackLogic: platformChargebackLogic, paymentMethod: cardDetails }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` 2. Listen to the [CHARGEBACK](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CHARGEBACK) webhooks to get notified when a chargeback occurs in your platform. ### Tab: Original split ratio The disputed amount is split between the balance accounts in the original payment according to the payment's split ratio. We only consider the ratio when splitting the chargeback, and not the amount. The amount and currency do not need to match the original payment. Here is an example of a chargeback that is split using this logic: 1. A customer makes a payment of USD 100. The amount is split into 3 balance accounts: * USD 70 are booked to BalanceAccount1. * USD 20 are booked to BalanceAccount2. * USD 10 are booked to your liable balance account as your platform's commission. The split ratio is 7:2:1. 2. The customer disputes USD 88 of this payment. Although the disputed amount does not match the original payment, it is debited from the balance accounts according to the original split ratio: * USD 61.60 (70% of EUR 88.00) from BalanceAccount1. * USD 17.60 (20% of EUR 88.00) from BalanceAccount2. * USD 8.80 (10% of EUR 88.00) from your liable balance account. To book the disputed amount according to the split ratio: 1. Make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments), [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions), or [/payments/{paymentPspReference}/captures](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments/\(paymentPspReference\)/captures) request.\ In the `platformChargebackLogic` object, include the following parameters and values: | Parameter | Required | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | `behavior` | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | The method of handling chargebacks. Set this to **deductAccordingToSplitRatio**. | | `costAllocationAccount` | | The ID of the balance account to which the chargeback fees are booked. By default, chargeback fees are booked to your liable balance account. | The following example shows a full payment request, where a potential chargeback will be booked to the balance accounts in your platform according to the split ratio. **Deduct disputed amount according to the split ratio** #### 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 '{ "amount": { "currency": "EUR", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductAccordingToSplitRatio", "costAllocationAccount": "BA00000000000000000000001" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] }' ``` #### 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(7000L); SplitAmount splitAmount2 = new SplitAmount() .value(2000L); SplitAmount splitAmount3 = new SplitAmount() .value(1000L); Amount amount = new Amount() .currency("EUR") .value(10000L); Split split1 = new Split() .reference("YOUR_REFERENCE_1") .amount(splitAmount1) .description("YOUR_DESCRIPTION_1") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000001"); Split split2 = new Split() .reference("YOUR_REFERENCE_2") .amount(splitAmount2) .description("YOUR_DESCRIPTION_2") .type(Split.TypeEnum.BALANCEACCOUNT) .account("BA00000000000000000000002"); Split split3 = new Split() .reference("YOUR_REFERENCE_3") .amount(splitAmount3) .description("YOUR_DESCRIPTION_3") .type(Split.TypeEnum.COMMISSION); PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic() .costAllocationAccount("BA00000000000000000000001") .behavior(PlatformChargebackLogic.BehaviorEnum.DEDUCTACCORDINGTOSPLITRATIO); CardDetails cardDetails = new CardDetails() .cvc("737") .number("4111111111111111") .holderName("John Smith") .expiryMonth("03") .expiryYear("2030") .type(CardDetails.TypeEnum.SCHEME); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_PAYMENT_REFERENCE") .amount(amount) .splits(Arrays.asList(split1, split2, split3)) .merchantAccount("YOUR_MERCHANT_ACCOUNT") .platformChargebackLogic(platformChargebackLogic) .paymentMethod(new CheckoutPaymentMethod(cardDetails)); // 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(7000); $splitAmount2 = new SplitAmount(); $splitAmount2 ->setValue(2000); $splitAmount3 = new SplitAmount(); $splitAmount3 ->setValue(1000); $amount = new Amount(); $amount ->setCurrency("EUR") ->setValue(10000); $split1 = new Split(); $split1 ->setReference("YOUR_REFERENCE_1") ->setAmount($splitAmount1) ->setDescription("YOUR_DESCRIPTION_1") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000001"); $split2 = new Split(); $split2 ->setReference("YOUR_REFERENCE_2") ->setAmount($splitAmount2) ->setDescription("YOUR_DESCRIPTION_2") ->setType("BalanceAccount") ->setAccount("BA00000000000000000000002"); $split3 = new Split(); $split3 ->setReference("YOUR_REFERENCE_3") ->setAmount($splitAmount3) ->setDescription("YOUR_DESCRIPTION_3") ->setType("Commission"); $platformChargebackLogic = new PlatformChargebackLogic(); $platformChargebackLogic ->setCostAllocationAccount("BA00000000000000000000001") ->setBehavior("deductAccordingToSplitRatio"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setCvc("737") ->setNumber("4111111111111111") ->setHolderName("John Smith") ->setExpiryMonth("03") ->setExpiryYear("2030") ->setType("scheme"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setAmount($amount) ->setSplits(array($split1, $split2, $split3)) ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setPlatformChargebackLogic($platformChargebackLogic) ->setPaymentMethod($checkoutPaymentMethod); $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 = 7000 }; SplitAmount splitAmount2 = new SplitAmount { Value = 2000 }; SplitAmount splitAmount3 = new SplitAmount { Value = 1000 }; Amount amount = new Amount { Currency = "EUR", Value = 10000 }; Split split1 = new Split { Reference = "YOUR_REFERENCE_1", Amount = splitAmount1, Description = "YOUR_DESCRIPTION_1", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000001" }; Split split2 = new Split { Reference = "YOUR_REFERENCE_2", Amount = splitAmount2, Description = "YOUR_DESCRIPTION_2", Type = Split.TypeEnum.BalanceAccount, Account = "BA00000000000000000000002" }; Split split3 = new Split { Reference = "YOUR_REFERENCE_3", Amount = splitAmount3, Description = "YOUR_DESCRIPTION_3", Type = Split.TypeEnum.Commission }; PlatformChargebackLogic platformChargebackLogic = new PlatformChargebackLogic { CostAllocationAccount = "BA00000000000000000000001", Behavior = PlatformChargebackLogic.BehaviorEnum.DeductAccordingToSplitRatio }; CardDetails cardDetails = new CardDetails { Cvc = "737", Number = "4111111111111111", HolderName = "John Smith", ExpiryMonth = "03", ExpiryYear = "2030", Type = CardDetails.TypeEnum.Scheme }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_PAYMENT_REFERENCE", Amount = amount, Splits = new List{ split1, split2, split3 }, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic = platformChargebackLogic, PaymentMethod = new CheckoutPaymentMethod(cardDetails) }; // 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 = { amount: { currency: "EUR", value: 10000 }, merchantAccount: "YOUR_MERCHANT_ACCOUNT", paymentMethod: { cvc: "737", expiryMonth: "03", expiryYear: "2030", holderName: "John Smith", number: "4111111111111111", type: "scheme" }, reference: "YOUR_PAYMENT_REFERENCE", platformChargebackLogic: { behavior: "deductAccordingToSplitRatio", costAllocationAccount: "BA00000000000000000000001" }, splits: [ { account: "BA00000000000000000000001", amount: { value: 7000 }, description: "YOUR_DESCRIPTION_1", reference: "YOUR_REFERENCE_1", type: "BalanceAccount" }, { account: "BA00000000000000000000002", amount: { value: 2000 }, description: "YOUR_DESCRIPTION_2", reference: "YOUR_REFERENCE_2", type: "BalanceAccount" }, { amount: { value: 1000 }, description: "YOUR_DESCRIPTION_3", reference: "YOUR_REFERENCE_3", type: "Commission" } ] } // 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: 7000, } splitAmount2 := checkout.SplitAmount{ Value: 2000, } splitAmount3 := checkout.SplitAmount{ Value: 1000, } amount := checkout.Amount{ Currency: "EUR", Value: 10000, } split1 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_1"), Amount: &splitAmount1, Description: common.PtrString("YOUR_DESCRIPTION_1"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000001"), } split2 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_2"), Amount: &splitAmount2, Description: common.PtrString("YOUR_DESCRIPTION_2"), Type: "BalanceAccount", Account: common.PtrString("BA00000000000000000000002"), } split3 := checkout.Split{ Reference: common.PtrString("YOUR_REFERENCE_3"), Amount: &splitAmount3, Description: common.PtrString("YOUR_DESCRIPTION_3"), Type: "Commission", } platformChargebackLogic := checkout.PlatformChargebackLogic{ CostAllocationAccount: common.PtrString("BA00000000000000000000001"), Behavior: common.PtrString("deductAccordingToSplitRatio"), } cardDetails := checkout.CardDetails{ Cvc: common.PtrString("737"), Number: common.PtrString("4111111111111111"), HolderName: common.PtrString("John Smith"), ExpiryMonth: common.PtrString("03"), ExpiryYear: common.PtrString("2030"), Type: common.PtrString("scheme"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_PAYMENT_REFERENCE", Amount: amount, Splits: []checkout.Split{ split1, split2, split3, }, MerchantAccount: "YOUR_MERCHANT_ACCOUNT", PlatformChargebackLogic: &platformChargebackLogic, PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails), } // 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 = { "amount": { "currency": "EUR", "value": 10000 }, "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "paymentMethod": { "cvc": "737", "expiryMonth": "03", "expiryYear": "2030", "holderName": "John Smith", "number": "4111111111111111", "type": "scheme" }, "reference": "YOUR_PAYMENT_REFERENCE", "platformChargebackLogic": { "behavior": "deductAccordingToSplitRatio", "costAllocationAccount": "BA00000000000000000000001" }, "splits": [ { "account": "BA00000000000000000000001", "amount": { "value": 7000 }, "description": "YOUR_DESCRIPTION_1", "reference": "YOUR_REFERENCE_1", "type": "BalanceAccount" }, { "account": "BA00000000000000000000002", "amount": { "value": 2000 }, "description": "YOUR_DESCRIPTION_2", "reference": "YOUR_REFERENCE_2", "type": "BalanceAccount" }, { "amount": { "value": 1000 }, "description": "YOUR_DESCRIPTION_3", "reference": "YOUR_REFERENCE_3", "type": "Commission" } ] } # 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 = { :amount => { :currency => 'EUR', :value => 10000 }, :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :paymentMethod => { :cvc => '737', :expiryMonth => '03', :expiryYear => '2030', :holderName => 'John Smith', :number => '4111111111111111', :type => 'scheme' }, :reference => 'YOUR_PAYMENT_REFERENCE', :platformChargebackLogic => { :behavior => 'deductAccordingToSplitRatio', :costAllocationAccount => 'BA00000000000000000000001' }, :splits => [ { :account => 'BA00000000000000000000001', :amount => { :value => 7000 }, :description => 'YOUR_DESCRIPTION_1', :reference => 'YOUR_REFERENCE_1', :type => 'BalanceAccount' }, { :account => 'BA00000000000000000000002', :amount => { :value => 2000 }, :description => 'YOUR_DESCRIPTION_2', :reference => 'YOUR_REFERENCE_2', :type => 'BalanceAccount' }, { :amount => { :value => 1000 }, :description => 'YOUR_DESCRIPTION_3', :reference => 'YOUR_REFERENCE_3', :type => 'Commission' } ] } # 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: 7000 }; const splitAmount2: Types.checkout.SplitAmount = { value: 2000 }; const splitAmount3: Types.checkout.SplitAmount = { value: 1000 }; const amount: Types.checkout.Amount = { currency: "EUR", value: 10000 }; const split1: Types.checkout.Split = { reference: "YOUR_REFERENCE_1", amount: splitAmount1, description: "YOUR_DESCRIPTION_1", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000001" }; const split2: Types.checkout.Split = { reference: "YOUR_REFERENCE_2", amount: splitAmount2, description: "YOUR_DESCRIPTION_2", type: Types.checkout.Split.TypeEnum.BalanceAccount, account: "BA00000000000000000000002" }; const split3: Types.checkout.Split = { reference: "YOUR_REFERENCE_3", amount: splitAmount3, description: "YOUR_DESCRIPTION_3", type: Types.checkout.Split.TypeEnum.Commission }; const platformChargebackLogic: Types.checkout.PlatformChargebackLogic = { costAllocationAccount: "BA00000000000000000000001", behavior: Types.checkout.PlatformChargebackLogic.BehaviorEnum.DeductAccordingToSplitRatio }; const cardDetails: Types.checkout.CardDetails = { cvc: "737", number: "4111111111111111", holderName: "John Smith", expiryMonth: "03", expiryYear: "2030", type: Types.checkout.CardDetails.TypeEnum.Scheme }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_PAYMENT_REFERENCE", amount: amount, splits: [split1, split2, split3], merchantAccount: "YOUR_MERCHANT_ACCOUNT", platformChargebackLogic: platformChargebackLogic, paymentMethod: cardDetails }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` 2. Listen to the [CHARGEBACK](https://docs.adyen.com/api-explorer/Webhooks/latest/post/CHARGEBACK) webhooks to get notified when a chargeback occurs in your platform. ## Track fund movements To track the status of the funds transfers initiated by a chargeback: 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 payload of the [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook, note that: * The `event` array includes all previous transfer events. * 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 chargeback. We send webhooks for each balance account involved in the chargeback, and each split of the disputed amount. ### Tab: Chargeback amount You can identify chargeback-related transfer webhooks for the disputed amount 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. | **outgoing** | | [type](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-type) | Specifies the type of the transfer. | **chargeback** | | [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/). | **BalanceAccount** | ** ### 1. Outgoing transfer received When a chargeback request is received, 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` **outgoing**. The webhook provides information about the transfer, such as the original payment and split references and which user and balance account is debited. **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": 7000 }, "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": -7000 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "BalanceAccount", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "MTHR00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -7000 } ], "status": "received", "type": "accounting" } ], "id": "3JY1Y65VVCY2HSMS", "reason": "approved", "reference": "Split_item_1", "sequenceNumber": 1, "status": "received", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.created" } ``` ** ### 2. Outgoing transfer authorized When a transfer request is authorised, 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": 7000 }, "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": -7000 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "BalanceAccount", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "MTHR00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -7000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "MTHR00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 7000, "reserved": -7000 } ], "status": "authorised", "type": "accounting" } ], "id": "3JY1Y65VVCY2HSMS", "reason": "approved", "reference": "Split_item_1", "sequenceNumber": 2, "status": "authorised", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 3. Outgoing transfer booked When the funds are deducted from 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` **chargeback** and the `transactionId`. **Chargeback transfer completed** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 7000 }, "balanceAccount": { "description": "Your description for the balance account", "id": "BA00000000000000000000001", "reference": "Your reference for the balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "balance": -7000, "currency": "EUR", "received": 0, "reserved": 0 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "BalanceAccount", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "MTHR00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -7000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "MTHR00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 7000, "reserved": -7000 } ], "status": "authorised", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:20+02:00", "id": "MTHR00000000000000000000000003", "mutations": [ { "balance": -7000, "currency": "EUR", "received": 0, "reserved": 7000 } ], "status": "chargeback", "transactionId": "EVJN42272224222B5JB8BRC84N686ZEUR", "type": "accounting", "valueDate": "2023-03-01T00:00:00+02:00" } ], "id": "3JY1Y65VVCY2HSMS", "reason": "approved", "reference": "Split_item_1", "sequenceNumber": 3, "status": "chargeback", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 4. Transaction booked When the funds are deducted, 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": -7000, "currency": "EUR" }, "status": "booked", "transfer": { "id": "3JY1Y65VVCY2HSMS", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "BalanceAccount", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "reference": "Split_item_1" }, "valueDate": "2023-03-01T00:00:00+02:00", "bookingDate": "2023-02-28T13:30:20+02:00", "creationDate": "2023-02-28T13: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" } ``` ### Tab: Transaction fees You can identify chargeback-related transfer webhooks for the chargeback transaction fees 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. | **outgoing** | | [type](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-type) | Specifies the type of the transfer. | **chargeback** | | [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/). | **PaymentFee** | ** ### 1. Outgoing transfer received Once the transaction fees are calculated for the chargeback, 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` **outgoing**. The webhook provides information about the transfer, such as the original payment and split references and which user and balance account is debited. **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": 344 }, "balanceAccount": { "description": "Your description for the second balance account", "id": "BA00000000000000000000002", "reference": "Your reference for the second balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": -344 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "PaymentFee", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transaction costs", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "JDFK00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -344 } ], "status": "received", "type": "accounting" } ], "id": "7GRBR69BNDHELXRI", "reason": "approved", "reference": "Transaction_fees", "sequenceNumber": 1, "status": "received", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.created" } ``` ** ### 2. Outgoing transfer authorized When the transfer request is authorised, Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook with `status` **authorised**. **Transfer authorised** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 344 }, "balanceAccount": { "description": "Your description for the second balance account", "id": "BA00000000000000000000002", "reference": "Your reference for the second balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": 0, "reserved": -344 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "PaymentFee", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transaction costs", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "JDFK00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -344 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "JDFK00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 344, "reserved": -344 } ], "status": "authorised", "type": "accounting" } ], "id": "7GRBR69BNDHELXRI", "reason": "approved", "reference": "Transaction_fees", "sequenceNumber": 2, "status": "authorised", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 3. Outgoing transfer booked When the funds are deducted from 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` **chargeback** and the `transactionId`. **Transfer refunded** ```json { "data": { "accountHolder": { "description": "Your description for the account holder", "id": "AH00000000000000000000001", "reference": "Your reference for the account holder" }, "amount": { "currency": "EUR", "value": 344 }, "balanceAccount": { "description": "Your description for the second balance account", "id": "BA00000000000000000000002", "reference": "Your reference for the second balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "balance": -344, "currency": "EUR", "received": 0, "reserved": 0 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "PaymentFee", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transaction costs", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "JDFK00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -344 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "JDFK00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 344, "reserved": -344 } ], "status": "authorised", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:20+02:00", "id": "JDFK00000000000000000000000003", "mutations": [ { "balance": -344, "currency": "EUR", "received": 0, "reserved": 7000 } ], "status": "chargeback", "transactionId": "EVJN42272224222B5JB8BRC84N686ZEUR", "type": "accounting", "valueDate": "2023-03-01T00:00:00+02:00" } ], "id": "7GRBR69BNDHELXRI", "reason": "approved", "reference": "Transaction_fees", "sequenceNumber": 3, "status": "chargeback", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 4. Transaction booked When the funds are deducted, 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": -344, "currency": "EUR" }, "status": "booked", "transfer": { "id": "7GRBR69BNDHELXRI", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "PaymentFee", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "reference": "Transaction_fees" }, "valueDate": "2023-03-01T00:00:00+02:00", "bookingDate": "2023-02-28T13:30:20+02:00", "creationDate": "2023-02-28T13: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" } ``` ### Tab: Commission You can identify chargeback-related transfer webhooks for the disputed commission 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. | **outgoing** | | [type](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.created#request-data-type) | Specifies the type of the transfer. | **chargeback** | | [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/). | **Commission** | ** ### 1. Outgoing transfer received When a chargeback request is received on your liable 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` **outgoing**. The webhook provides information about the transfer, such as the original payment and split references. **Transfer received** ```json { "data": { "accountHolder": { "description": "Your description for your liable account holder", "id": "AH00000000000000000000002", "reference": "Your reference for your liable account holder" }, "amount": { "currency": "EUR", "value": 1000 }, "balanceAccount": { "description": "Your description for your liable balance account", "id": "BA00000000000000000000003", "reference": "Your reference for your liable balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": -1000 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Commission", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for your commission", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "LRKT00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -1000 } ], "status": "received", "type": "accounting" } ], "id": "3KEII65VWRBRFJIK", "reason": "approved", "reference": "Commission_1", "sequenceNumber": 1, "status": "received", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.created" } ``` ** ### 2. Outgoing 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 authorised** ```json { "data": { "accountHolder": { "description": "Your description for your liable account holder", "id": "AH00000000000000000000002", "reference": "Your reference for your liable account holder" }, "amount": { "currency": "EUR", "value": 1000 }, "balanceAccount": { "description": "Your description for your liable balance account", "id": "BA00000000000000000000003", "reference": "Your reference for your liable balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "currency": "EUR", "received": 0, "reserved": -1000 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Commission", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for your commission", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "LRKT00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -1000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "LRKT00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 1000, "reserved": -1000 } ], "status": "authorised", "type": "accounting" } ], "id": "3KEII65VWRBRFJIK", "reason": "approved", "reference": "Commission_1", "sequenceNumber": 2, "status": "authorised", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 3. Outgoing transfer booked When the funds are deducted from the balance account, Adyen sends a [balancePlatform.transfer.updated](https://docs.adyen.com/api-explorer/transfer-webhooks/latest/post/balancePlatform.transfer.updated) webhook with `status` **chargeback** and the `transactionId`. **Chargeback transfer completed** ```json { "data": { "accountHolder": { "description": "Your description for your liable account holder", "id": "AH00000000000000000000002", "reference": "Your reference for your liable account holder" }, "amount": { "currency": "EUR", "value": 1000 }, "balanceAccount": { "description": "Your description for your liable balance account", "id": "BA00000000000000000000003", "reference": "Your reference for your liable balance account" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "balances": [ { "balance": -1000, "currency": "EUR", "received": 0, "reserved": 0 } ], "category": "platformPayment", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Commission", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "creationDate": "2023-02-28T13:30:05+02:00", "description": "Your description for the transfer", "direction": "outgoing", "events": [ { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "LRKT00000000000000000000000001", "mutations": [ { "currency": "EUR", "received": -1000 } ], "status": "received", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:18+02:00", "id": "LRKT00000000000000000000000002", "mutations": [ { "currency": "EUR", "received": 1000, "reserved": -1000 } ], "status": "authorised", "type": "accounting" }, { "bookingDate": "2023-02-28T13:30:20+02:00", "id": "LRKT00000000000000000000000003", "mutations": [ { "balance": -1000, "currency": "EUR", "received": 0, "reserved": 1000 } ], "status": "refunded", "transactionId": "EVJN42272224222B5JB8BRC84N686ZEUR", "type": "accounting", "valueDate": "2023-03-01T00:00:00+02:00" } ], "id": "3KEII65VWRBRFJIK", "reason": "approved", "reference": "Commission_1", "sequenceNumber": 3, "status": "chargeback", "type": "chargeback" }, "environment": "test", "type": "balancePlatform.transfer.updated" } ``` ** ### 4. Transaction booked When the funds are deducted, 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": -1000, "currency": "EUR" }, "status": "booked", "transfer": { "id": "3KEII65VWRBRFJIK", "categoryData": { "modificationMerchantReference": "MRef#000001", "modificationPspReference": "QFQTPCQ8HXSKGK82", "paymentMerchantReference": "Payment reference", "platformPaymentType": "Commission", "pspPaymentReference": "CWBC43ZX2VTFWR82", "type": "platformPayment" }, "reference": "Commission_1" }, "valueDate": "2023-03-01T00:00:00+02:00", "bookingDate": "2023-02-28T13:30:20+02:00", "creationDate": "2023-02-28T13: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 In the [Balance Platform Accounting Report](/platforms/reports-and-fees/balance-platform-accounting-report#description-bpar), the chargeback fee type is indicated before the transfer description, which matches the description of the original payment. ## See also * [Reconcile payments](/platforms/reconciliation-use-cases/reconcile-payments)