--- title: "Create split configuration profiles" description: "Create a split configuration profile for all payments processed through your user's store." url: "https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration" source_url: "https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration.md" canonical: "https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration" last_modified: "2026-05-11T16:04:22+02:00" language: "en" --- # Create split configuration profiles Create a split configuration profile for all payments processed through your user's store. You can create split configuration profiles to automatically split transactions processed through your user's store. The rules you set in the profile define how and to which balance account to book the funds and fees associated with the transaction. If you don't include split instructions in a split configuration profile or in your [Checkout API](/platforms/online-payments/split-transactions) or [Terminal API](/platforms/in-person-payments/split-transactions) payment request, Adyen books the funds and fees to your platform's liable balance account. To split transactions automatically, you must: 1. [Create a split configuration profile](#create-split-configuration) in your [Customer Area](https://ca-test.adyen.com/) or using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). 2. [Link the profile to your user's store](#link-profile-to-store) when you create or update the store using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). It is not possible to link profiles to stores using the Customer Area, unless you onboarded your user through [Onboarding on invite](/platforms/onboard-users/#onboarding-on-invite). ## Requirements Take into account the following requirements, limitations, and preparations for creating split configuration profiles. | Requirement | Description | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | You must have a [platform model](/platforms) integration on Adyen for Platforms. | | **[API credential roles](/development-resources/api-credentials/roles/)** | If you want to create and manage split configuration profiles through API requests, your [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) credential must have the following role:- **Management API—SplitConfiguration read and write** | | **[Customer Area roles](/account/user-roles)** | If you want to create and manage split configuration profiles in your [Customer Area](https://ca-test.adyen.com/), ask our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable the **Manage new split configuration settings** role for your admin user. The admin user can then grant this role to other users. | | **Limitations** | * You can only link a split configuration profile to a store using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). * The card region condition is in a pilot phase and is not yet available for all platforms. If it's already available for your platform, you can define it by using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). | | **Setup steps** | Before you begin, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to enable split configuration profiles for your platform. | ## How it works A split configuration profile defines when and how to split transactions processed through your user's store. You can link the same split configuration profile to multiple stores. When you associate a profile with your user's store, you must also specify which of your user's balance accounts to use for booking the splits. We book all your user's funds and fees to that balance account. ## Create a split configuration profile A split configuration profile consists of one or more rules that determine whether to apply the split logic to a transaction. When you create the profile, you must create its first rule at the same time. You can create a split configuration profile in your [Customer Area](https://ca-test.adyen.com/), or by using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). ### Tab: Customer Area To create a split configuration profile: 1. In your [Customer Area](https://ca-test.adyen.com/), switch to the appropriate merchant account. 2. Go to **Platform** > **New split configuration**. 3. Select **Create new profile**. 4. Enter a name for the profile. 5. Choose the payment conditions from the dropdown lists. | Condition | Description | Possible values | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Shopper interaction** | Apply the split logic to transactions made through a specific sales channel, or all channels. | * **Any** * **Ecommerce** * **POS** * **Moto** * **ContAuth** | | **Payment method** | Apply the split logic to transactions made through a specific payment method, or all payment methods associated with the store. You can differentiate between [payment method variants](/development-resources/paymentmethodvariant/), for example, configure different instructions for **Apple Pay - Mastercard** and **Apple Pay - Visa**. | See the list of [supported payment methods](/platforms/payment-methods#supported-payment-methods) and [payment method variants](/development-resources/paymentmethodvariant/). | | **Funding source** | Apply the split logic to payments initiated with a specific card type, or all card types. For wallet payment methods, this refers to the type of the linked card. | - **Any** - **Credit** - **Debit** - **Prepaid** - **Deferred debit** - **Charged** | | **Currency** | Apply the split logic to transactions made in a specific currency, or any currency. | See the list of supported currencies for our [supported payment methods](/platforms/payment-methods#supported-payment-methods) on their specific [payment method page](/payment-methods). | 6. Select **Continue**. 7. Configure the split logic (a collection of split instructions) to apply to all transactions that meet the conditions you defined in the previous step. | Split instruction | Description | Possible values | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Platform commission** | Define the amount to book to your liable balance account as your platform's commission. | * **Fixed fee**: a fixed amount specified in [minor units](/development-resources/currency-codes) * **Variable fee**: a percentage of the payment | | **Additional platform commission** (optional) | You can define an additional commission that is booked to a balance account specified in the **Balance account code** field, instead of your platform's liable balance account. | - **Additional fixed fee**: a fixed amount specified in [minor units](/development-resources/currency-codes) - **Additional variable fee**: a percentage of the payment | | **Deduct payment fees** | Select the balance account to which you want to book the [transaction fees](/platforms/online-payments/transaction-fees) incurred by the payment. | * Your liable balance account * Your user's balance account | | **Add surcharges** | Select the balance account to which you want to book the surcharges. | - Your liable balance account - Your user's balance account | | **Deduct chargeback** | Select the balance account to which you want to book a potential chargeback. | * Your liable balance account * Your user's balance account * Book chargeback according to the split ratio of the original payment | | **Add tips** | Select the balance account to which you want to book potential gratuities. | - Your liable balance account - Your user's balance account | 8. Select **Preview** and review the summary of the split logic and rule. 9. Select **Save**. The new configuration profile will have a UUID next to its name in the **Split configuration profiles** list. Take note of this, because you must use it later to apply the profile to your user's store. After you create a split configuration profile, you can [create additional rules](/platforms/automatic-split-configuration/manage-split-configurations/api#create-rule) in it. ### Tab: Management API The following sections describe the [general instructions](#general-instructions) on how to create a split configuration profile, and then go into more detail for all [possible split instructions](#optional-configuration). ### General instructions To create a split configuration profile, make a POST [/merchants/{merchantId}/splitConfigurations](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations) request, specifying your [merchantId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants#responses-200-id) in the path. In the body of the request, include the `description` field and `rules` array. In the `rules` array, include the following parameters for each rule: | Parameter | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [currency](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-currency) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define whether the rule applies to a specific currency, or all currencies. | | [paymentMethod](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-paymentMethod) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define whether the rule applies to a specific payment method, or all payment methods associated with the store. You can differentiate between [payment method variants](/development-resources/paymentmethodvariant/) as well, for example, configure different instructions for **visagold** and **visasignature**. | | [cardRegion](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-cardRegion) | | Define whether the rule applies to transactions processed through a store that's registered in the same country/region where the card was issued, in a different country/region, or all transactions regardless of the processing and issuing location. Possible values:- **domestic** - **interRegional** - **intraRegional** - **international** - **ANY**This condition is in pilot phase, and not yet available for all platforms. | | [fundingSource](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-fundingSource) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define whether the rule applies only to payments initiated with a specific type of card, or all card types. | | [shopperInteraction](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-shopperInteraction) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define whether the rule applies to a specific sales channel, or all channels. | | [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define the split logic that is applied if the rule conditions are met. For instructions, see [Optional configuration](#optional-configuration). | | [splitLogic.commission](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-commission) | ![Required](/user/pages/reuse/image-library/01.icons/required/required.svg?decoding=auto\&fetchpriority=auto) | Define your platform's commission for the payments. This can be a fixed amount, a percentage, or both. | | [splitLogic.additionalCommission](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-additionalCommission) | | Define an additional fee as a commission for your user, booked directly to the balance account you specify in `splitLogic.additionalCommission.balanceAccountId`. This can be a fixed amount, a percentage, or both. | ### Optional configuration Based on which optional parameters you include in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object, you can define to which balance account to book: * The different types of [transaction fees](#book-transaction-fees) associated with the payment. * Potential [refunds, chargebacks, and their associated fees](#book-refunds-and-chargebacks). * The [remaining amount](#book-remaining-amounts) after currency conversion for online payments. * The markup paid by the customer for converting the currency of in-person payments. * The [tips and surcharges](#book-tips-and-surcharges) for in-person payments. You can define **any or all** of these parameters in the `splitLogic` object of the split configuration profile. ** #### Book transaction fees To book the [transaction fees](/platforms/online-payments/transaction-fees) associated with the payment to different balance accounts, you must include at least one of the following parameters in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object: | Parameter | Required | Description | Limitation | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | [paymentFee](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-paymentFee) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you don't send any other fee type. Define to which balance account to book the aggregated amount of all transaction fees associated with the payment. | Cannot be combined with any other fee type. | | [adyenFees](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-adyenFees) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send `aquiringFees`. Define to which balance account to book the aggregated amount of Adyen's Commission and Markup for the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `interchange`, `schemeFee`, `adyenCommission`, or `adyenMarkup`. | | [acquiringFees](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-acquiringFees) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send `adyenFees`. Define to which balance account to book the aggregated amount of the Interchange and Scheme fees associated with the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `interchange`, `schemeFee`, `adyenCommission`, or `adyenMarkup`. | | [adyenCommission](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-adyenCommission) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send `interchange`, `schemeFee`, or `adyenMarkup`. Define to which balance account to book the Adyen's commission for the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `adyenFees`, or `aquiringFees`. | | [adyenMarkup](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-adyenMarkup) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send `interchange`, `schemeFee`, or `adyenCommission`. Define to which balance account to book the Adyen's markup for the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `adyenFees`, or `aquiringFees`. | | [interchange](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-interchange) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send`schemeFee`, `adyenCommission`, or `adyenMarkup`. Define to which balance account to book the Interchange associated with the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `adyenFees`, or `aquiringFees`. | | [schemeFee](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-schemeFee) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Required if you send`interchange`, `adyenCommission`, or `adyenMarkup`. Define to which balance account to book the Scheme fees associated with the payment. | Cannot be combined with fee types on a different level: `paymentFee`, `adyenFees`, or `aquiringFees`. | You can send the following combinations in the `splitLogic` array: * `paymentFee` * `aquiringFees` and `adyenFees` * `interchange`, `schemeFee`, `adyenCommission`, and `adyenMarkup` For example, to create a split configuration profile that books the Interchange and Scheme fees to the user's balance account, and every other fee type to your platform's liable balance account, send the following request: **Define split instructions for transaction fees** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "acquiringFees": "deductFromOneBalanceAccount", "adyenFees": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] }' ``` #### Java ```java // Adyen Java API Library v35.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Commission commission1 = new Commission() .variablePercentage(100L) .fixedAmount(10L); SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic() .adyenFees(SplitConfigurationLogic.AdyenFeesEnum.DEDUCTFROMLIABLEACCOUNT) .acquiringFees(SplitConfigurationLogic.AcquiringFeesEnum.DEDUCTFROMONEBALANCEACCOUNT) .commission(commission1); SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule() .splitLogic(splitConfigurationLogic1) .paymentMethod("ANY") .shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.ANY) .currency("ANY") .fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY); SplitConfiguration splitConfiguration = new SplitConfiguration() .description("Your description for the split configuration profile") .rules(Arrays.asList(splitConfigurationRule1)); // Send the request SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client); SplitConfiguration response = service.createSplitConfiguration("merchantId", splitConfiguration, null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $commission1 = new Commission(); $commission1 ->setVariablePercentage(100) ->setFixedAmount(10); $splitConfigurationLogic1 = new SplitConfigurationLogic(); $splitConfigurationLogic1 ->setAdyenFees("deductFromLiableAccount") ->setAcquiringFees("deductFromOneBalanceAccount") ->setCommission($commission1); $splitConfigurationRule1 = new SplitConfigurationRule(); $splitConfigurationRule1 ->setSplitLogic($splitConfigurationLogic1) ->setPaymentMethod("ANY") ->setShopperInteraction("ANY") ->setCurrency("ANY") ->setFundingSource("ANY"); $splitConfiguration = new SplitConfiguration(); $splitConfiguration ->setDescription("Your description for the split configuration profile") ->setRules(array($splitConfigurationRule1)); // Send the request $service = new SplitConfigurationMerchantLevelApi($client); $response = $service->createSplitConfiguration('merchantId', $splitConfiguration); ``` #### C\# ```cs // Adyen .net API Library v31.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Commission commission1 = new Commission { VariablePercentage = 100, FixedAmount = 10 }; SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic { AdyenFees = SplitConfigurationLogic.AdyenFeesEnum.DeductFromLiableAccount, AcquiringFees = SplitConfigurationLogic.AcquiringFeesEnum.DeductFromOneBalanceAccount, Commission = commission1 }; SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule { SplitLogic = splitConfigurationLogic1, PaymentMethod = "ANY", ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.ANY, Currency = "ANY", FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY }; SplitConfiguration splitConfiguration = new SplitConfiguration { Description = "Your description for the split configuration profile", Rules = new List{ splitConfigurationRule1 } }; // Send the request var service = new SplitConfigurationMerchantLevelService(client); var response = service.CreateSplitConfiguration("merchantId", splitConfiguration); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v26.1.0 const { Client, ManagementAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const splitConfiguration = { description: "Your description for the split configuration profile", rules: [ { paymentMethod: "ANY", shopperInteraction: "ANY", fundingSource: "ANY", currency: "ANY", splitLogic: { acquiringFees: "deductFromOneBalanceAccount", adyenFees: "deductFromLiableAccount", commission: { fixedAmount: 10, variablePercentage: 100 } } } ] } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` #### Go ```go // Adyen Go API Library v20.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v20/src/common" "github.com/adyen/adyen-go-api-library/v20/src/adyen" "github.com/adyen/adyen-go-api-library/v20/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) commission1 := management.Commission{ VariablePercentage: common.PtrInt64(100), FixedAmount: common.PtrInt64(10), } splitConfigurationLogic1 := management.SplitConfigurationLogic{ AdyenFees: common.PtrString("deductFromLiableAccount"), AcquiringFees: common.PtrString("deductFromOneBalanceAccount"), Commission: commission1, } splitConfigurationRule1 := management.SplitConfigurationRule{ SplitLogic: splitConfigurationLogic1, PaymentMethod: "ANY", ShopperInteraction: "ANY", Currency: "ANY", FundingSource: common.PtrString("ANY"), } splitConfiguration := management.SplitConfiguration{ Description: "Your description for the split configuration profile", Rules: []management.SplitConfigurationRule{ splitConfigurationRule1, }, } // Send the request service := client.Management() req := service.SplitConfigurationMerchantLevelApi.CreateSplitConfigurationInput("merchantId").SplitConfiguration(splitConfiguration) res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateSplitConfiguration(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.4.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "acquiringFees": "deductFromOneBalanceAccount", "adyenFees": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v10.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :description => 'Your description for the split configuration profile', :rules => [ { :paymentMethod => 'ANY', :shopperInteraction => 'ANY', :fundingSource => 'ANY', :currency => 'ANY', :splitLogic => { :acquiringFees => 'deductFromOneBalanceAccount', :adyenFees => 'deductFromLiableAccount', :commission => { :fixedAmount => 10, :variablePercentage => 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v26.1.0 import { Client, ManagementAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const commission1: Types.management.Commission = { variablePercentage: 100, fixedAmount: 10 }; const splitConfigurationLogic1: Types.management.SplitConfigurationLogic = { adyenFees: Types.management.SplitConfigurationLogic.AdyenFeesEnum.DeductFromLiableAccount, acquiringFees: Types.management.SplitConfigurationLogic.AcquiringFeesEnum.DeductFromOneBalanceAccount, commission: commission1 }; const splitConfigurationRule1: Types.management.SplitConfigurationRule = { splitLogic: splitConfigurationLogic1, paymentMethod: "ANY", shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.ANY, currency: "ANY", fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY }; const splitConfiguration: Types.management.SplitConfiguration = { description: "Your description for the split configuration profile", rules: [splitConfigurationRule1] }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split instructions that are applied when the predefined conditions are met. You will need these IDs when you want to change the details of the split configuration profile. **Split configuration profile created** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000001", "shopperInteraction": "ANY", "splitLogic": { "acquiringFees": "deductFromOneBalanceAccount", "adyenFees": "deductFromOnBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ], "splitConfigurationId": "SCNF00000000000000000000001" } ``` ** #### Book refunds and chargebacks To define the split instructions for potential refunds, chargebacks, and the fees incurred by them, you can include the following parameters in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object. | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [refund](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-refund) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Define the refund logic:- You can book the entire refund amount to your platform's liable balance account or to your user's balance account. - You can split the refund amount between the balance accounts specified in the original payment (with the same split ratio).If the associated store processes multiple partial captures, you must not set the refund logic to **deductAccordingToSplitRatio**. Required if you want set `refundCostAllocation`. | | [refundCostAllocation](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-refundCostAllocation) | | Define to which balance account to book the fees incurred by the refund. | | [chargeback](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-chargeback) | ![Conditionally required](/user/pages/reuse/image-library/01.icons/conditionally-required/conditionally-required.svg?decoding=auto\&fetchpriority=auto) | Define the chargeback logic:- You can book the entire disputed amount to your platform's liable balance account or to your user's balance account. - You can split the disputed amount between the balance accounts specified in the original payment (with the same split ratio).Required if you want set `chargebackCostAllocation`. | | [chargebackCostAllocation](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-chargebackCostAllocation) | | Define to which balance account to book the fees incurred by the chargeback. | In the following example, we create a split configuration profile that books: * The refund amount to your user's balance account. * The fees incurred by refunds to your liable balance account. * The chargeback amount according to the original payment's split ratio. * The fees incurred by chargebacks to your liable balance account. **Define refund and chargeback instructions** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "refund": "deductFromOneBalanceAccount", "refundCostAllocation": "deductFromLiableAccount", "chargeback": "deductAccordingToSplitRatio", "chargebackCostAllocation": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] }' ``` #### Java ```java // Adyen Java API Library v35.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Commission commission1 = new Commission() .variablePercentage(100L) .fixedAmount(10L); SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic() .chargeback(SplitConfigurationLogic.ChargebackEnum.DEDUCTACCORDINGTOSPLITRATIO) .refundCostAllocation(SplitConfigurationLogic.RefundCostAllocationEnum.DEDUCTFROMLIABLEACCOUNT) .chargebackCostAllocation(SplitConfigurationLogic.ChargebackCostAllocationEnum.DEDUCTFROMLIABLEACCOUNT) .commission(commission1) .refund(SplitConfigurationLogic.RefundEnum.DEDUCTFROMONEBALANCEACCOUNT); SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule() .splitLogic(splitConfigurationLogic1) .paymentMethod("ANY") .shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.ANY) .currency("ANY") .fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY); SplitConfiguration splitConfiguration = new SplitConfiguration() .description("Your description for the split configuration profile") .rules(Arrays.asList(splitConfigurationRule1)); // Send the request SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client); SplitConfiguration response = service.createSplitConfiguration("merchantId", splitConfiguration, null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $commission1 = new Commission(); $commission1 ->setVariablePercentage(100) ->setFixedAmount(10); $splitConfigurationLogic1 = new SplitConfigurationLogic(); $splitConfigurationLogic1 ->setChargeback("deductAccordingToSplitRatio") ->setRefundCostAllocation("deductFromLiableAccount") ->setChargebackCostAllocation("deductFromLiableAccount") ->setCommission($commission1) ->setRefund("deductFromOneBalanceAccount"); $splitConfigurationRule1 = new SplitConfigurationRule(); $splitConfigurationRule1 ->setSplitLogic($splitConfigurationLogic1) ->setPaymentMethod("ANY") ->setShopperInteraction("ANY") ->setCurrency("ANY") ->setFundingSource("ANY"); $splitConfiguration = new SplitConfiguration(); $splitConfiguration ->setDescription("Your description for the split configuration profile") ->setRules(array($splitConfigurationRule1)); // Send the request $service = new SplitConfigurationMerchantLevelApi($client); $response = $service->createSplitConfiguration('merchantId', $splitConfiguration); ``` #### C\# ```cs // Adyen .net API Library v31.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Commission commission1 = new Commission { VariablePercentage = 100, FixedAmount = 10 }; SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic { Chargeback = SplitConfigurationLogic.ChargebackEnum.DeductAccordingToSplitRatio, RefundCostAllocation = SplitConfigurationLogic.RefundCostAllocationEnum.DeductFromLiableAccount, ChargebackCostAllocation = SplitConfigurationLogic.ChargebackCostAllocationEnum.DeductFromLiableAccount, Commission = commission1, Refund = SplitConfigurationLogic.RefundEnum.DeductFromOneBalanceAccount }; SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule { SplitLogic = splitConfigurationLogic1, PaymentMethod = "ANY", ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.ANY, Currency = "ANY", FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY }; SplitConfiguration splitConfiguration = new SplitConfiguration { Description = "Your description for the split configuration profile", Rules = new List{ splitConfigurationRule1 } }; // Send the request var service = new SplitConfigurationMerchantLevelService(client); var response = service.CreateSplitConfiguration("merchantId", splitConfiguration); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v26.1.0 const { Client, ManagementAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const splitConfiguration = { description: "Your description for the split configuration profile", rules: [ { paymentMethod: "ANY", shopperInteraction: "ANY", fundingSource: "ANY", currency: "ANY", splitLogic: { refund: "deductFromOneBalanceAccount", refundCostAllocation: "deductFromLiableAccount", chargeback: "deductAccordingToSplitRatio", chargebackCostAllocation: "deductFromLiableAccount", commission: { fixedAmount: 10, variablePercentage: 100 } } } ] } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` #### Go ```go // Adyen Go API Library v20.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v20/src/common" "github.com/adyen/adyen-go-api-library/v20/src/adyen" "github.com/adyen/adyen-go-api-library/v20/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) commission1 := management.Commission{ VariablePercentage: common.PtrInt64(100), FixedAmount: common.PtrInt64(10), } splitConfigurationLogic1 := management.SplitConfigurationLogic{ Chargeback: common.PtrString("deductAccordingToSplitRatio"), RefundCostAllocation: common.PtrString("deductFromLiableAccount"), ChargebackCostAllocation: common.PtrString("deductFromLiableAccount"), Commission: commission1, Refund: common.PtrString("deductFromOneBalanceAccount"), } splitConfigurationRule1 := management.SplitConfigurationRule{ SplitLogic: splitConfigurationLogic1, PaymentMethod: "ANY", ShopperInteraction: "ANY", Currency: "ANY", FundingSource: common.PtrString("ANY"), } splitConfiguration := management.SplitConfiguration{ Description: "Your description for the split configuration profile", Rules: []management.SplitConfigurationRule{ splitConfigurationRule1, }, } // Send the request service := client.Management() req := service.SplitConfigurationMerchantLevelApi.CreateSplitConfigurationInput("merchantId").SplitConfiguration(splitConfiguration) res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateSplitConfiguration(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.4.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "refund": "deductFromOneBalanceAccount", "refundCostAllocation": "deductFromLiableAccount", "chargeback": "deductAccordingToSplitRatio", "chargebackCostAllocation": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v10.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :description => 'Your description for the split configuration profile', :rules => [ { :paymentMethod => 'ANY', :shopperInteraction => 'ANY', :fundingSource => 'ANY', :currency => 'ANY', :splitLogic => { :refund => 'deductFromOneBalanceAccount', :refundCostAllocation => 'deductFromLiableAccount', :chargeback => 'deductAccordingToSplitRatio', :chargebackCostAllocation => 'deductFromLiableAccount', :commission => { :fixedAmount => 10, :variablePercentage => 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v26.1.0 import { Client, ManagementAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const commission1: Types.management.Commission = { variablePercentage: 100, fixedAmount: 10 }; const splitConfigurationLogic1: Types.management.SplitConfigurationLogic = { chargeback: Types.management.SplitConfigurationLogic.ChargebackEnum.DeductAccordingToSplitRatio, refundCostAllocation: Types.management.SplitConfigurationLogic.RefundCostAllocationEnum.DeductFromLiableAccount, chargebackCostAllocation: Types.management.SplitConfigurationLogic.ChargebackCostAllocationEnum.DeductFromLiableAccount, commission: commission1, refund: Types.management.SplitConfigurationLogic.RefundEnum.DeductFromOneBalanceAccount }; const splitConfigurationRule1: Types.management.SplitConfigurationRule = { splitLogic: splitConfigurationLogic1, paymentMethod: "ANY", shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.ANY, currency: "ANY", fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY }; const splitConfiguration: Types.management.SplitConfiguration = { description: "Your description for the split configuration profile", rules: [splitConfigurationRule1] }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split instructions that are applied when the predefined conditions are met. You will need these IDs when you want to change the details of the split configuration profile. **Refund and chargeback instructions defined** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000002", "shopperInteraction": "ANY", "splitLogic": { "refund": "deductFromOneBalanceAccount", "refundCostAllocation": "deductFromLiableAccount", "chargeback": "deductAccordingToSplitRatio", "chargebackCostAllocation": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ], "splitConfigurationId": "SCNF00000000000000000000002" } ``` ** #### Book remaining amounts To define to which balance account to book the leftover amount after currency conversion, include the [remainder](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-remainder) parameter in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object. In the following example, we book the leftover amount to your user's balance account. **Define where to book the remainder** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "remainder": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] }' ``` #### Java ```java // Adyen Java API Library v35.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Commission commission1 = new Commission() .variablePercentage(100L) .fixedAmount(10L); SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic() .commission(commission1) .remainder(SplitConfigurationLogic.RemainderEnum.ADDTOONEBALANCEACCOUNT); SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule() .splitLogic(splitConfigurationLogic1) .paymentMethod("ANY") .shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.ANY) .currency("ANY") .fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY); SplitConfiguration splitConfiguration = new SplitConfiguration() .description("Your description for the split configuration profile") .rules(Arrays.asList(splitConfigurationRule1)); // Send the request SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client); SplitConfiguration response = service.createSplitConfiguration("merchantId", splitConfiguration, null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $commission1 = new Commission(); $commission1 ->setVariablePercentage(100) ->setFixedAmount(10); $splitConfigurationLogic1 = new SplitConfigurationLogic(); $splitConfigurationLogic1 ->setCommission($commission1) ->setRemainder("addToOneBalanceAccount"); $splitConfigurationRule1 = new SplitConfigurationRule(); $splitConfigurationRule1 ->setSplitLogic($splitConfigurationLogic1) ->setPaymentMethod("ANY") ->setShopperInteraction("ANY") ->setCurrency("ANY") ->setFundingSource("ANY"); $splitConfiguration = new SplitConfiguration(); $splitConfiguration ->setDescription("Your description for the split configuration profile") ->setRules(array($splitConfigurationRule1)); // Send the request $service = new SplitConfigurationMerchantLevelApi($client); $response = $service->createSplitConfiguration('merchantId', $splitConfiguration); ``` #### C\# ```cs // Adyen .net API Library v31.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Commission commission1 = new Commission { VariablePercentage = 100, FixedAmount = 10 }; SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic { Commission = commission1, Remainder = SplitConfigurationLogic.RemainderEnum.AddToOneBalanceAccount }; SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule { SplitLogic = splitConfigurationLogic1, PaymentMethod = "ANY", ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.ANY, Currency = "ANY", FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY }; SplitConfiguration splitConfiguration = new SplitConfiguration { Description = "Your description for the split configuration profile", Rules = new List{ splitConfigurationRule1 } }; // Send the request var service = new SplitConfigurationMerchantLevelService(client); var response = service.CreateSplitConfiguration("merchantId", splitConfiguration); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v26.1.0 const { Client, ManagementAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const splitConfiguration = { description: "Your description for the split configuration profile", rules: [ { paymentMethod: "ANY", shopperInteraction: "ANY", fundingSource: "ANY", currency: "ANY", splitLogic: { remainder: "addToOneBalanceAccount", commission: { fixedAmount: 10, variablePercentage: 100 } } } ] } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` #### Go ```go // Adyen Go API Library v20.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v20/src/common" "github.com/adyen/adyen-go-api-library/v20/src/adyen" "github.com/adyen/adyen-go-api-library/v20/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) commission1 := management.Commission{ VariablePercentage: common.PtrInt64(100), FixedAmount: common.PtrInt64(10), } splitConfigurationLogic1 := management.SplitConfigurationLogic{ Commission: commission1, Remainder: common.PtrString("addToOneBalanceAccount"), } splitConfigurationRule1 := management.SplitConfigurationRule{ SplitLogic: splitConfigurationLogic1, PaymentMethod: "ANY", ShopperInteraction: "ANY", Currency: "ANY", FundingSource: common.PtrString("ANY"), } splitConfiguration := management.SplitConfiguration{ Description: "Your description for the split configuration profile", Rules: []management.SplitConfigurationRule{ splitConfigurationRule1, }, } // Send the request service := client.Management() req := service.SplitConfigurationMerchantLevelApi.CreateSplitConfigurationInput("merchantId").SplitConfiguration(splitConfiguration) res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateSplitConfiguration(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.4.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "remainder": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v10.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :description => 'Your description for the split configuration profile', :rules => [ { :paymentMethod => 'ANY', :shopperInteraction => 'ANY', :fundingSource => 'ANY', :currency => 'ANY', :splitLogic => { :remainder => 'addToOneBalanceAccount', :commission => { :fixedAmount => 10, :variablePercentage => 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v26.1.0 import { Client, ManagementAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const commission1: Types.management.Commission = { variablePercentage: 100, fixedAmount: 10 }; const splitConfigurationLogic1: Types.management.SplitConfigurationLogic = { commission: commission1, remainder: Types.management.SplitConfigurationLogic.RemainderEnum.AddToOneBalanceAccount }; const splitConfigurationRule1: Types.management.SplitConfigurationRule = { splitLogic: splitConfigurationLogic1, paymentMethod: "ANY", shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.ANY, currency: "ANY", fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY }; const splitConfiguration: Types.management.SplitConfiguration = { description: "Your description for the split configuration profile", rules: [splitConfigurationRule1] }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split instructions that are applied when the predefined conditions are met. You will need these IDs when you want to change the details of the split configuration profile. **Refund and chargeback instructions defined** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000003", "shopperInteraction": "ANY", "splitLogic": { "remainder": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ], "splitConfigurationId": "SCNF00000000000000000000003" } ``` ** #### Book DCC markups * Dynamic Currency Conversion (DCC) is only supported for in-person payments. * DCC is currently in pilot phase, and not yet available for all platforms. When a customer opts to use Dynamic Currency Conversion (DCC) at the payment terminal, in addition to the current exchange rate, they pay an additional markup on the transaction. Adyen uses a revenue share model, where the revenue from the markup is split between your platform, your user, and Adyen. After deducting the portion of the markup that Adyen keeps, you can choose how to split the remaining markup amount between your platform and your user. To define this logic in your split configuration, include the following parameter in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object: | Parameter | Required | Description | | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `dcc.accountHolderPercentage` | | The percentage of the DCC markup that must be booked to your user, in basis points. This amount is booked to the balance account you define when you [link the profile to a store](/platforms/automatic-split-configuration/create-split-configuration?tab=api_2#link-profile-to-store). The remaining markup amount goes to your platform and is booked to your liable balance account. | In the following example, we create a split configuration that splits the DCC markup between your user and your platform as follows: * 60% of the markup must be booked to your user. * 40% of the markup must be booked to your platform. **Define DCC markup instructions** ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "dcc": { "accountHolderPercentage": 6000 } } } ] }' ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split instructions that are applied when the predefined conditions are met. You will need these IDs when you want to change the details of the split configuration profile. **DCC markup instructions defined** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000005", "shopperInteraction": "ANY", "splitLogic": { "dcc": { "accountHolderPercentage": 6000 } } } ], "splitConfigurationId": "SCNF00000000000000000000005" } ``` ** #### Book tips and surcharges [Surcharges](/platforms/in-person-payments/surcharge) can only be configured for payments initiated in Australia and New Zealand. You can join a pilot in Canada, Europe, and the United States. To define the split instructions for potential tips and surcharges, you can include the following parameters in the [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic) object: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------- | | [surcharge](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-surcharge) | | Define to which balance account to book surcharges. | | [tip](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic-tip) | | Define to which balance account to book the gratuity. | In the following example, we create a split configuration profile that books both the tip and surcharge to your user's balance account. **Define tip and surcharge instructions** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "tip": "addToOneBalanceAccount", "surcharge": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] }' ``` #### Java ```java // Adyen Java API Library v35.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Commission commission1 = new Commission() .variablePercentage(100L) .fixedAmount(10L); SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic() .surcharge(SplitConfigurationLogic.SurchargeEnum.ADDTOONEBALANCEACCOUNT) .tip(SplitConfigurationLogic.TipEnum.ADDTOONEBALANCEACCOUNT) .commission(commission1); SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule() .splitLogic(splitConfigurationLogic1) .paymentMethod("ANY") .shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.ANY) .currency("ANY") .fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY); SplitConfiguration splitConfiguration = new SplitConfiguration() .description("Your description for the split configuration profile") .rules(Arrays.asList(splitConfigurationRule1)); // Send the request SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client); SplitConfiguration response = service.createSplitConfiguration("merchantId", splitConfiguration, null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $commission1 = new Commission(); $commission1 ->setVariablePercentage(100) ->setFixedAmount(10); $splitConfigurationLogic1 = new SplitConfigurationLogic(); $splitConfigurationLogic1 ->setSurcharge("addToOneBalanceAccount") ->setTip("addToOneBalanceAccount") ->setCommission($commission1); $splitConfigurationRule1 = new SplitConfigurationRule(); $splitConfigurationRule1 ->setSplitLogic($splitConfigurationLogic1) ->setPaymentMethod("ANY") ->setShopperInteraction("ANY") ->setCurrency("ANY") ->setFundingSource("ANY"); $splitConfiguration = new SplitConfiguration(); $splitConfiguration ->setDescription("Your description for the split configuration profile") ->setRules(array($splitConfigurationRule1)); // Send the request $service = new SplitConfigurationMerchantLevelApi($client); $response = $service->createSplitConfiguration('merchantId', $splitConfiguration); ``` #### C\# ```cs // Adyen .net API Library v31.0.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Commission commission1 = new Commission { VariablePercentage = 100, FixedAmount = 10 }; SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic { Surcharge = SplitConfigurationLogic.SurchargeEnum.AddToOneBalanceAccount, Tip = SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount, Commission = commission1 }; SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule { SplitLogic = splitConfigurationLogic1, PaymentMethod = "ANY", ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.ANY, Currency = "ANY", FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY }; SplitConfiguration splitConfiguration = new SplitConfiguration { Description = "Your description for the split configuration profile", Rules = new List{ splitConfigurationRule1 } }; // Send the request var service = new SplitConfigurationMerchantLevelService(client); var response = service.CreateSplitConfiguration("merchantId", splitConfiguration); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v26.1.0 const { Client, ManagementAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const splitConfiguration = { description: "Your description for the split configuration profile", rules: [ { paymentMethod: "ANY", shopperInteraction: "ANY", fundingSource: "ANY", currency: "ANY", splitLogic: { tip: "addToOneBalanceAccount", surcharge: "addToOneBalanceAccount", commission: { fixedAmount: 10, variablePercentage: 100 } } } ] } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` #### Go ```go // Adyen Go API Library v20.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v20/src/common" "github.com/adyen/adyen-go-api-library/v20/src/adyen" "github.com/adyen/adyen-go-api-library/v20/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) commission1 := management.Commission{ VariablePercentage: common.PtrInt64(100), FixedAmount: common.PtrInt64(10), } splitConfigurationLogic1 := management.SplitConfigurationLogic{ Surcharge: common.PtrString("addToOneBalanceAccount"), Tip: common.PtrString("addToOneBalanceAccount"), Commission: commission1, } splitConfigurationRule1 := management.SplitConfigurationRule{ SplitLogic: splitConfigurationLogic1, PaymentMethod: "ANY", ShopperInteraction: "ANY", Currency: "ANY", FundingSource: common.PtrString("ANY"), } splitConfiguration := management.SplitConfiguration{ Description: "Your description for the split configuration profile", Rules: []management.SplitConfigurationRule{ splitConfigurationRule1, }, } // Send the request service := client.Management() req := service.SplitConfigurationMerchantLevelApi.CreateSplitConfigurationInput("merchantId").SplitConfiguration(splitConfiguration) res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateSplitConfiguration(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.4.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "tip": "addToOneBalanceAccount", "surcharge": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v10.2.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :description => 'Your description for the split configuration profile', :rules => [ { :paymentMethod => 'ANY', :shopperInteraction => 'ANY', :fundingSource => 'ANY', :currency => 'ANY', :splitLogic => { :tip => 'addToOneBalanceAccount', :surcharge => 'addToOneBalanceAccount', :commission => { :fixedAmount => 10, :variablePercentage => 100 } } } ] } # Send the request result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v26.1.0 import { Client, ManagementAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" }); // Create the request object(s) const commission1: Types.management.Commission = { variablePercentage: 100, fixedAmount: 10 }; const splitConfigurationLogic1: Types.management.SplitConfigurationLogic = { surcharge: Types.management.SplitConfigurationLogic.SurchargeEnum.AddToOneBalanceAccount, tip: Types.management.SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount, commission: commission1 }; const splitConfigurationRule1: Types.management.SplitConfigurationRule = { splitLogic: splitConfigurationLogic1, paymentMethod: "ANY", shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.ANY, currency: "ANY", fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY }; const splitConfiguration: Types.management.SplitConfiguration = { description: "Your description for the split configuration profile", rules: [splitConfigurationRule1] }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split instructions that are applied when the predefined conditions are met. You will need these IDs when you want to change the details of the split configuration profile. **Tip and surcharge instructions defined** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000004", "shopperInteraction": "ANY", "splitLogic": { "tip": "addToOneBalanceAccount", "surcharge": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 } } } ], "splitConfigurationId": "SCNF00000000000000000000004" } ``` ### Example: Create a split configuration profile In the following example, we create a split configuration profile with a catch-all rule that splits all payments processed through the store automatically: * All **transaction fees** and **chargeback** amounts and fees are deducted from your **liable balance account**. * The **refund amount** is deducted according to the **original payment's split ratio** (divided between your liable balance account and your user's balance account). * The **fees** associated with the refund are booked to **your user's balance account**. * **Tips** (only for in-person payments)and the **remainder** amount (left over after currency conversion for online payments) are booked to **your user's balance account**. * Your platform's **commission** (in the default currency) is set at USD 0.10 + 1%, booked to your **liable balance account**. * An **additional commission** is set at USD 0.05 + 0.5%, booked to **your user's balance account**. * Any markup earned from Dynamic Currency Conversion for in-person payments is booked as follows: * 60% of the markup is booked to your user. * 40% of the markup is booked to your platform. In your request, all amounts must be specified in minor units. All percentages must be specified in basis points. **Create a split configuration profile with one rule** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "cardRegion": "ANY", "currency": "ANY", "splitLogic": { "paymentFee": "deductFromLiableAccount", "chargeback": "deductFromLiableAccount", "tip": "addToOneBalanceAccount", "remainder": "addToOneBalanceAccount", "commission": { "fixedAmount": 5, "variablePercentage": 50 }, "dcc": { "accountHolderPercentage": 6000 }, "additionalCommission": { "fixedAmount": 5, "variablePercentage": 50, "balanceAccountId": "BA00000000000000000000001" }, "refund": "deductAccordingToSplitRatio", "refundCostAllocation": "deductFromOneBalanceAccount" } } ] }' ``` #### Java ```java // Adyen Java API Library v25.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) AdditionalCommission additionalCommission1 = new AdditionalCommission() .balanceAccountId("BA00000000000000000000001") .variablePercentage(50L) .fixedAmount(5L); Commission commission1 = new Commission() .variablePercentage(100L) .fixedAmount(10L); SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic() .paymentFee(SplitConfigurationLogic.PaymentFeeEnum.DEDUCTFROMLIABLEACCOUNT) .chargeback(SplitConfigurationLogic.ChargebackEnum.DEDUCTFROMLIABLEACCOUNT) .additionalCommission(additionalCommission1) .refundCostAllocation(SplitConfigurationLogic.RefundCostAllocationEnum.DEDUCTFROMONEBALANCEACCOUNT) .tip(SplitConfigurationLogic.TipEnum.ADDTOONEBALANCEACCOUNT) .commission(commission1) .remainder(SplitConfigurationLogic.RemainderEnum.ADDTOONEBALANCEACCOUNT) .refund(SplitConfigurationLogic.RefundEnum.DEDUCTACCORDINGTOSPLITRATIO); SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule() .splitLogic(splitConfigurationLogic1) .paymentMethod("ANY") .shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.ANY) .currency("ANY") .fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY); SplitConfiguration splitConfiguration = new SplitConfiguration() .description("Your description for the split configuration profile") .rules(Arrays.asList(splitConfigurationRule1)); // Make the API call SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client); SplitConfiguration response = service.createSplitConfiguration("merchantId", splitConfiguration, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Management\AdditionalCommission; use Adyen\Model\Management\SplitConfigurationLogic; use Adyen\Model\Management\SplitConfigurationRule; use Adyen\Service\Management\SplitConfigurationMerchantLevelApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $additionalCommission1 = new AdditionalCommission(); $additionalCommission1 ->setBalanceAccountId("BA00000000000000000000001") ->setVariablePercentage(50) ->setFixedAmount(5); $commission1 = new Commission(); $commission1 ->setVariablePercentage(100) ->setFixedAmount(10); $splitConfigurationLogic1 = new SplitConfigurationLogic(); $splitConfigurationLogic1 ->setPaymentFee("deductFromLiableAccount") ->setChargeback("deductFromLiableAccount") ->setAdditionalCommission($additionalCommission1) ->setRefundCostAllocation("deductFromOneBalanceAccount") ->setTip("addToOneBalanceAccount") ->setCommission($commission1) ->setRemainder("addToOneBalanceAccount") ->setRefund("deductAccordingToSplitRatio"); $splitConfigurationRule1 = new SplitConfigurationRule(); $splitConfigurationRule1 ->setSplitLogic($splitConfigurationLogic1) ->setPaymentMethod("ANY") ->setShopperInteraction("ANY") ->setCurrency("ANY") ->setFundingSource("ANY"); $splitConfiguration = new SplitConfiguration(); $splitConfiguration ->setDescription("Your description for the split configuration profile") ->setRules(array($splitConfigurationRule1)); // Make the API call $service = new SplitConfigurationMerchantLevelApi($client); $response = $service->createSplitConfiguration('merchantId', $splitConfiguration); ``` #### C\# ```cs // Adyen .net API Library v14.4.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) AdditionalCommission additionalCommission1 = new AdditionalCommission { BalanceAccountId = "BA00000000000000000000001", VariablePercentage = 50, FixedAmount = 5 }; Commission commission1 = new Commission { VariablePercentage = 100, FixedAmount = 10 }; SplitConfigurationLogic splitConfigurationLogic1 = new SplitConfigurationLogic { PaymentFee = SplitConfigurationLogic.PaymentFeeEnum.DeductFromLiableAccount, Chargeback = SplitConfigurationLogic.ChargebackEnum.DeductFromLiableAccount, AdditionalCommission = additionalCommission1, RefundCostAllocation = SplitConfigurationLogic.RefundCostAllocationEnum.DeductFromOneBalanceAccount, Tip = SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount, Commission = commission1, Remainder = SplitConfigurationLogic.RemainderEnum.AddToOneBalanceAccount, Refund = SplitConfigurationLogic.RefundEnum.DeductAccordingToSplitRatio }; SplitConfigurationRule splitConfigurationRule1 = new SplitConfigurationRule { SplitLogic = splitConfigurationLogic1, PaymentMethod = "ANY", ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.ANY, Currency = "ANY", FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY }; SplitConfiguration splitConfiguration = new SplitConfiguration { Description = "Your description for the split configuration profile", Rules = new List{ splitConfigurationRule1 } }; // Make the API call var service = new SplitConfigurationMerchantLevelService(client); var response = service.CreateSplitConfiguration("merchantId", splitConfiguration); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v16.2.0 // Require the parts of the module you want to use const { Client, ManagementAPI } = require('@adyen/api-library'); // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const splitConfiguration = { description: "Your description for the split configuration profile", rules: [ { paymentMethod: "ANY", shopperInteraction: "ANY", fundingSource: "ANY", currency: "ANY", splitLogic: { paymentFee: "deductFromLiableAccount", chargeback: "deductFromLiableAccount", tip: "addToOneBalanceAccount", remainder: "addToOneBalanceAccount", commission: { fixedAmount: 10, variablePercentage: 100 }, additionalCommission: { fixedAmount: 5, variablePercentage: 50, balanceAccountId: "BA00000000000000000000001" }, refund: "deductAccordingToSplitRatio", refundCostAllocation: "deductFromOneBalanceAccount" } } ] } // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` #### Go ```go // Adyen Go API Library v9.3.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) additionalCommission1 := management.AdditionalCommission{ BalanceAccountId: common.PtrString("BA00000000000000000000001"), VariablePercentage: common.PtrInt64(50), FixedAmount: common.PtrInt64(5), } commission1 := management.Commission{ VariablePercentage: common.PtrInt64(100), FixedAmount: common.PtrInt64(10), } splitConfigurationLogic1 := management.SplitConfigurationLogic{ PaymentFee: common.PtrString("deductFromLiableAccount"), Chargeback: common.PtrString("deductFromLiableAccount"), AdditionalCommission: &additionalCommission1, RefundCostAllocation: common.PtrString("deductFromOneBalanceAccount"), Tip: common.PtrString("addToOneBalanceAccount"), Commission: commission1, Remainder: common.PtrString("addToOneBalanceAccount"), Refund: common.PtrString("deductAccordingToSplitRatio"), } splitConfigurationRule1 := management.SplitConfigurationRule{ SplitLogic: splitConfigurationLogic1, PaymentMethod: "ANY", ShopperInteraction: "ANY", Currency: "ANY", FundingSource: common.PtrString("ANY"), } splitConfiguration := management.SplitConfiguration{ Description: "Your description for the split configuration profile", Rules: []management.SplitConfigurationRule{ splitConfigurationRule1, }, } // Make the API call service := client.Management() req := service.SplitConfigurationMerchantLevelApi.CreateSplitConfigurationInput("merchantId").SplitConfiguration(splitConfiguration) res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateSplitConfiguration(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.2.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "Your description for the split configuration profile", "rules": [ { "paymentMethod": "ANY", "shopperInteraction": "ANY", "fundingSource": "ANY", "currency": "ANY", "splitLogic": { "paymentFee": "deductFromLiableAccount", "chargeback": "deductFromLiableAccount", "tip": "addToOneBalanceAccount", "remainder": "addToOneBalanceAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 }, "additionalCommission": { "fixedAmount": 5, "variablePercentage": 50, "balanceAccountId": "BA00000000000000000000001" }, "refund": "deductAccordingToSplitRatio", "refundCostAllocation": "deductFromOneBalanceAccount" } } ] } # Make the API call result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.3.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :description => 'Your description for the split configuration profile', :rules => [ { :paymentMethod => 'ANY', :shopperInteraction => 'ANY', :fundingSource => 'ANY', :currency => 'ANY', :splitLogic => { :paymentFee => 'deductFromLiableAccount', :chargeback => 'deductFromLiableAccount', :tip => 'addToOneBalanceAccount', :remainder => 'addToOneBalanceAccount', :commission => { :fixedAmount => 10, :variablePercentage => 100 }, :additionalCommission => { :fixedAmount => 5, :variablePercentage => 50, :balanceAccountId => 'BA00000000000000000000001' }, :refund => 'deductAccordingToSplitRatio', :refundCostAllocation => 'deductFromOneBalanceAccount' } } ] } # Make the API call result = adyen.management.split_configuration_merchant_level_api.create_split_configuration(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.2.0 // Require the parts of the module you want to use import { Client, ManagementAPI, Types } from "@adyen/api-library"; // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const additionalCommission1: Types.management.AdditionalCommission = { balanceAccountId: "BA00000000000000000000001", variablePercentage: 50, fixedAmount: 5 }; const commission1: Types.management.Commission = { variablePercentage: 100, fixedAmount: 10 }; const splitConfigurationLogic1: Types.management.SplitConfigurationLogic = { paymentFee: Types.management.SplitConfigurationLogic.PaymentFeeEnum.DeductFromLiableAccount, chargeback: Types.management.SplitConfigurationLogic.ChargebackEnum.DeductFromLiableAccount, additionalCommission: additionalCommission1, refundCostAllocation: Types.management.SplitConfigurationLogic.RefundCostAllocationEnum.DeductFromOneBalanceAccount, tip: Types.management.SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount, commission: commission1, remainder: Types.management.SplitConfigurationLogic.RemainderEnum.AddToOneBalanceAccount, refund: Types.management.SplitConfigurationLogic.RefundEnum.DeductAccordingToSplitRatio }; const splitConfigurationRule1: Types.management.SplitConfigurationRule = { splitLogic: splitConfigurationLogic1, paymentMethod: "ANY", shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.ANY, currency: "ANY", fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY }; const splitConfiguration: Types.management.SplitConfiguration = { description: "Your description for the split configuration profile", rules: [splitConfigurationRule1] }; // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.SplitConfigurationMerchantLevelApi.createSplitConfiguration("merchantId", splitConfiguration); ``` The response returns the following resources: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): The unique identifier of the split configuration profile. * [ruleId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#responses-200-rules-ruleId): The unique identifier of the split configuration rule. * [splitLogicId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-rules-splitLogic-splitLogicId): The unique identifier of the split logic that is applied when the conditions of the rule are met. You will need these IDs when you want to change the details of the split configuration profile. **Split configuration profile created** ```json { "description": "Your description for the split configuration profile", "rules": [ { "currency": "ANY", "fundingSource": "ANY", "cardRegion": "ANY", "paymentMethod": "ANY", "ruleId": "SCRL00000000000000000000001", "shopperInteraction": "ANY", "splitLogic": { "additionalCommission": { "balanceAccountId": "BA00000000000000000000001", "fixedAmount": 5, "variablePercentage": 50 }, "chargeback": "deductFromLiableAccount", "commission": { "fixedAmount": 10, "variablePercentage": 100 }, "dcc": { "accountHolderPercentage": 6000 }, "paymentFee": "deductFromLiableAccount", "refund": "deductAccordingToSplitRatio", "refundCostAllocation": "deductFromOneBalanceAccount", "remainder": "addToOneBalanceAccount", "splitLogicId": "SCLG00000000000000000000001", "tip": "addToOneBalanceAccount" } } ], "splitConfigurationId": "SCNF00000000000000000000001" } ``` ## Link the profile to a store You must link the split configuration profile to your user's store using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview). You have two options: * **Create** a new store with the split configuration profile by making a POST [/stores](https://docs.adyen.com/api-explorer/Management/latest/post/stores) request. * **Update** an existing store with the split configuration profile, by making a PATCH [/stores/{storeId}](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)) request. In the body of either request, include the [splitConfiguration](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-splitConfiguration) object with the following parameters: * [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-splitConfiguration-splitConfigurationId): The unique identifier of the split configuration profile. * [balanceAccountId](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-splitConfiguration-balanceAccountId): The unique identifier of the balance account to which the split amounts and fees must be booked, depending on the defined split logic. After the store is successfully created or updated, Adyen starts evaluating every transaction processed through the store and applies the split instructions of the rule with the [highest priority condition](/platforms/automatic-split-configuration#rule-hierarchy). The following example shows how you can apply a split configuration profile to all payments processed through an existing store. **Add split configuration profile to a store** #### curl ```bash curl https://management-test.adyen.com/v3/stores/ST00000000000000000000001 \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "splitConfiguration": { "balanceAccountId": "BA00000000000000000000001", "splitConfigurationId": "SCNF00000000000000000000001" } }' ``` #### Java ```java // Adyen Java API Library v25.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.management.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) StoreSplitConfiguration storeSplitConfiguration = new StoreSplitConfiguration() .balanceAccountId("BA00000000000000000000001") .splitConfigurationId("SCNF00000000000000000000001"); UpdateStoreRequest updateStoreRequest = new UpdateStoreRequest() .splitConfiguration(storeSplitConfiguration); // Make the API call AccountStoreLevelApi service = new AccountStoreLevelApi(client); Store response = service.updateStoreById("storeId", updateStoreRequest, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Management\StoreSplitConfiguration; use Adyen\Model\Management\UpdateStoreRequest; use Adyen\Service\Management\AccountStoreLevelApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $storeSplitConfiguration = new StoreSplitConfiguration(); $storeSplitConfiguration ->setBalanceAccountId("BA00000000000000000000001") ->setSplitConfigurationId("SCNF00000000000000000000001"); $updateStoreRequest = new UpdateStoreRequest(); $updateStoreRequest ->setSplitConfiguration($storeSplitConfiguration); // Make the API call $service = new AccountStoreLevelApi($client); $response = $service->updateStoreById('storeId', $updateStoreRequest); ``` #### C\# ```cs // Adyen .net API Library v14.4.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Management; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) StoreSplitConfiguration storeSplitConfiguration = new StoreSplitConfiguration { BalanceAccountId = "BA00000000000000000000001", SplitConfigurationId = "SCNF00000000000000000000001" }; UpdateStoreRequest updateStoreRequest = new UpdateStoreRequest { SplitConfiguration = storeSplitConfiguration }; // Make the API call var service = new AccountStoreLevelService(client); var response = service.UpdateStoreById("storeId", updateStoreRequest); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v16.2.0 // Require the parts of the module you want to use const { Client, ManagementAPI } = require('@adyen/api-library'); // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const updateStoreRequest = { splitConfiguration: { balanceAccountId: "BA00000000000000000000001", splitConfigurationId: "SCNF00000000000000000000001" } } // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.updateStoreById("storeId", updateStoreRequest); ``` #### Go ```go // Adyen Go API Library v9.3.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) storeSplitConfiguration := management.StoreSplitConfiguration{ BalanceAccountId: common.PtrString("BA00000000000000000000001"), SplitConfigurationId: common.PtrString("SCNF00000000000000000000001"), } updateStoreRequest := management.UpdateStoreRequest{ SplitConfiguration: &storeSplitConfiguration, } // Make the API call service := client.Management() req := service.AccountStoreLevelApi.UpdateStoreByIdInput("storeId").UpdateStoreRequest(updateStoreRequest) res, httpRes, err := service.AccountStoreLevelApi.UpdateStoreById(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.2.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "splitConfiguration": { "balanceAccountId": "BA00000000000000000000001", "splitConfigurationId": "SCNF00000000000000000000001" } } # Make the API call result = adyen.management.account_store_level_api.update_store_by_id(request=json_request, storeId="storeId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.3.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :splitConfiguration => { :balanceAccountId => 'BA00000000000000000000001', :splitConfigurationId => 'SCNF00000000000000000000001' } } # Make the API call result = adyen.management.account_store_level_api.update_store_by_id(request_body, 'storeId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.2.0 // Require the parts of the module you want to use import { Client, ManagementAPI, Types } from "@adyen/api-library"; // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const storeSplitConfiguration: Types.management.StoreSplitConfiguration = { balanceAccountId: "BA00000000000000000000001", splitConfigurationId: "SCNF00000000000000000000001" }; const updateStoreRequest: Types.management.UpdateStoreRequest = { splitConfiguration: storeSplitConfiguration }; // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.updateStoreById("storeId", updateStoreRequest); ``` The response contains the full store details, including the split configuration profile information. **Split configuration profile added to store** ```json { "id": "ST00000000000000000000001", "address":{ "country": "US", "line1": "1776 West Pinewood Avenue", "line2": "Heartland Building", "city": "Springfield", "stateOrProvince": "NY", "postalCode":"20251" }, "description": "City Centre store", "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", "phoneNumber": "+1813702551707653", "reference": "Spring_store_2", "splitConfiguration": { "balanceAccountId": "BA00000000000000000000001", "splitConfigurationId": "SCNF00000000000000000000001" }, "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/latest/stores/ST00000000000000000000001" } } } ``` ## Next steps [Manage split configuration profiles](/platforms/automatic-split-configuration/manage-split-configurations) [View, update, or delete split configuration profiles.](/platforms/automatic-split-configuration/manage-split-configurations)