Adyen APIs Postman collections
Review your account structure
Before you start the integration process, you must be familiar with the Adyen account structure. You’ll need this information when building the different parts of your implementation. Every Adyen for Platforms integration must have at least the following resource types:- Company account: Represents your core business entity and holds your merchant accounts.
- Merchant account: The account where we process payments for your users. You can have multiple merchant accounts.
- Store: Ensures that the transactions you process for your users correspond to an accurate payer statement.
- Balance platform: The accounting system in which you manage your users and funds.
- Account holder: Specifies what your user can do in your platform, for example, receive fund transfers to their balance account and payouts to their verified transfer instrument (bank account).
- Balance account: Holds the funds of your user or your platform. All financial activities in your platform, such as paying out to a bank account, happen through balance accounts.
- Legal entity: Contains information about your user, for example, the legal name, address, and tax information of the organization. Adyen uses this information to perform verification checks required by payment industry regulations.
- Transfer instrument: Your user’s verified bank account where they can receive payouts.
- Business line: Contains information about your user’s line of business, including their industry and source of funds.
Get ready for development
At the end of this section you should have the API keys and the webhook configuration that you need to start integrating.Check out Adyen’s server-side libraries
Adyen provides server-side API libraries in several languages. Installing a library is not required, but will save you development time, because a library:- Uses the latest API version.
- Has generated models and examples to help you construct requests.
- Sends the request to Adyen using its built-in HTTP client, so you do not have to create your own.
Generate and test your API keys
Adyen is an API-first payment service provider, which means that you must integrate with our APIs to build and customize your implementation. You can generate your API credentials in your Customer Area. You need credentials for the following APIs:| API | Credential | Description |
|---|---|---|
| Configuration API Transfers API Foreign Exchange API Session authentication API | ws@BalancePlatform.****[YourBalancePlatform] | Use these APIs to create account holders and balance accounts, set up managed or custom payouts (scheduled or on-demand), and calculate amounts in different currencies. Use the Session authentication API with this API credential to create session tokens for integrating Platform Experience components. |
| Legal Entity Management API Session authentication API | ws_[123456]@Scope.Company_****[YourCompanyAccount] | Use the Legal Entity Management API to create and manage legal entities that contain the information required for verification checks. Use the Session authentication API with this API credential to create session tokens for integrating Onboarding components. |
| Checkout API Management API | ws@Company.****[YourCompanyAccount] | Use these APIs to process payments and manage payment methods, stores, and automatic split payments for your users. |
- Configuration API
- Legal Entity Management API
- Checkout API
- Onboarding on invite
- API-initiated hosted onboarding
- API-only onboarding
- Split payments automatically
- Split online payments manually
- Split in-person payments manually
Use the API key for your ws@BalancePlatform.****[YourBalancePlatform] API credential.Try it out!If the call was successful, you receive an HTTP 200 result code along with the
curl https://balanceplatform-api-test.adyen.com/bcl/v2/balancePlatforms/{id} \
-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \
-H 'content-type: application/json' \
-X GET
// Adyen Java API Library v33.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.balanceplatform.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.balancePlatform.*;
Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST);
// Send the request
PlatformApi service = new PlatformApi(client);
BalancePlatform response = service.getBalancePlatform("id", null);
<?php
// Adyen PHP API Library v24.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\BalancePlatform\PlatformApi;
$client = new Client();
$client->setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY");
$client->setEnvironment(Environment::TEST);
// Send the request
$service = new PlatformApi($client);
$response = $service->getBalancePlatform('id');
// Adyen .net API Library v28.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.BalancePlatform;
using Adyen.Service.BalancePlatform;
var config = new Config()
{
XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY",
Environment = Environment.Test
};
var client = new Client(config);
// Send the request
var service = new PlatformService(client);
var response = service.GetBalancePlatform("id");
// Adyen Node API Library v23.3.0
const { Client, BalancePlatformAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" });
// Send the request
const balancePlatformAPI = new BalancePlatformAPI(client);
const response = balancePlatformAPI.PlatformApi.getBalancePlatform("id");
// Adyen Go API Library v17.0.0
import (
"context"
"github.com/adyen/adyen-go-api-library/v17/src/common"
"github.com/adyen/adyen-go-api-library/v17/src/adyen"
"github.com/adyen/adyen-go-api-library/v17/src/balancePlatform"
)
client := adyen.NewClient(&common.Config{
ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY",
Environment: common.TestEnv,
})
// Send the request
service := client.BalancePlatform()
req := service.PlatformApi.GetBalancePlatformInput("id")
res, httpRes, err := service.PlatformApi.GetBalancePlatform(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.
# Make the API call
result = adyen.balancePlatform.platform_api.get_balance_platform(id="id")
# 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
# Make the API call
result = adyen.balancePlatform.platform_api.get_balance_platform('id')
// Adyen Node API Library v23.3.0
import { Client, BalancePlatformAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" });
// Send the request
const balancePlatformAPI = new BalancePlatformAPI(client);
const response = balancePlatformAPI.PlatformApi.getBalancePlatform("id");
id and status of your balance platform.Response{
"id": "YOUR_BALANCE_PLATFORM_ID",
"status": "Active"
}
Use the API key for your ws_[123456]@Scope.Company_****[YourCompanyAccount] API credential.Try it out!If the call was successful, you receive an HTTP 200 result code along with the
curl https://kyc-test.adyen.com/lem/v3/legalEntities \
-H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
"type": "individual",
"individual": {
"residentialAddress": {
"city": "San Francisco",
"country": "US",
"postalCode": "94678",
"stateOrProvince": "CA",
"street": "Brannan Street",
"street2": "274"
},
"phone": {
"number": "+14153671502",
"type": "mobile"
},
"name": {
"firstName": "Simone",
"lastName": "Hopper"
},
"birthData": {
"dateOfBirth": "1981-12-01"
},
"email": "s.hopper@example.com"
}
}'
// Adyen Java API Library v33.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.legalentitymanagement.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.legalEntityManagement.*;
Client client = new Client("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment.TEST);
// Create the request object(s)
PhoneNumber phoneNumber = new PhoneNumber()
.number("+14153671502")
.type("mobile");
Address address = new Address()
.country("US")
.stateOrProvince("CA")
.city("San Francisco")
.street("Brannan Street")
.postalCode("94678")
.street2("274");
Name name = new Name()
.firstName("Simone")
.lastName("Hopper");
BirthData birthData = new BirthData()
.dateOfBirth("1981-12-01");
Individual individual = new Individual()
.phone(phoneNumber)
.residentialAddress(address)
.name(name)
.birthData(birthData)
.email("s.hopper@example.com");
LegalEntityInfoRequiredType legalEntityInfoRequiredType = new LegalEntityInfoRequiredType()
.individual(individual)
.type(LegalEntityInfoRequiredType.TypeEnum.INDIVIDUAL);
// Send the request
LegalEntitiesApi service = new LegalEntitiesApi(client);
LegalEntity response = service.createLegalEntity(legalEntityInfoRequiredType, null);
<?php
// Adyen PHP API Library v24.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\LegalEntityManagement\PhoneNumber;
use Adyen\Model\LegalEntityManagement\Address;
use Adyen\Model\LegalEntityManagement\Name;
use Adyen\Model\LegalEntityManagement\BirthData;
use Adyen\Model\LegalEntityManagement\Individual;
use Adyen\Model\LegalEntityManagement\LegalEntityInfoRequiredType;
use Adyen\Service\LegalEntityManagement\LegalEntitiesApi;
$client = new Client();
$client->setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY");
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
$phoneNumber = new PhoneNumber();
$phoneNumber
->setNumber("+14153671502")
->setType("mobile");
$address = new Address();
$address
->setCountry("US")
->setStateOrProvince("CA")
->setCity("San Francisco")
->setStreet("Brannan Street")
->setPostalCode("94678")
->setStreet2("274");
$name = new Name();
$name
->setFirstName("Simone")
->setLastName("Hopper");
$birthData = new BirthData();
$birthData
->setDateOfBirth("1981-12-01");
$individual = new Individual();
$individual
->setPhone($phoneNumber)
->setResidentialAddress($address)
->setName($name)
->setBirthData($birthData)
->setEmail("s.hopper@example.com");
$legalEntityInfoRequiredType = new LegalEntityInfoRequiredType();
$legalEntityInfoRequiredType
->setIndividual($individual)
->setType("individual");
// Send the request
$service = new LegalEntitiesApi($client);
$response = $service->createLegalEntity($legalEntityInfoRequiredType);
// Adyen .net API Library v28.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.LegalEntityManagement;
using Adyen.Service.LegalEntityManagement;
var config = new Config()
{
XApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY",
Environment = Environment.Test
};
var client = new Client(config);
// Create the request object(s)
PhoneNumber phoneNumber = new PhoneNumber
{
Number = "+14153671502",
Type = "mobile"
};
Address address = new Address
{
Country = "US",
StateOrProvince = "CA",
City = "San Francisco",
Street = "Brannan Street",
PostalCode = "94678",
Street2 = "274"
};
Name name = new Name
{
FirstName = "Simone",
LastName = "Hopper"
};
BirthData birthData = new BirthData
{
DateOfBirth = "1981-12-01"
};
Individual individual = new Individual
{
Phone = phoneNumber,
ResidentialAddress = address,
Name = name,
BirthData = birthData,
Email = "s.hopper@example.com"
};
LegalEntityInfoRequiredType legalEntityInfoRequiredType = new LegalEntityInfoRequiredType
{
Individual = individual,
Type = LegalEntityInfoRequiredType.TypeEnum.Individual
};
// Send the request
var service = new LegalEntitiesService(client);
var response = service.CreateLegalEntity(legalEntityInfoRequiredType);
// Adyen Node API Library v23.3.0
const { Client, LegalEntityManagementAPI } = require('@adyen/api-library');
const client = new Client({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: "TEST" });
// Create the request object(s)
const legalEntityInfoRequiredType = {
type: "individual",
individual: {
residentialAddress: {
city: "San Francisco",
country: "US",
postalCode: "94678",
stateOrProvince: "CA",
street: "Brannan Street",
street2: "274"
},
phone: {
number: "+14153671502",
type: "mobile"
},
name: {
firstName: "Simone",
lastName: "Hopper"
},
birthData: {
dateOfBirth: new Date("1981-12-01")
},
email: "s.hopper@example.com"
}
}
// Send the request
const legalEntityManagementAPI = new LegalEntityManagementAPI(client);
const response = legalEntityManagementAPI.LegalEntitiesApi.createLegalEntity(legalEntityInfoRequiredType);
// Adyen Go API Library v17.0.0
import (
"context"
"github.com/adyen/adyen-go-api-library/v17/src/common"
"github.com/adyen/adyen-go-api-library/v17/src/adyen"
"github.com/adyen/adyen-go-api-library/v17/src/legalEntityManagement"
)
client := adyen.NewClient(&common.Config{
ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY",
Environment: common.TestEnv,
})
// Create the request object(s)
phoneNumber := legalEntityManagement.PhoneNumber{
Number: "+14153671502",
Type: common.PtrString("mobile"),
}
address := legalEntityManagement.Address{
Country: "US",
StateOrProvince: common.PtrString("CA"),
City: common.PtrString("San Francisco"),
Street: common.PtrString("Brannan Street"),
PostalCode: common.PtrString("94678"),
Street2: common.PtrString("274"),
}
name := legalEntityManagement.Name{
FirstName: "Simone",
LastName: "Hopper",
}
birthData := legalEntityManagement.BirthData{
DateOfBirth: common.PtrString("1981-12-01"),
}
individual := legalEntityManagement.Individual{
Phone: &phoneNumber,
ResidentialAddress: address,
Name: name,
BirthData: &birthData,
Email: common.PtrString("s.hopper@example.com"),
}
legalEntityInfoRequiredType := legalEntityManagement.LegalEntityInfoRequiredType{
Individual: &individual,
Type: "individual",
}
// Send the request
service := client.LegalEntityManagement()
req := service.LegalEntitiesApi.CreateLegalEntityInput().LegalEntityInfoRequiredType(legalEntityInfoRequiredType)
res, httpRes, err := service.LegalEntitiesApi.CreateLegalEntity(context.Background(), req)
# Adyen Python API Library v13.3.0
import Adyen
adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"
adyen.client.platform = "test" # The environment to use library in.
# Create the request object(s)
json_request = {
"type": "individual",
"individual": {
"residentialAddress": {
"city": "San Francisco",
"country": "US",
"postalCode": "94678",
"stateOrProvince": "CA",
"street": "Brannan Street",
"street2": "274"
},
"phone": {
"number": "+14153671502",
"type": "mobile"
},
"name": {
"firstName": "Simone",
"lastName": "Hopper"
},
"birthData": {
"dateOfBirth": "1981-12-01"
},
"email": "s.hopper@example.com"
}
}
# Send the request
result = adyen.legalEntityManagement.legal_entities_api.create_legal_entity(request=json_request)
# Adyen Ruby API Library v10.1.1
require "adyen-ruby-api-library"
adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY'
adyen.env = :test # Set to "live" for live environment
# Create the request object(s)
request_body = {
:type => 'individual',
:individual => {
:residentialAddress => {
:city => 'San Francisco',
:country => 'US',
:postalCode => '94678',
:stateOrProvince => 'CA',
:street => 'Brannan Street',
:street2 => '274'
},
:phone => {
:number => '+14153671502',
:type => 'mobile'
},
:name => {
:firstName => 'Simone',
:lastName => 'Hopper'
},
:birthData => {
:dateOfBirth => '1981-12-01'
},
:email => 's.hopper@example.com'
}
}
# Send the request
result = adyen.legalEntityManagement.legal_entities_api.create_legal_entity(request_body)
// Adyen Node API Library v23.3.0
import { Client, LegalEntityManagementAPI, Types } from "@adyen/api-library";
const client = new Client({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: "TEST" });
// Create the request object(s)
const phoneNumber: Types.legalEntityManagement.PhoneNumber = {
number: "+14153671502",
type: "mobile"
};
const address: Types.legalEntityManagement.Address = {
country: "US",
stateOrProvince: "CA",
city: "San Francisco",
street: "Brannan Street",
postalCode: "94678",
street2: "274"
};
const name: Types.legalEntityManagement.Name = {
firstName: "Simone",
lastName: "Hopper"
};
const birthData: Types.legalEntityManagement.BirthData = {
dateOfBirth: "1981-12-01"
};
const individual: Types.legalEntityManagement.Individual = {
phone: phoneNumber,
residentialAddress: address,
name: name,
birthData: birthData,
email: "s.hopper@example.com"
};
const legalEntityInfoRequiredType: Types.legalEntityManagement.LegalEntityInfoRequiredType = {
individual: individual,
type: Types.legalEntityManagement.LegalEntityInfoRequiredType.TypeEnum.Individual
};
// Send the request
const legalEntityManagementAPI = new LegalEntityManagementAPI(client);
const response = legalEntityManagementAPI.LegalEntitiesApi.createLegalEntity(legalEntityInfoRequiredType);
id and type of the legal entity you created.Response{
"individual": {
"email": "s.eller@example.com",
"name": {
"firstName": "Shelly",
"lastName": "Eller"
},
"residentialAddress": {
"city": "San Francisco",
"country": "US",
"postalCode": "94678",
"stateOrProvince": "CA",
"street": "Brannan Street",
"street2": "274"
}
},
"type": "individual",
"id": "LE00000000000000000000001"
}
Use the API key for your ws@Company.****[YourCompanyAccount] API credential. Your Adyen contact also provides you with the name of your merchant account, which you must include in your payments request.Try it out!If your account is set up correctly and the request is successful, you receive a response containing an HTTP 200 result code along with
Choose the option that best suits your use case.
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: YOUR_COMPANY_ACCOUNT_API_KEY' \
-H 'content-type: application/json' \
-X POST \
-d '{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "My first Adyen test payment",
"amount": {
"value": {hint:10 euros in minor units}1000{/hint},
"currency": "EUR"
},
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber": "test_4111111111111111",
"encryptedExpiryMonth": "test_03",
"encryptedExpiryYear": "test_2030",
"encryptedSecurityCode": "test_737"
}
}'
// Adyen Java API Library v33.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.checkout.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.model.RequestOptions;
import com.adyen.service.checkout.*;
// For the LIVE environment, also include your liveEndpointUrlPrefix.
Client client = new Client("YOUR_COMPANY_ACCOUNT_API_KEY", Environment.TEST);
// Create the request object(s)
Amount amount = new Amount()
.currency("EUR")
.value(1000L);
CardDetails cardDetails = new CardDetails()
.encryptedCardNumber("test_4111111111111111")
.encryptedSecurityCode("test_737")
.encryptedExpiryYear("test_2030")
.encryptedExpiryMonth("test_03")
.type(CardDetails.TypeEnum.SCHEME);
PaymentRequest paymentRequest = new PaymentRequest()
.reference("My first Adyen test payment")
.amount(amount)
.merchantAccount("YOUR_MERCHANT_ACCOUNT")
.paymentMethod(new CheckoutPaymentMethod(cardDetails));
// Send the request
PaymentsApi service = new PaymentsApi(client);
PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID"));
<?php
// Adyen PHP API Library v24.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Checkout\Amount;
use Adyen\Model\Checkout\CheckoutPaymentMethod;
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Service\Checkout\PaymentsApi;
$client = new Client();
$client->setXApiKey("YOUR_COMPANY_ACCOUNT_API_KEY");
// For the LIVE environment, also include your liveEndpointUrlPrefix.
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
$amount = new Amount();
$amount
->setCurrency("EUR")
->setValue(1000);
$checkoutPaymentMethod = new CheckoutPaymentMethod();
$checkoutPaymentMethod
->setEncryptedCardNumber("test_4111111111111111")
->setEncryptedSecurityCode("test_737")
->setEncryptedExpiryYear("test_2030")
->setEncryptedExpiryMonth("test_03")
->setType("scheme");
$paymentRequest = new PaymentRequest();
$paymentRequest
->setReference("My first Adyen test payment")
->setAmount($amount)
->setMerchantAccount("YOUR_MERCHANT_ACCOUNT")
->setPaymentMethod($checkoutPaymentMethod);
$requestOptions['idempotencyKey'] = 'UUID';
// Send the request
$service = new PaymentsApi($client);
$response = $service->payments($paymentRequest, $requestOptions);
// Adyen .net API Library v28.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Checkout;
using Adyen.Service.Checkout;
// For the LIVE environment, also include your liveEndpointUrlPrefix.
var config = new Config()
{
XApiKey = "YOUR_COMPANY_ACCOUNT_API_KEY",
Environment = Environment.Test
};
var client = new Client(config);
// Create the request object(s)
Amount amount = new Amount
{
Currency = "EUR",
Value = 1000
};
CardDetails cardDetails = new CardDetails
{
EncryptedCardNumber = "test_4111111111111111",
EncryptedSecurityCode = "test_737",
EncryptedExpiryYear = "test_2030",
EncryptedExpiryMonth = "test_03",
Type = CardDetails.TypeEnum.Scheme
};
PaymentRequest paymentRequest = new PaymentRequest
{
Reference = "My first Adyen test payment",
Amount = amount,
MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
PaymentMethod = new CheckoutPaymentMethod(cardDetails)
};
// Send the request
var service = new PaymentsService(client);
var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});
// Adyen Node API Library v23.3.0
const { Client, CheckoutAPI } = require('@adyen/api-library');
// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "YOUR_COMPANY_ACCOUNT_API_KEY", environment: "TEST" });
// Create the request object(s)
const paymentRequest = {
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
reference: "My first Adyen test payment",
amount: {
value: "1000",
currency: "EUR"
},
paymentMethod: {
type: "scheme",
encryptedCardNumber: "test_4111111111111111",
encryptedExpiryMonth: "test_03",
encryptedExpiryYear: "test_2030",
encryptedSecurityCode: "test_737"
}
}
// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
// Adyen Go API Library v17.0.0
import (
"context"
"github.com/adyen/adyen-go-api-library/v17/src/common"
"github.com/adyen/adyen-go-api-library/v17/src/adyen"
"github.com/adyen/adyen-go-api-library/v17/src/checkout"
)
// For the LIVE environment, also include your liveEndpointUrlPrefix.
client := adyen.NewClient(&common.Config{
ApiKey: "YOUR_COMPANY_ACCOUNT_API_KEY",
Environment: common.TestEnv,
})
// Create the request object(s)
amount := checkout.Amount{
Currency: "EUR",
Value: 1000,
}
cardDetails := checkout.CardDetails{
EncryptedCardNumber: common.PtrString("test_4111111111111111"),
EncryptedSecurityCode: common.PtrString("test_737"),
EncryptedExpiryYear: common.PtrString("test_2030"),
EncryptedExpiryMonth: common.PtrString("test_03"),
Type: common.PtrString("scheme"),
}
paymentRequest := checkout.PaymentRequest{
Reference: "My first Adyen test payment",
Amount: amount,
MerchantAccount: "YOUR_MERCHANT_ACCOUNT",
PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&cardDetails),
}
// Send the request
service := client.Checkout()
req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)
# Adyen Python API Library v13.3.0
import Adyen
adyen = Adyen.Adyen()
adyen.client.xapikey = "YOUR_COMPANY_ACCOUNT_API_KEY"
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.client.platform = "test" # The environment to use library in.
# Create the request object(s)
json_request = {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "My first Adyen test payment",
"amount": {
"value": "1000",
"currency": "EUR"
},
"paymentMethod": {
"type": "scheme",
"encryptedCardNumber": "test_4111111111111111",
"encryptedExpiryMonth": "test_03",
"encryptedExpiryYear": "test_2030",
"encryptedSecurityCode": "test_737"
}
}
# Send the request
result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID")
# Adyen Ruby API Library v10.1.1
require "adyen-ruby-api-library"
adyen = Adyen::Client.new
adyen.api_key = 'YOUR_COMPANY_ACCOUNT_API_KEY'
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.env = :test # Set to "live" for live environment
# Create the request object(s)
request_body = {
:merchantAccount => 'YOUR_MERCHANT_ACCOUNT',
:reference => 'My first Adyen test payment',
:amount => {
:value => '1000',
:currency => 'EUR'
},
:paymentMethod => {
:type => 'scheme',
:encryptedCardNumber => 'test_4111111111111111',
:encryptedExpiryMonth => 'test_03',
:encryptedExpiryYear => 'test_2030',
:encryptedSecurityCode => 'test_737'
}
}
# Send the request
result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' })
// Adyen Node API Library v23.3.0
import { Client, CheckoutAPI, Types } from "@adyen/api-library";
// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "YOUR_COMPANY_ACCOUNT_API_KEY", environment: "TEST" });
// Create the request object(s)
const amount: Types.checkout.Amount = {
currency: "EUR",
value: 1000
};
const cardDetails: Types.checkout.CardDetails = {
encryptedCardNumber: "test_4111111111111111",
encryptedSecurityCode: "test_737",
encryptedExpiryYear: "test_2030",
encryptedExpiryMonth: "test_03",
type: Types.checkout.CardDetails.TypeEnum.Scheme
};
const paymentRequest: Types.checkout.PaymentRequest = {
reference: "My first Adyen test payment",
amount: amount,
merchantAccount: "YOUR_MERCHANT_ACCOUNT",
paymentMethod: cardDetails
};
// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
resultCode: Authorised. You have just made a successful test credit card payment of 10 EUR!Set up webhooks
Webhooks are a crucial part of your integration. Adyen sends webhooks to communicate events in your platform, such as if your user needs to provide additional information for onboarding, or when their funds have been paid out.- Set up webhook endpoints on your server and build the logic for acknowledging webhooks.
- Configure webhooks in your Customer Area.
- Secure webhooks with HMAC signing.
Integrate components
To reduce implementation time and effort, take advantage of Adyen’s prebuilt component libraries that you can seamlessly integrate into your user interface.Components simplify the process of collecting user input for payments or during onboarding, and allows you to showcase interactive dashboards to your users, such as an overview of their transactions and other reporting data.-
Create an authentication session from your server
Create a session token to ensure secure communication between the component and the Adyen server. -
Install the component library in your front end
Install the npm package, then import the library, component, and style sheet in your front-end application. -
Initialize the component
- Gather the required information on the specific library and component you want to integrate.
- Create a DOM element on your user interface page where you want the component to be rendered.
- Add a function that calls your API to retrieve and refresh an authentication session token.
- Initialize the component and mount it to the DOM element you created.
-
Customize the component(s)
Customize the component to match your platform’s look and feel.
Onboard and verify users
Before you can start processing payments for your users and pay out to them, Adyen needs to verify their information.You can choose from the following types of onboarding:-
Hosted onboarding (recommended): Your users are directed to a page hosted by Adyen, where Adyen manages the onboarding flow and user interface. Adyen offers two different ways to implement hosted onboarding:
- Onboarding on invite
- API-initiated
- API-only onboarding: Build your own UI and collect required user data by integrating with Adyen APIs.
| Onboarding type | Way to implement | How it works | Use this option if you… |
|---|---|---|---|
| Hosted onboarding | Onboarding on invite | In your Customer Area, request Adyen to create an account holder for your user. You then create a hosted onboarding link to redirect your user to enter their information. | Have limited technical resources. Want to get started quickly with a pre-configured account structure and settings. Have a small number of users with high volumes that do not require extensive automation. Prefer to outsource user onboarding management to Adyen to reduce future maintenance. Want to ensure ongoing compliance with regulatory changes, as Adyen will handle this for you. |
| API-initiated | Create resources and a hosted onboarding link by making API calls to several endpoints, and redirect your user to enter their information. | Have moderate technical resources. Want to get started quickly with minimal integration efforts. Prefer to outsource user onboarding management to Adyen to reduce future maintenance. Want to ensure ongoing compliance with regulatory changes, as Adyen will handle this for you. | |
| API-only | Build your own UI and collect required user data. You make API requests to create resources and submit the user data to Adyen. This onboarding type gives you complete control over the user journey within your platform’s environment. | Have sufficient technical resources. Understand it is your responsibility to regularly update your integration to comply with regulatory changes. Want to maintain complete control over the user experience within your platform’s environment. | |
-
Request an account holder
In your Customer Area, request an account holder. Adyen then automatically creates all required resources and configures the default payment methods for your user. -
Create and share a hosted onboarding link
Create a hosted onboarding link. Choose one of the following options:- Create a hosted onboarding link in your Customer Area to share it with your user after their account is created. Your user can securely access the hosted onboarding link with an SMS authentication. They then will be redirected to the Adyen-hosted page to provide their information.
- Integrate the View Verification Status component into your user interface (UI). This component automatically creates a hosted onboarding link, redirects your user to the Adyen-hosted page, and shows their verification status.
-
Get updates about an account holder
Receive a notification after your account holder is onboarded by listening to the Onboarding on invite webhook. -
Optional: Get verification updates
Get verification status updates via webhooks, and resolve verification errors if necessary. You can skip this step if you choose to integrate the View Verification Status component. -
Optional: Create additional stores
After onboarding your user, you can create additional stores for your user in your Customer Area. -
Optional: Request additional payment methods
If you want to accept payments using payment methods other than the default ones, you can request them using the Management API.
You need to make a few API calls to the Legal Entity Management API and Configuration API to create and customize the resources required to generate the Adyen-hosted onboarding page.
- Identify and collect the required information
Check the required information based on the country or region in which your user operates. - Create legal entities
Create the required legal entity resources for your user, including the main and supporting legal entities. - Associate legal entities
Link supporting legal entities to the main legal entity of your user. - Create business lines
Create business lines to provide Adyen with information about your user’s line of business, such as their industry and sales channels. - Create the account holder
Create an account holder and link it to main legal entity. - Create stores
Create stores to ensure that payments are processed in a compliant manner and settled with the correct user. - Add payment methods
Configure which payment methods you want to accept in each store. - Create the hosted onboarding link
Generate the link for the onboarding page, through which your user can provide the information required for verification checks. - Create balance accounts
Create balance accounts to hold the funds of your user. - Get verification updates
Get verification status updates via webhooks, and resolve verification errors if necessary.
- Identify and collect the required information
Check the required information based on the country or region in which your user operates. - Create legal entities
Create the required legal entity resources for your user, including the main and supporting legal entities. - Associate legal entities
Link supporting legal entities to the main legal entity of your user. - Create transfer instruments
Create a transfer instrument, the resource that represents the user’s payout bank account. Adyen must verify ths bank account before you can pay out to it. - Create business lines
Create business lines to provide Adyen with information about your user’s line of business, such as their industry and sales channels. - Create stores
Create stores to ensure that payments are processed in a compliant manner and settled with the correct user. - Add payment methods
Configure which payment methods you want to accept in each store. - Create account holders
Create an account holder and link it to main legal entity. - Accept the terms of service
Accept Adyen’s Terms of Service. Depending on your integration, your may need to accept more than one Terms of Service document. - Generate PCI questionnaires
Ask your users to sign the required PCI security questionnaires. Depending on your user’s sales channels, they must sign one or more Self-Assessment Questionnaires (SAQs). - Create balance accounts
Create balance accounts to hold the funds of your user. - Get updates about account holders
Get updates about the verification status and capability changes for your user. Capabilities are actions that an account holder can do in your platform, such as paying out to their bank accounts. - Upload additional documents
Adyen may require you to upload additional documents in order to verify user data.
Process payments
Build your payments integration
Online payments: Build an Adyen online payments integration and checkout UI. After you build your integration, you can accept payments with cards, wallets, and local payment methods on your website and mobile app.In-person payments: Integrate your POS app with Adyen’s terminals and Terminal API. After you finish your integration, you can accept payments at the point of sale using Adyen’s payment terminals.Start processing payments
To make sure that the pay-in, settlement, and payout processes run smoothly, you must book the incoming funds and fees to the correct balance accounts. This means that you have to include information on how to split the funds between your users’ balance accounts and your platform’s liable balance account.You can configure your user’s store to automatically apply your billing logic to all payments by creating split configuration profiles. For example, you can deduct your platform’s commission and the transaction fees, or choose how to book potential chargebacks. This means that you do not need to send split instructions in every payment, capture, refund, or chargeback.
- Create split configuration profiles
Create profiles with the conditions that determine how to split the transaction amount between balance accounts. - Link the profile to you user’s store
Associate the split configuration profile with your user’s store.
The core of your Adyen integration is being able to process payments and handle their subsequent states. If you do not automate payment splits, or if you want to overwrite the automatic split instructions, you can split individual transactions using the Checkout API.
- Split payments
Split the payment amount at authorization or at capture. - Split refunds
Book the refund amount to multiple balance accounts. - Split chargebacks
Split the chargeback amount between multiple balance accounts. - Handle transaction fees
Define the balance accounts from which you want to deduct the fees incurred by transactions.
The core of your Adyen integration is being able to process payments and handle their subsequent states. If you do not automate payment splits, you can split individual transactions using the Terminal API.
- Split payments
Split the payment amount at authorization or at capture. - Split refunds
Book the refund amount to multiple balance accounts. - Handle transaction fees
Define the balance accounts from which you want to deduct the fees incurred by transactions. - Configure tipping (gratuity)
Select the balance accounts to which you want to book tips added to the payment.
Pay out
Pay out funds to your user’s bank account.- Listen to webhooks
Learn which webhooks Adyen sends to inform your server of payout events. - Configure managed payouts (recommended)
For optimal, hands-off fund transfers, set up managed payouts. - Implement custom payouts
For granular control, set up custom payouts.
Transfer funds
Move funds between balance accounts in your balance platform, for example, to cover subscription fees or pass through chargeback costs.- Listen to webhooks
Learn which webhooks Adyen sends to inform your server of internal transfer events. - Make scheduled transfers
Set up scheduled transfers. - Transfer funds on demand
Send funds or initiate an internal direct debit between balance accounts within your balance platform. - Return transferred funds
Return funds to the original balance account without creating a new transfer.
Accounting and reconciliation
Use reports to reconcile payments and balances in your system.- Set up your reports credentials
Your Adyen contact will provide you with a reports credential, which you’ll need if you want to programmatically download reports. - Download reports
Listen to the balancePlatform.report.created webhook to know when a report is generated and ready to be downloaded. To download a report, you must authenticate your GET requests with your report credentials. - Reconcile using reports
Familiarize yourself with the common reconciliation processes at Adyen.
Go live
To take your Adyen for Platforms integration live, you need to apply for a live account. When you have your live account, follow the steps below to take your integration live.-
Replicate your test account setup
The setup from your test Adyen for Platforms account is not replicated to your live Adyen for Platforms account automatically. - Update your code base
-
Switch to live API credentials
Get your live API credentials from your Adyen contact. Use these credentials in your live account. -
Switch from test to live endpoints
Change the endpoints fromtesttolive. For example,https://balanceplatform-api-test.adyen.com/to
https://balanceplatform-api-live.adyen.com/. -
Run end-to-end tests
- Live API credentials: Make your first live API request to make sure that your live API credentials are working.
- Legal entities: Confirm that you can create legal entities.
- Account holders and balance accounts: Confirm you can create and retrieve account holders and balance accounts.
-
Payments:
- Test successful payment scenarios.
- Test your error handling scenarios, for example, when payments are declined.
- Payouts: Confirm that your scheduled or on-demand payouts are working as expected.
- Verification errors: Test your error handling scenarios when onboarding users.
- Webhooks: Confirm that you can receive and accept webhooks in the live environment.
- Reports: Confirm that you can download reports in the live environment.