- Get a list of all your split configuration profiles or the details of a specific profile.
- Add a rule to or remove a rule from a profile.
- Change the description, conditions, or split logic of a rule.
- Delete a profile.
Requirements
Take into account the following requirements, limitations, and preparations for managing split configuration profiles.| Requirement | Description |
|---|---|
| Integration type | You must have a platform model integration on Adyen for Platforms. |
| API credential roles | Your Management API credential must have the following role: Management API—SplitConfiguration read and write |
| Limitations | The card region condition is in pilot phase, and not yet available for all platforms. |
| Setup steps | You must have the IDs of the resources you want to update (split configuration profile, rule, or split logic) available. |
Get a list of all profiles
To get the details of all split configuration profiles in your merchant account, make a GET /merchants/{merchantId}/splitConfigurations request with the ID of your merchant account in the path. Get a list of profilescurl https://management-test.adyen.com/v3/merchants/{merchantId}/splitConfigurations \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X GET \
-d
// Adyen Java API Library v38.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);
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfigurationList response = service.listSplitConfigurations("merchantId", null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->listSplitConfigurations('merchantId');
// Adyen .net API Library v32.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);
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.ListSplitConfigurations("merchantId");
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.listSplitConfigurations("merchantId");
// 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,
})
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.ListSplitConfigurationsInput("merchantId")
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.ListSplitConfigurations(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.
# Send the request
result = adyen.management.split_configuration_merchant_level_api.list_split_configurations(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
# Send the request
result = adyen.management.split_configuration_merchant_level_api.list_split_configurations('merchantId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.listSplitConfigurations("merchantId");
{
"data": [
{
"description": "Your description for the split configuration",
"rules": [
{
"currency": "GBP",
"fundingSource": "ANY",
"cardRegion": "international",
"paymentMethod": "ANY",
"ruleId": "SCRL4224P22322585HP89PPCST6BCZ",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 100,
"balanceAccountId": "BA3227C223222H5HQ2XX77VVH"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 200,
"variablePercentage": 100
},
"dcc":{
"accountHolderPercentage": 6000
},
"paymentFee": "deductFromLiableAccount",
"remainder": "addToOneBalanceAccount",
"splitLogicId": "SCLG4224P22322585HP89PPCSV27VP",
"tip": "addToOneBalanceAccount"
}
}
],
"splitConfigurationId": "SCNF4224P22322585HP89PPCSS24MF"
},
{
"description": "Your description for the second split configuration",
"rules": [
{
"currency": "ANY",
"fundingSource": "ANY",
"cardRegion": "intraRegional",
"paymentMethod": "ANY",
"ruleId": "SCRL4224P22322585HPCX384JW65VW",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA3227C223222H5HQ2XX77VVH"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"dcc":{
"accountHolderPercentage": 2000
},
"splitLogicId": "SCLG4224P22322585HPCX384JX52M2",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToOneBalanceAccount",
"tip": "addToOneBalanceAccount"
}
},
{
"currency": "USD",
"fundingSource": "ANY",
"cardRegion": "domestic",
"paymentMethod": "visa",
"ruleId": "SCRL4224P22322585HPCX5V4KV6L2R",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA3227C223222H5HQ2XX77VVH"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100,
"variablePercentage": 100
},
"dcc":{
"accountHolderPercentage": 5000
},
"splitLogicId": "SCLG4224P22322585HPCX5V4KW26C9",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
}
],
"splitConfigurationId": "SCNF4224P22322585HPCX384JV6JGX"
}
]
}
Get profile details
To get the details of a specific split configuration profile, make a GET /merchants/{merchantId}/splitConfigurations/{splitConfigurationId} request with the ID of your merchant account and the profile in the path. Get profile detailscurl https://management-test.adyen.com/v3/merchants/{merchantId}/splitConfigurations/{splitConfigurationId} \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X GET \
-d
// Adyen Java API Library v38.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);
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.getSplitConfiguration("merchantId", "splitConfigurationId", null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->getSplitConfiguration('merchantId', 'splitConfigurationId');
// Adyen .net API Library v32.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);
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.GetSplitConfiguration("merchantId", "splitConfigurationId");
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.getSplitConfiguration("merchantId", "splitConfigurationId");
// 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,
})
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.GetSplitConfigurationInput("merchantId","splitConfigurationId")
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.GetSplitConfiguration(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.
# Send the request
result = adyen.management.split_configuration_merchant_level_api.get_split_configuration(merchantId="merchantId", splitConfigurationId="splitConfigurationId")
# 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
# Send the request
result = adyen.management.split_configuration_merchant_level_api.get_split_configuration('merchantId', 'splitConfigurationId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.getSplitConfiguration("merchantId", "splitConfigurationId");
{
"description": "Your description for the split configuration",
"rules": [
{
"currency": "ANY",
"fundingSource": "ANY",
"cardRegion": "intraRegional",
"paymentMethod": "ANY",
"ruleId": "SCRL4224P22322585HPCX384JW65VW",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA3227C223222H5HQ2XX77VVH"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"dcc":{
"accountHolderPercentage": 5500
},
"splitLogicId": "SCLG4224P22322585HPCX384JX52M2",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToOneBalanceAccount",
"tip": "addToOneBalanceAccount"
}
},
{
"currency": "USD",
"fundingSource": "ANY",
"cardRegion": "domestic",
"paymentMethod": "visa",
"ruleId": "SCRL4224P22322585HPCX5V4KV6L2R",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA3227C223222H5HQ2XX77VVH"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100,
"variablePercentage": 100
},
"dcc":{
"accountHolderPercentage": 2500
},
"splitLogicId": "SCLG4224P22322585HPCX5V4KW26C9",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
}
],
"splitConfigurationId": "SCNF4224P22322585HPCX384JV6JGX"
}
Add a rule
To add a rule to an existing split configuration profile, make a POST /merchants/{merchantId}/splitConfigurations/{splitConfigurationId} request with the ID of your merchant account and the profile in the path. In the body of the request, include the following fields:| 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"
}
curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001 \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
"paymentMethod": "visa",
"shopperInteraction": "POS",
"fundingSource": "ANY",
"currency": "USD",
"splitLogic": {
"paymentFee": "deductFromLiableAccount",
"chargeback": "deductFromLiableAccount",
"tip": "addToOneBalanceAccount",
"remainder": "addToLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA00000000000000000000001"
}
}
}'
// 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 additionalCommission = new AdditionalCommission()
.balanceAccountId("BA00000000000000000000001")
.variablePercentage(50L)
.fixedAmount(10L);
Commission commission = new Commission()
.variablePercentage(100L)
.fixedAmount(10L);
SplitConfigurationLogic splitConfigurationLogic = new SplitConfigurationLogic()
.paymentFee(SplitConfigurationLogic.PaymentFeeEnum.DEDUCTFROMLIABLEACCOUNT)
.chargeback(SplitConfigurationLogic.ChargebackEnum.DEDUCTFROMLIABLEACCOUNT)
.additionalCommission(additionalCommission)
.tip(SplitConfigurationLogic.TipEnum.ADDTOONEBALANCEACCOUNT)
.commission(commission)
.remainder(SplitConfigurationLogic.RemainderEnum.ADDTOLIABLEACCOUNT);
SplitConfigurationRule splitConfigurationRule = new SplitConfigurationRule()
.splitLogic(splitConfigurationLogic)
.paymentMethod("visa")
.shopperInteraction(SplitConfigurationRule.ShopperInteractionEnum.POS)
.currency("USD")
.fundingSource(SplitConfigurationRule.FundingSourceEnum.ANY);
// Make the API call
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.createRule("merchantId", "splitConfigurationId", splitConfigurationRule, 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)
$additionalCommission = new AdditionalCommission();
$additionalCommission
->setBalanceAccountId("BA00000000000000000000001")
->setVariablePercentage(50)
->setFixedAmount(10);
$commission = new Commission();
$commission
->setVariablePercentage(100)
->setFixedAmount(10);
$splitConfigurationLogic = new SplitConfigurationLogic();
$splitConfigurationLogic
->setPaymentFee("deductFromLiableAccount")
->setChargeback("deductFromLiableAccount")
->setAdditionalCommission($additionalCommission)
->setTip("addToOneBalanceAccount")
->setCommission($commission)
->setRemainder("addToLiableAccount");
$splitConfigurationRule = new SplitConfigurationRule();
$splitConfigurationRule
->setSplitLogic($splitConfigurationLogic)
->setPaymentMethod("visa")
->setShopperInteraction("POS")
->setCurrency("USD")
->setFundingSource("ANY");
// Make the API call
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->createRule('merchantId', 'splitConfigurationId', $splitConfigurationRule);
// 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 additionalCommission = new AdditionalCommission
{
BalanceAccountId = "BA00000000000000000000001",
VariablePercentage = 50,
FixedAmount = 10
};
Commission commission = new Commission
{
VariablePercentage = 100,
FixedAmount = 10
};
SplitConfigurationLogic splitConfigurationLogic = new SplitConfigurationLogic
{
PaymentFee = SplitConfigurationLogic.PaymentFeeEnum.DeductFromLiableAccount,
Chargeback = SplitConfigurationLogic.ChargebackEnum.DeductFromLiableAccount,
AdditionalCommission = additionalCommission,
Tip = SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount,
Commission = commission,
Remainder = SplitConfigurationLogic.RemainderEnum.AddToLiableAccount
};
SplitConfigurationRule splitConfigurationRule = new SplitConfigurationRule
{
SplitLogic = splitConfigurationLogic,
PaymentMethod = "visa",
ShopperInteraction = SplitConfigurationRule.ShopperInteractionEnum.POS,
Currency = "USD",
FundingSource = SplitConfigurationRule.FundingSourceEnum.ANY
};
// Make the API call
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.CreateRule("merchantId", "splitConfigurationId", splitConfigurationRule);
// 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 splitConfigurationRule = {
paymentMethod: "visa",
shopperInteraction: "POS",
fundingSource: "ANY",
currency: "USD",
splitLogic: {
paymentFee: "deductFromLiableAccount",
chargeback: "deductFromLiableAccount",
tip: "addToOneBalanceAccount",
remainder: "addToLiableAccount",
commission: {
fixedAmount: 10,
variablePercentage: 100
},
additionalCommission: {
fixedAmount: 10,
variablePercentage: 50,
balanceAccountId: "BA00000000000000000000001"
}
}
}
// Make the API call
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.createRule("merchantId", "splitConfigurationId", splitConfigurationRule);
// 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)
additionalCommission := management.AdditionalCommission{
BalanceAccountId: common.PtrString("BA00000000000000000000001"),
VariablePercentage: common.PtrInt64(50),
FixedAmount: common.PtrInt64(10),
}
commission := management.Commission{
VariablePercentage: common.PtrInt64(100),
FixedAmount: common.PtrInt64(10),
}
splitConfigurationLogic := management.SplitConfigurationLogic{
PaymentFee: common.PtrString("deductFromLiableAccount"),
Chargeback: common.PtrString("deductFromLiableAccount"),
AdditionalCommission: &additionalCommission,
Tip: common.PtrString("addToOneBalanceAccount"),
Commission: commission,
Remainder: common.PtrString("addToLiableAccount"),
}
splitConfigurationRule := management.SplitConfigurationRule{
SplitLogic: splitConfigurationLogic,
PaymentMethod: "visa",
ShopperInteraction: "POS",
Currency: "USD",
FundingSource: common.PtrString("ANY"),
}
// Make the API call
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.CreateRuleInput("merchantId","splitConfigurationId").SplitConfigurationRule(splitConfigurationRule)
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.CreateRule(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 = {
"paymentMethod": "visa",
"shopperInteraction": "POS",
"fundingSource": "ANY",
"currency": "USD",
"splitLogic": {
"paymentFee": "deductFromLiableAccount",
"chargeback": "deductFromLiableAccount",
"tip": "addToOneBalanceAccount",
"remainder": "addToLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA00000000000000000000001"
}
}
}
# Make the API call
result = adyen.management.split_configuration_merchant_level_api.create_rule(request=json_request, merchantId="merchantId", splitConfigurationId="splitConfigurationId")
# 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 = {
:paymentMethod => 'visa',
:shopperInteraction => 'POS',
:fundingSource => 'ANY',
:currency => 'USD',
:splitLogic => {
:paymentFee => 'deductFromLiableAccount',
:chargeback => 'deductFromLiableAccount',
:tip => 'addToOneBalanceAccount',
:remainder => 'addToLiableAccount',
:commission => {
:fixedAmount => 10,
:variablePercentage => 100
},
:additionalCommission => {
:fixedAmount => 10,
:variablePercentage => 50,
:balanceAccountId => 'BA00000000000000000000001'
}
}
}
# Make the API call
result = adyen.management.split_configuration_merchant_level_api.create_rule(request_body, 'merchantId', 'splitConfigurationId')
// 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 additionalCommission: Types.management.AdditionalCommission = {
balanceAccountId: "BA00000000000000000000001",
variablePercentage: 50,
fixedAmount: 10
};
const commission: Types.management.Commission = {
variablePercentage: 100,
fixedAmount: 10
};
const splitConfigurationLogic: Types.management.SplitConfigurationLogic = {
paymentFee: Types.management.SplitConfigurationLogic.PaymentFeeEnum.DeductFromLiableAccount,
chargeback: Types.management.SplitConfigurationLogic.ChargebackEnum.DeductFromLiableAccount,
additionalCommission: additionalCommission,
tip: Types.management.SplitConfigurationLogic.TipEnum.AddToOneBalanceAccount,
commission: commission,
remainder: Types.management.SplitConfigurationLogic.RemainderEnum.AddToLiableAccount
};
const splitConfigurationRule: Types.management.SplitConfigurationRule = {
splitLogic: splitConfigurationLogic,
paymentMethod: "visa",
shopperInteraction: Types.management.SplitConfigurationRule.ShopperInteractionEnum.POS,
currency: "USD",
fundingSource: Types.management.SplitConfigurationRule.FundingSourceEnum.ANY
};
// Make the API call
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.createRule("merchantId", "splitConfigurationId", splitConfigurationRule);
ruleId of the new rule in the rules array.
Rule created
{
"description": "Your description for the split configuration profile",
"rules": [
{
"currency": "USD",
"fundingSource": "ANY",
"cardRegion": "domestic",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000001",
"shopperInteraction": "POS",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"splitLogicId": "SCLG00000000000000000000001",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToOneBalanceAccount",
"tip": "addToOneBalanceAccount"
}
},
{
"currency": "USD",
"fundingSource": "ANY",
"cardRegion": "domestic",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000002",
"shopperInteraction": "POS",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"splitLogicId": "SCLG00000000000000000000002",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToOneBalanceAccount"
}
}
],
"splitConfigurationId": "SCNF00000000000000000000001",
"stores": [
"ST00000000000000000000001",
"ST00000000000000000000002"
]
}
Change the conditions
You can update the conditions that determine whether the payment is split automatically by modifying the rule in the profile. For more information on these conditions, see Rule conditions. To change the conditions of a rule, make a PATCH /merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId} request with the following path parameters:| Path parameters | Required | Description |
|---|---|---|
| merchantId | The unique identifier of your merchant account. | |
| splitConfigurationId | The unique identifier of the split configuration profile you want to update. | |
| ruleId | The unique identifier of the rule whose conditions you want to update. |
| Parameter | Required | Description |
|---|---|---|
| currency | You must define whether the rule applies to a specific currency, or all currencies. | |
| paymentMethod | You must 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 | Defines 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 | |
| fundingSource | You must define whether the rule applies only to payments initiated by a specific type of card, or any card types. | |
| shopperInteraction | You must define whether the rule applies to a specific sales channel, or all channels. |
curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001/rules/SCRL00000000000000000000001 \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X PATCH \
-d '{
"currency": "EUR",
"fundingSource": "ANY",
"paymentMethod": "visa",
"shopperInteraction": "ANY"
}'
// Adyen Java API Library v38.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)
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.updateSplitConditions("merchantId", "splitConfigurationId", "ruleId", updateSplitConfigurationRuleRequest, null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->updateSplitConditions('merchantId', 'splitConfigurationId', 'ruleId', $updateSplitConfigurationRuleRequest);
// Adyen .net API Library v32.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)
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.UpdateSplitConditions("merchantId", "splitConfigurationId", "ruleId", updateSplitConfigurationRuleRequest);
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Create the request object(s)
const updateSplitConfigurationRuleRequest = {
currency: "EUR",
fundingSource: "ANY",
paymentMethod: "visa",
shopperInteraction: "ANY"
}
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitConditions("merchantId", "splitConfigurationId", "ruleId", updateSplitConfigurationRuleRequest);
// 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)
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.UpdateSplitConditionsInput("merchantId","splitConfigurationId","ruleId").UpdateSplitConfigurationRuleRequest(updateSplitConfigurationRuleRequest)
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.UpdateSplitConditions(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 = {
"currency": "EUR",
"fundingSource": "ANY",
"paymentMethod": "visa",
"shopperInteraction": "ANY"
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_conditions(request=json_request, merchantId="merchantId", splitConfigurationId="splitConfigurationId", ruleId="ruleId")
# 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 = {
:currency => 'EUR',
:fundingSource => 'ANY',
:paymentMethod => 'visa',
:shopperInteraction => 'ANY'
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_conditions(request_body, 'merchantId', 'splitConfigurationId', 'ruleId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Create the request object(s)
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitConditions("merchantId", "splitConfigurationId", "ruleId", updateSplitConfigurationRuleRequest);
{
"description": "Your description for the split profile",
"rules": [
{
"currency": "USD",
"fundingSource": "ANY",
"cardRegion": "domestic",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000001",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 10,
"variablePercentage": 50,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 10,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"splitLogicId": "SCLG00000000000000000000001",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToOneBalanceAccount",
"tip": "addToOneBalanceAccount"
}
}
],
"splitConfigurationId":"SCNF00000000000000000000001",
"stores": [
"ST00000000000000000000001",
"ST00000000000000000000002"
]
}
Change the split logic
You can change the way a transaction is split between the balance accounts of your platform by modifying the split logic of the rule. To change the split logic used in a rule, make a PATCH /merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId} request, specifying the following path parameters:| Path parameters | Required | Description |
|---|---|---|
| merchantId | The unique identifier of your merchant account. | |
| splitConfigurationId | The unique identifier of the split configuration profile you want to update. | |
| ruleId | The unique identifier of the rule whose split logic you want to update. | |
| splitLogicId | The unique identifier of the split logic object you want to update. |
| Parameter | Required | Description |
|---|---|---|
| commission | You must define the commission fee for the payments. This can be a fixed amount, a percentage, or both. | |
| paymentFee or another transaction fee type | You must define to which balance account to book the transaction fees associated with the payment. | |
| chargeback | You can define the chargeback logic. You can book the entire disputed amount to your platform’s liable balance account, your user’s balance account, or split the disputed amount between the balance accounts specified in the original payment (with the same split ratio). | |
| chargebackCostAllocation | You can define to which balance account to book the fees incurred by chargebacks. | |
| refund | You can define the refund logic. You can book the entire refund amount to your platform’s liable balance account, your user’s balance account, or split the refund amount between the balance accounts specified in the original payment (with the same split ratio). | |
| refundCostAllocation | You can define to which balance account to book the fees incurred by the refund. | |
| additionalCommission | You can define an additional fee as a commission for your user, booked directly to the balance account you specify in additionalCommission.balanceAccountId. | |
| remainder | You can define to which balance account to book the amount left over after currency conversion. | |
dcc.accountHolderPercentage | You can define the percentage of the DCC markup to book to your user. The remaining percentage is booked to your platform. | |
| surcharge | You can define to which balance account to book surcharges. | |
| tip | You can define to which balance account to book the gratuity. |
curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001/rules/SCRL00000000000000000000001/splitLogic/SCLG00000000000000000000001 \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X PATCH \
-d '{
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}'
// Adyen Java API Library v38.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)
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.updateSplitLogic("merchantId", "splitConfigurationId", "ruleId", "splitLogicId", updateSplitConfigurationLogicRequest, null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->updateSplitLogic('merchantId', 'splitConfigurationId', 'ruleId', 'splitLogicId', $updateSplitConfigurationLogicRequest);
// Adyen .net API Library v32.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)
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.UpdateSplitLogic("merchantId", "splitConfigurationId", "ruleId", "splitLogicId", updateSplitConfigurationLogicRequest);
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Create the request object(s)
const updateSplitConfigurationLogicRequest = {
additionalCommission: {
fixedAmount: 100,
variablePercentage: 0,
balanceAccountId: "BA00000000000000000000001"
},
chargeback: "deductFromLiableAccount",
commission: {
fixedAmount: 100
},
paymentFee: "deductFromLiableAccount",
remainder: "addToLiableAccount",
tip: "addToLiableAccount"
}
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitLogic("merchantId", "splitConfigurationId", "ruleId", "splitLogicId", updateSplitConfigurationLogicRequest);
// 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)
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.UpdateSplitLogicInput("merchantId","splitConfigurationId","ruleId","splitLogicId").UpdateSplitConfigurationLogicRequest(updateSplitConfigurationLogicRequest)
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.UpdateSplitLogic(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 = {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100
},
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_logic(request=json_request, merchantId="merchantId", splitConfigurationId="splitConfigurationId", ruleId="ruleId", splitLogicId="splitLogicId")
# 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 = {
:additionalCommission => {
:fixedAmount => 100,
:variablePercentage => 0,
:balanceAccountId => 'BA00000000000000000000001'
},
:chargeback => 'deductFromLiableAccount',
:commission => {
:fixedAmount => 100
},
:paymentFee => 'deductFromLiableAccount',
:remainder => 'addToLiableAccount',
:tip => 'addToLiableAccount'
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_logic(request_body, 'merchantId', 'splitConfigurationId', 'ruleId', 'splitLogicId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Create the request object(s)
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitLogic("merchantId", "splitConfigurationId", "ruleId", "splitLogicId", updateSplitConfigurationLogicRequest);
splitLogic object that contains the updated instructions.
Split logic updated
{
"description": "Your description for the split configuration profile",
"rules": [
{
"cardRegion": "domestic",
"currency": "USD",
"fundingSource": "ANY",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000001",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"splitLogicId": "SCLG00000000000000000000001",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
}
],
"splitConfigurationId": "SCNF00000000000000000000001",
"stores": [
"ST00000000000000000000001",
"ST00000000000000000000002"
]
}
Change the description
You can only update the description of a split configuration profile by using the Management API. To update the description of a profile, make a PATCH /merchants/{merchantId}/splitConfigurations/{splitConfigurationId} request with the ID of your merchant account and split configuration profile in the path, and the newdescription in the body.
Update the description
curl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001 \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X PATCH \
-d '{
"description": "Updated description for the split configuration profile"
}'
// Adyen Java API Library v38.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)
UpdateSplitConfigurationRequest updateSplitConfigurationRequest = new UpdateSplitConfigurationRequest()
.description("Updated description for the split configuration profile");
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.updateSplitConfigurationDescription("merchantId", "splitConfigurationId", updateSplitConfigurationRequest, null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\UpdateSplitConfigurationRequest;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
$updateSplitConfigurationRequest = new UpdateSplitConfigurationRequest();
$updateSplitConfigurationRequest
->setDescription("Updated description for the split configuration profile");
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->updateSplitConfigurationDescription('merchantId', 'splitConfigurationId', $updateSplitConfigurationRequest);
// Adyen .net API Library v32.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)
UpdateSplitConfigurationRequest updateSplitConfigurationRequest = new UpdateSplitConfigurationRequest
{
Description = "Updated description for the split configuration profile"
};
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.UpdateSplitConfigurationDescription("merchantId", "splitConfigurationId", updateSplitConfigurationRequest);
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Create the request object(s)
const updateSplitConfigurationRequest = {
description: "Updated description for the split configuration profile"
}
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitConfigurationDescription("merchantId", "splitConfigurationId", updateSplitConfigurationRequest);
// 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)
updateSplitConfigurationRequest := management.UpdateSplitConfigurationRequest{
Description: "Updated description for the split configuration profile",
}
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.UpdateSplitConfigurationDescriptionInput("merchantId","splitConfigurationId").UpdateSplitConfigurationRequest(updateSplitConfigurationRequest)
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.UpdateSplitConfigurationDescription(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": "Updated description for the split configuration profile"
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_configuration_description(request=json_request, merchantId="merchantId", splitConfigurationId="splitConfigurationId")
# 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 => 'Updated description for the split configuration profile'
}
# Send the request
result = adyen.management.split_configuration_merchant_level_api.update_split_configuration_description(request_body, 'merchantId', 'splitConfigurationId')
// Adyen Node API Library v27.0.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 updateSplitConfigurationRequest: Types.management.UpdateSplitConfigurationRequest = {
description: "Updated description for the split configuration profile"
};
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.updateSplitConfigurationDescription("merchantId", "splitConfigurationId", updateSplitConfigurationRequest);
{
"description": "Updated description for the split configuration profile",
"rules": [
{
"cardRegion": "domestic",
"currency": "USD",
"fundingSource": "ANY",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000001",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"splitLogicId": "SCLG00000000000000000000001",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
}
],
"splitConfigurationId": "SCNF00000000000000000000001",
"stores": [
"ST00000000000000000000001",
"ST00000000000000000000002"
]
}
Remove a rule
All split configuration profiles must contain at least one rule. Therefore, you cannot delete the only rule in the profile. If you want to remove a rule but keep the profile, make sure the profile contains at least one other rule. Otherwise, delete the entire profile. To remove a rule, make a DELETE /merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId} request with the ID of your merchant account, split configuration profile, and rule in the path. Delete a rulecurl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001/rules/SCRL00000000000000000000001 \
-H 'content-type: application/json' \
-H 'x-api-key: ADYEN_API_KEY' \
-X DELETE \
-d
// Adyen Java API Library v38.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);
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.deleteSplitConfigurationRule("merchantId", "splitConfigurationId", "ruleId", null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->deleteSplitConfigurationRule('merchantId', 'splitConfigurationId', 'ruleId');
// Adyen .net API Library v32.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);
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.DeleteSplitConfigurationRule("merchantId", "splitConfigurationId", "ruleId");
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.deleteSplitConfigurationRule("merchantId", "splitConfigurationId", "ruleId");
// 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,
})
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.DeleteSplitConfigurationRuleInput("merchantId","splitConfigurationId","ruleId")
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.DeleteSplitConfigurationRule(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.
# Send the request
result = adyen.management.split_configuration_merchant_level_api.delete_split_configuration_rule(merchantId="merchantId", splitConfigurationId="splitConfigurationId", ruleId="ruleId")
# 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
# Send the request
result = adyen.management.split_configuration_merchant_level_api.delete_split_configuration_rule('merchantId', 'splitConfigurationId', 'ruleId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.deleteSplitConfigurationRule("merchantId", "splitConfigurationId", "ruleId");
Delete a profile
To delete a split configuration profile, make a DELETE /merchants/{merchantId}/splitConfigurations/{splitConfigurationId} request with the ID of your merchant account and split configuration profile in the path. Delete the profilecurl https://management-test.adyen.com/v3/merchants/MC00000000000000000000001/splitConfigurations/SCNF00000000000000000000001 \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X DELETE \
-d
// Adyen Java API Library v38.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);
// Send the request
SplitConfigurationMerchantLevelApi service = new SplitConfigurationMerchantLevelApi(client);
SplitConfiguration response = service.deleteSplitConfiguration("merchantId", "splitConfigurationId", null);
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\SplitConfigurationMerchantLevelApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Send the request
$service = new SplitConfigurationMerchantLevelApi($client);
$response = $service->deleteSplitConfiguration('merchantId', 'splitConfigurationId');
// Adyen .net API Library v32.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);
// Send the request
var service = new SplitConfigurationMerchantLevelService(client);
var response = service.DeleteSplitConfiguration("merchantId", "splitConfigurationId");
// Adyen Node API Library v27.0.0
const { Client, ManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.deleteSplitConfiguration("merchantId", "splitConfigurationId");
// 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,
})
// Send the request
service := client.Management()
req := service.SplitConfigurationMerchantLevelApi.DeleteSplitConfigurationInput("merchantId","splitConfigurationId")
res, httpRes, err := service.SplitConfigurationMerchantLevelApi.DeleteSplitConfiguration(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.
# Send the request
result = adyen.management.split_configuration_merchant_level_api.delete_split_configuration(merchantId="merchantId", splitConfigurationId="splitConfigurationId")
# 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
# Send the request
result = adyen.management.split_configuration_merchant_level_api.delete_split_configuration('merchantId', 'splitConfigurationId')
// Adyen Node API Library v27.0.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });
// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.SplitConfigurationMerchantLevelApi.deleteSplitConfiguration("merchantId", "splitConfigurationId");
{
"description": "Your description for the split configuration profile",
"rules": [
{
"cardRegion": "domestic",
"currency": "USD",
"fundingSource": "ANY",
"paymentMethod": "visa",
"ruleId": "SCRL00000000000000000000001",
"shopperInteraction": "ANY",
"splitLogic": {
"additionalCommission": {
"fixedAmount": 100,
"variablePercentage": 0,
"balanceAccountId": "BA00000000000000000000001"
},
"chargeback": "deductFromLiableAccount",
"commission": {
"fixedAmount": 100,
"variablePercentage": 100
},
"dcc": {
"accountHolderPercentage": 6000
},
"splitLogicId": "SCLG00000000000000000000001",
"paymentFee": "deductFromLiableAccount",
"remainder": "addToLiableAccount",
"tip": "addToLiableAccount"
}
}
],
"splitConfigurationId": "SCNF00000000000000000000001"
}