Requirements
| Requirement | Description | |
|---|---|---|
| Integration type | You must have an Adyen online payments integration and a checkout UI. | |
| API credentials | You must have credentials for the Checkout API. |
Send user data points with a transaction
During the /sessions or /payments authorization for each transaction, card schemes require data points that specify the following information about your user:- Unique identifier: You must assign a unique identifier to each of your users.
- Name: You must provide an accurate name for the user that is present on the shopper’s statement. For Mastercard, this includes an aggregator prefix.
- Location: You must provide the user’s location as the location of the transaction.
Required parameters
You must sendadditionalData parameters with the /sessions or /payments authorization request. For cancellations, captures, and refunds, Adyen automatically populates your user’s details from the initial payment.
Submit your request using AdditionalDataSubMerchant parameters.
The [subSellerNr] is always 1. Submit all additionalData parameters as:additionalData.subMerchant.subSeller1.[parameter]
paymentFacilitatorIds, aggregatorPrefix and amexCapnSubmitterId are configured for your platform.
Here is an example of a split payment request facilitated on behalf of your user:
Split the funds of the payment
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
"paymentMethod": {
"type": "scheme",
"number": "4111111111111111",
"cvc": "737",
"expiryMonth": "03",
"expiryYear": "2030",
"holderName": "John Smith"
},
"amount": {
"value": 40000,
"currency": "USD"
},
"reference": "YOUR_ORDER_NUMBER",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"returnUrl": "https://your-company.example.com/...",
"splits":[
{
"amount": {
"value": 39600
},
"type": "BalanceAccount",
"account": "BA00000000000000000000001",
"reference": "Your reference for the sale amount.",
"description": "Your description for the sale amount."
},
{
"amount": {
"value": 400
},
"type": "Commission",
"reference": "Your reference for your commission.",
"description": "Your description for your commission."
},
{
"type": "PaymentFee",
"account": "BA00000000000000000000001",
"reference": "Your reference for the transaction fees.",
"description": "Your description for the transaction fees."
}
],
"additionalData" : {
"subMerchant.numberOfSubSellers" : 1,
"subMerchant.subSeller1.id" : "12345",
"subMerchant.subSeller1.name" : "Test Merchant",
"subMerchant.subSeller1.street" : "Street Address",
"subMerchant.subSeller1.postalCode" : "POSTAL_CODE",
"subMerchant.subSeller1.city" : "CITY",
"subMerchant.subSeller1.state" : "STATE",
"subMerchant.subSeller1.country" : "COUNTRY"
}
}'
// Adyen Java API Library v25.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.checkout.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.model.RequestOptions;
import com.adyen.service.checkout.*;
// For the live environment, additionally include your liveEndpointUrlPrefix.
Client client = new Client("ADYEN_API_KEY", Environment.TEST);
// Create the request object(s)
SplitAmount splitAmount1 = new SplitAmount()
.value(39600L);
SplitAmount splitAmount2 = new SplitAmount()
.value(400L);
Amount amount = new Amount()
.currency("USD")
.value(40000L);
Split split1 = new Split()
.reference("Your reference for the sale amount.")
.amount(splitAmount1)
.description("Your description for the sale amount.")
.type(Split.TypeEnum.BALANCEACCOUNT)
.account("BA00000000000000000000001");
Split split2 = new Split()
.reference("Your reference for your commission.")
.amount(splitAmount2)
.description("Your description for your commission.")
.type(Split.TypeEnum.COMMISSION);
Split split3 = new Split()
.reference("Your reference for the transaction fees.")
.description("Your description for the transaction fees.")
.type(Split.TypeEnum.PAYMENTFEE)
.account("BA00000000000000000000001");
CardDetails cardDetails = new CardDetails()
.number("4111111111111111")
.cvc("737")
.holderName("John Smith")
.expiryMonth("03")
.expiryYear("2030")
.type(CardDetails.TypeEnum.SCHEME);
PaymentRequest paymentRequest = new PaymentRequest()
.reference("YOUR_ORDER_NUMBER")
.amount(amount)
.splits(Arrays.asList(split1, split2, split3))
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
.paymentMethod(new CheckoutPaymentMethod(cardDetails))
.additionalData(new HashMap<String, String>(Map.of(
"subMerchant.subSeller1.postalCode", "POSTAL_CODE",
"subMerchant.subSeller1.id", "12345",
"subMerchant.subSeller1.street", "Street Address",
"subMerchant.subSeller1.country", "COUNTRY",
"subMerchant.subSeller1.city", "CITY",
"subMerchant.subSeller1.state", "STATE",
"subMerchant.numberOfSubSellers", "1",
"subMerchant.subSeller1.name", "Test Merchant"
)))
.returnUrl("https://your-company.example.com/...");
// Make the API call
PaymentsApi service = new PaymentsApi(client);
PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID"));
// Adyen PHP API Library v17.4.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Checkout\Amount;
use Adyen\Model\Checkout\Split;
use Adyen\Model\Checkout\CheckoutPaymentMethod;
use Adyen\Model\Checkout\SplitAmount;
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Service\Checkout\PaymentsApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
// For the live environment, additionally include your liveEndpointUrlPrefix.
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
$splitAmount1 = new SplitAmount();
$splitAmount1
->setValue(39600);
$splitAmount2 = new SplitAmount();
$splitAmount2
->setValue(400);
$amount = new Amount();
$amount
->setCurrency("USD")
->setValue(40000);
$split1 = new Split();
$split1
->setReference("Your reference for the sale amount.")
->setAmount($splitAmount1)
->setDescription("Your description for the sale amount.")
->setType("BalanceAccount")
->setAccount("BA00000000000000000000001");
$split2 = new Split();
$split2
->setReference("Your reference for your commission.")
->setAmount($splitAmount2)
->setDescription("Your description for your commission.")
->setType("Commission");
$split3 = new Split();
$split3
->setReference("Your reference for the transaction fees.")
->setDescription("Your description for the transaction fees.")
->setType("PaymentFee")
->setAccount("BA00000000000000000000001");
$checkoutPaymentMethod = new CheckoutPaymentMethod();
$checkoutPaymentMethod
->setNumber("4111111111111111")
->setCvc("737")
->setHolderName("John Smith")
->setExpiryMonth("03")
->setExpiryYear("2030")
->setType("scheme");
$paymentRequest = new PaymentRequest();
$paymentRequest
->setReference("YOUR_ORDER_NUMBER")
->setAmount($amount)
->setSplits(array($split1, $split2, $split3))
->setMerchantAccount("YOUR_MERCHANT_ACCOUNT")
->setPaymentMethod($checkoutPaymentMethod)
->setAdditionalData(
array(
"subMerchant.subSeller1.postalCode" => "POSTAL_CODE",
"subMerchant.subSeller1.id" => "12345",
"subMerchant.subSeller1.street" => "Street Address",
"subMerchant.subSeller1.country" => "COUNTRY",
"subMerchant.subSeller1.city" => "CITY",
"subMerchant.subSeller1.state" => "STATE",
"subMerchant.numberOfSubSellers" => "1",
"subMerchant.subSeller1.name" => "Test Merchant"
)
)
->setReturnUrl("https://your-company.example.com/...");
$requestOptions['idempotencyKey'] = 'UUID';
// Make the API call
$service = new PaymentsApi($client);
$response = $service->payments($paymentRequest, $requestOptions);
// Adyen .net API Library v14.4.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Checkout;
using Adyen.Service.Checkout;
// For the live environment, additionally include your liveEndpointUrlPrefix.
var config = new Config()
{
XApiKey = "ADYEN_API_KEY",
Environment = Environment.Test
};
var client = new Client(config);
// Create the request object(s)
SplitAmount splitAmount1 = new SplitAmount
{
Value = 39600
};
SplitAmount splitAmount2 = new SplitAmount
{
Value = 400
};
Amount amount = new Amount
{
Currency = "USD",
Value = 40000
};
Split split1 = new Split
{
Reference = "Your reference for the sale amount.",
Amount = splitAmount1,
Description = "Your description for the sale amount.",
Type = Split.TypeEnum.BalanceAccount,
Account = "BA00000000000000000000001"
};
Split split2 = new Split
{
Reference = "Your reference for your commission.",
Amount = splitAmount2,
Description = "Your description for your commission.",
Type = Split.TypeEnum.Commission
};
Split split3 = new Split
{
Reference = "Your reference for the transaction fees.",
Description = "Your description for the transaction fees.",
Type = Split.TypeEnum.PaymentFee,
Account = "BA00000000000000000000001"
};
CardDetails cardDetails = new CardDetails
{
Number = "4111111111111111",
Cvc = "737",
HolderName = "John Smith",
ExpiryMonth = "03",
ExpiryYear = "2030",
Type = CardDetails.TypeEnum.Scheme
};
PaymentRequest paymentRequest = new PaymentRequest
{
Reference = "YOUR_ORDER_NUMBER",
Amount = amount,
Splits = new List<Split>{ split1, split2, split3 },
MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
PaymentMethod = new CheckoutPaymentMethod(cardDetails),
AdditionalData = new Dictionary<string, string>
{
{ "subMerchant.subSeller1.postalCode", "POSTAL_CODE" },
{ "subMerchant.subSeller1.id", "12345" },
{ "subMerchant.subSeller1.street", "Street Address" },
{ "subMerchant.subSeller1.country", "COUNTRY" },
{ "subMerchant.subSeller1.city", "CITY" },
{ "subMerchant.subSeller1.state", "STATE" },
{ "subMerchant.numberOfSubSellers", "1" },
{ "subMerchant.subSeller1.name", "Test Merchant" }
},
ReturnUrl = "https://your-company.example.com/..."
};
// Make the API call
var service = new PaymentsService(client);
var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});
// Adyen Node API Library v16.2.0
// Require the parts of the module you want to use
const { Client, CheckoutAPI } = require('@adyen/api-library');
// Initialize the client object
// For the live environment, additionally include your liveEndpointUrlPrefix.
const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"});
// Create the request object(s)
const paymentRequest = {
paymentMethod: {
type: "scheme",
number: "4111111111111111",
cvc: "737",
expiryMonth: "03",
expiryYear: "2030",
holderName: "John Smith"
},
amount: {
value: 40000,
currency: "EUR"
},
reference: "YOUR_ORDER_NUMBER",
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
returnUrl: "https://your-company.example.com/...",
splits: [ {
amount: {
value: 39600
},
type: "BalanceAccount",
account: "BA00000000000000000000001",
reference: "Your reference for the sale amount.",
description: "Your description for the sale amount."
}, {
amount: {
value: 400
},
type: "Commission",
reference: "Your reference for the commission.",
description: "Your description for the commission."
}, {
type: "PaymentFee",
account: "BA00000000000000000000001",
reference: "Your reference for the transaction fees.",
description: "Your description for the transaction fees."
} ],
additionalData: {
"subMerchant.numberOfSubSellers" : 1,
"subMerchant.subSeller1.id" : "12345",
"subMerchant.subSeller1.name" : "Test Merchant",
"subMerchant.subSeller1.street" : "Street Address",
"subMerchant.subSeller1.postalCode" : "POSTAL_CODE",
"subMerchant.subSeller1.city" : "CITY",
"subMerchant.subSeller1.state" : "STATE",
"subMerchant.subSeller1.country" : "COUNTRY"
}
}
// Make the API call
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
// 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/checkout"
)
// For the live environment, additionally include your liveEndpointUrlPrefix.
client := adyen.NewClient(&common.Config{
ApiKey: "ADYEN_API_KEY",
Environment: common.TestEnv,
})
// Create the request object(s)
splitAmount1 := checkout.SplitAmount{
Value: 39600,
}
splitAmount2 := checkout.SplitAmount{
Value: 400,
}
amount := checkout.Amount{
Currency: "USD",
Value: 40000,
}
split1 := checkout.Split{
Reference: common.PtrString("Your reference for the sale amount."),
Amount: &splitAmount1,
Description: common.PtrString("Your description for the sale amount."),
Type: "BalanceAccount",
Account: common.PtrString("BA00000000000000000000001"),
}
split2 := checkout.Split{
Reference: common.PtrString("Your reference for your commission."),
Amount: &splitAmount2,
Description: common.PtrString("Your description for your commission."),
Type: "Commission",
}
split3 := checkout.Split{
Reference: common.PtrString("Your reference for the transaction fees."),
Description: common.PtrString("Your description for the transaction fees."),
Type: "PaymentFee",
Account: common.PtrString("BA00000000000000000000001"),
}
cardDetails := checkout.CardDetails{
Number: common.PtrString("4111111111111111"),
Cvc: common.PtrString("737"),
HolderName: common.PtrString("John Smith"),
ExpiryMonth: common.PtrString("03"),
ExpiryYear: common.PtrString("2030"),
Type: common.PtrString("scheme"),
}
paymentRequest := checkout.PaymentRequest{
Reference: "YOUR_ORDER_NUMBER",
Amount: amount,
Splits: []checkout.Split{
split1, split2, split3,
},
MerchantAccount: "YOUR_MERCHANT_ACCOUNT",
PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails),
AdditionalData: &map[string]string{
"subMerchant.subSeller1.postalCode": "POSTAL_CODE",
"subMerchant.subSeller1.id": "12345",
"subMerchant.subSeller1.street": "Street Address",
"subMerchant.subSeller1.country": "COUNTRY",
"subMerchant.subSeller1.city": "CITY",
"subMerchant.subSeller1.state": "STATE",
"subMerchant.numberOfSubSellers": "1",
"subMerchant.subSeller1.name": "Test Merchant",
},
ReturnUrl: "https://your-company.example.com/...",
}
// Make the API call
service := client.Checkout()
req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)
# Adyen Python API Library v12.2.0
import Adyen
adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
# For the live environment, additionally include your liveEndpointUrlPrefix.
adyen.client.platform = "test" # The environment to use library in.
# Create the request object(s)
json_request = {
"paymentMethod": {
"type": "scheme",
"number": "4111111111111111",
"cvc": "737",
"expiryMonth": "03",
"expiryYear": "2030",
"holderName": "John Smith"
},
"amount": {
"value": 40000,
"currency": "USD"
},
"reference": "YOUR_ORDER_NUMBER",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"returnUrl": "https://your-company.example.com/...",
"splits": [ {
"amount": {
"value": 39600
},
"type": "BalanceAccount",
"account": "BA00000000000000000000001",
"reference": "Your reference for the sale amount.",
"description": "Your description for the sale amount."
}, {
"amount": {
"value": 400
},
"type": "Commission",
"reference": "Your reference for your commission.",
"description": "Your description for your commission."
}, {
"type": "PaymentFee",
"account": "BA00000000000000000000001",
"reference": "Your reference for the transaction fees.",
"description": "Your description for the transaction fees."
} ],
"additionalData": {
"subMerchant.numberOfSubSellers" : 1,
"subMerchant.subSeller1.id" : "12345",
"subMerchant.subSeller1.name" : "Test Merchant",
"subMerchant.subSeller1.street" : "Street Address",
"subMerchant.subSeller1.postalCode" : "POSTAL_CODE",
"subMerchant.subSeller1.city" : "CITY",
"subMerchant.subSeller1.state" : "STATE",
"subMerchant.subSeller1.country" : "COUNTRY"
}
}
# Make the API call
result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID")
# Adyen Ruby API Library v9.3.0
require "adyen-ruby-api-library"
adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_API_KEY'
# For the live environment, additionally include your liveEndpointUrlPrefix.
adyen.env = :test # Set to "live" for live environment
# Create the request object(s)
request_body = {
:paymentMethod => {
:type => 'scheme',
:number => '4111111111111111',
:cvc => '737',
:expiryMonth => '03',
:expiryYear => '2030',
:holderName => 'John Smith'
},
:amount => {
:value => 40000,
:currency => 'USD'
},
:reference => 'YOUR_ORDER_NUMBER',
:merchantAccount => 'YOUR_MERCHANT_ACCOUNT',
:returnUrl => 'https://your-company.example.com/...',
:splits => [ {
:amount => {
:value => 39600
},
:type => 'BalanceAccount',
:account => 'BA00000000000000000000001',
:reference => 'Your reference for the sale amount.',
:description => 'Your description for the sale amount.'
}, {
:amount => {
:value => 400
},
:type => 'Commission',
:reference => 'Your reference for your commission.',
:description => 'Your description for your commission.'
}, {
:type => 'PaymentFee',
:account => 'BA00000000000000000000001',
:reference => 'Your reference for the transaction fees.',
:description => 'Your description for the transaction fees.'
} ],
:additionalData => {
:subMerchant.numberOfSubSellers => 1,
:subMerchant.subSeller1.id => '12345',
:subMerchant.subSeller1.name => 'Test Merchant',
:subMerchant.subSeller1.street => 'Street Address',
:subMerchant.subSeller1.postalCode => 'POSTAL_CODE',
:subMerchant.subSeller1.city => 'CITY',
:subMerchant.subSeller1.state => 'STATE',
:subMerchant.subSeller1.country => 'COUNTRY'
}
}
# Make the API call
result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' })
// Adyen Node API Library v16.2.0
// Require the parts of the module you want to use
import { Client, CheckoutAPI, Types } from "@adyen/api-library";
// Initialize the client object
// For the live environment, additionally include your liveEndpointUrlPrefix.
const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"});
// Create the request object(s)
const splitAmount1: Types.checkout.SplitAmount = {
value: 39600
};
const splitAmount2: Types.checkout.SplitAmount = {
value: 400
};
const amount: Types.checkout.Amount = {
currency: "USD",
value: 40000
};
const split1: Types.checkout.Split = {
reference: "Your reference for the sale amount.",
amount: splitAmount1,
description: "Your description for the sale amount.",
type: Types.checkout.Split.TypeEnum.BalanceAccount,
account: "BA00000000000000000000001"
};
const split2: Types.checkout.Split = {
reference: "Your reference for your commission.",
amount: splitAmount2,
description: "Your description for your commission.",
type: Types.checkout.Split.TypeEnum.Commission
};
const split3: Types.checkout.Split = {
reference: "Your reference for the transaction fees.",
description: "Your description for the transaction fees.",
type: Types.checkout.Split.TypeEnum.PaymentFee,
account: "BA00000000000000000000001"
};
const cardDetails: Types.checkout.CardDetails = {
number: "4111111111111111",
cvc: "737",
holderName: "John Smith",
expiryMonth: "03",
expiryYear: "2030",
type: Types.checkout.CardDetails.TypeEnum.Scheme
};
const paymentRequest: Types.checkout.PaymentRequest = {
reference: "YOUR_ORDER_NUMBER",
amount: amount,
splits: [split1, split2, split3],
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
paymentMethod: cardDetails,
additionalData: {
"subMerchant.subSeller1.postalCode": "POSTAL_CODE",
"subMerchant.subSeller1.id": "12345",
"subMerchant.subSeller1.street": "Street Address",
"subMerchant.subSeller1.country": "COUNTRY",
"subMerchant.subSeller1.city": "CITY",
"subMerchant.subSeller1.state": "STATE",
"subMerchant.numberOfSubSellers": "1",
"subMerchant.subSeller1.name": "Test Merchant"
},
returnUrl: "https://your-company.example.com/..."
};
// Make the API call
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
Shopper statement
When shoppers check their bank statements, they need to be able to easily identify the charges they see. The text that describes charges is known as a transaction description, statement descriptor, shopper statement, or billing descriptor. If shoppers do not recognize a transaction by its description:- There is a higher chance your shopper issues a chargeback.
- You can get a fine from the relevant card scheme related to your chargeback rate.
shopperStatement in your payment request. For more information, see Transaction description.