- Create a split configuration profile in your Customer Area or using the Management API.
- Link the profile to your user’s store when you create or update the store using the Management API. It is not possible to link profiles to stores using the Customer Area, unless you onboarded your user through 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 integration on Adyen for Platforms. |
| API credential roles | If you want to create and manage split configuration profiles through API requests, your Management API credential must have the following role: Management API—SplitConfiguration read and write |
| Customer Area roles | If you want to create and manage split configuration profiles in your Customer Area, ask our Support Team 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. 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. |
| Setup steps | Before you begin, contact our Support Team 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, or by using the Management API.- Customer Area
- Management API
To create a split configuration profile:
- In your Customer Area, switch to the appropriate merchant account.
- Go to Platform > New split configuration.
- Select Create new profile.
- Enter a name for the profile.
-
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, for example, configure different instructions for Apple Pay - Mastercard and Apple Pay - Visa. See the list of supported payment methods and payment method variants. 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 on their specific payment method page. - Select Continue.
-
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 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 Additional variable fee: a percentage of the payment Deduct payment fees Select the balance account to which you want to book the 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 - Select Preview and review the summary of the split logic and rule.
- Select Save.
The following sections describe the general instructions on how to create a split configuration profile, and then go into more detail for all possible split instructions.
You can send the following combinations in the The response returns the following resources:**
In the following example, we create a split configuration profile that books:The response returns the following resources:**The response returns the following resources:**
In the following example, we create a split configuration that splits the DCC markup between your user and your platform as follows:The response returns the following resources:**The response returns the following resources:The response returns the following resources:The response contains the full store details, including the split configuration profile information.Split configuration profile added to store
General instructions
To create a split configuration profile, make a POST /merchants/{merchantId}/splitConfigurations request, specifying your merchantId in the path. In the body of the request, include thedescription field and rules array.In the rules array, include the following parameters for each rule:| Parameter | Required | Description |
|---|---|---|
| currency | Define whether the rule applies to a specific currency, or all currencies. | |
| paymentMethod | 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 as well, for example, configure different instructions for visagold and visasignature. | |
| 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 ANYThis condition is in pilot phase, and not yet available for all platforms. | |
| fundingSource | Define whether the rule applies only to payments initiated with a specific type of card, or all card types. | |
| shopperInteraction | Define whether the rule applies to a specific sales channel, or all channels. | |
| splitLogic | Define the split logic that is applied if the rule conditions are met. For instructions, see Optional configuration. | |
| splitLogic.commission | Define your platform’s commission for the payments. This can be a fixed amount, a percentage, or both. | |
| 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 object, you can define to which balance account to book:- The different types of transaction fees associated with the payment.
- Potential refunds, chargebacks, and their associated fees.
- The remaining amount after currency conversion for online payments.
- The markup paid by the customer for converting the currency of in-person payments.
- The tips and surcharges for in-person payments.
splitLogic object of the split configuration profile.**Book transaction fees
To book the transaction fees associated with the payment to different balance accounts, you must include at least one of the following parameters in the splitLogic object:| Parameter | Required | Description | Limitation |
|---|---|---|---|
| paymentFee | 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 | 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 | 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 | 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 | 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 | Required if you sendschemeFee, 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 | Required if you sendinterchange, 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. |
splitLogic array:paymentFeeaquiringFeesandadyenFeesinterchange,schemeFee,adyenCommission, andadyenMarkup
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
}
}
}
]
}'
// 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
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\Commission;
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)
$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);
// 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<SplitConfigurationRule>{ splitConfigurationRule1 }
};
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateSplitConfiguration("merchantId", splitConfiguration);
// 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);
// 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)
# 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")
# 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')
// 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);
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split instructions that are applied when the predefined conditions are met.
{
"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 object.| Parameter | Required | Description |
|---|---|---|
| refund | 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 | Define to which balance account to book the fees incurred by the refund. | |
| chargeback | 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 | Define to which balance account to book the fees incurred by the chargeback. |
- 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.
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
}
}
}
]
}'
// 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
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\Commission;
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)
$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);
// 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<SplitConfigurationRule>{ splitConfigurationRule1 }
};
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateSplitConfiguration("merchantId", splitConfiguration);
// 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);
// 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)
# 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")
# 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')
// 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);
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split instructions that are applied when the predefined conditions are met.
{
"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 parameter in the splitLogic object.In the following example, we book the leftover amount to your user’s balance account.Define where to book the remaindercurl 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
}
}
}
]
}'
// 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
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\Commission;
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)
$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);
// 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<SplitConfigurationRule>{ splitConfigurationRule1 }
};
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateSplitConfiguration("merchantId", splitConfiguration);
// 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);
// 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)
# 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")
# 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')
// 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);
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split instructions that are applied when the predefined conditions are met.
{
"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.
| 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. The remaining markup amount goes to your platform and is booked to your liable balance account. |
- 60% of the markup must be booked to your user.
- 40% of the markup must be booked to your platform.
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
}
}
}
]
}'
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split instructions that are applied when the predefined conditions are met.
{
"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 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 object: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 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
}
}
}
]
}'
// 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
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\Commission;
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)
$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);
// 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<SplitConfigurationRule>{ splitConfigurationRule1 }
};
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateSplitConfiguration("merchantId", splitConfiguration);
// 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);
// 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)
# 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")
# 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')
// 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);
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split instructions that are applied when the predefined conditions are met.
{
"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.
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"
}
}
]
}'
// 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);
// 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);
// 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<SplitConfigurationRule>{ splitConfigurationRule1 }
};
// Make the API call
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateSplitConfiguration("merchantId", splitConfiguration);
// 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);
// 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)
# 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")
# 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')
// 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);
- splitConfigurationId: The unique identifier of the split configuration profile.
- ruleId: The unique identifier of the split configuration rule.
- splitLogicId: The unique identifier of the split logic that is applied when the conditions of the rule are met.
{
"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. You have two options:- Create a new store with the split configuration profile by making a POST /stores request.
- Update an existing store with the split configuration profile, by making a PATCH /stores/{storeId} request.
- splitConfigurationId: The unique identifier of the split configuration profile.
- balanceAccountId: The unique identifier of the balance account to which the split amounts and fees must be booked, depending on the defined split logic.
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"
}
}'
// 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);
// 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);
// 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);
// 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);
// 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)
# 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")
# 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')
// 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);
{
"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"
}
}
}