/authorise) integration, which we no longer accept new integrations with.
We strongly recommend migrating to the newer Tokenization integration. To use this newer integration, you must also migrate to the Checkout API.
After you successfully stored payment details during the first /authorise call, you can refer to these details in subsequent calls every time a recurring payment should take place.
One-click payments
For subsequent one-click payments, include in your /authorise request:card.cvc: the card CVC that you collected from the shopper.recurring.contract: ONECLICKrecurringProcessingModel: CardOnFileshopperReference: TheshopperReferencethat you specified when storing the payment details.shopperInteraction: ContAuthselectedRecurringDetailReference: Either therecurringDetailReferencereturned from the list of all stored details based on theshopperReference, or LATEST to use the most recent recurring detail.
JSON
{
"amount":{
"value":2000,
"currency":"EUR"
},
"card":{
"cvc":"737"
},
"reference":"Your Reference Here",
"merchantAccount":"TestMerchant",
"shopperEmail":"s.hopper@test.com",
"shopperIP":"61.294.12.12",
"shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"selectedRecurringDetailReference":"LATEST",
"recurring":{
"contract":"ONECLICK"
},
"recurringProcessingModel": "CardOnFile",
"shopperInteraction":"ContAuth"
}
Soap
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance">
<soap:Body>
<ns1:authorise xmlns:ns1="http://payment.services.adyen.com">
<ns1:paymentRequest>
<amount xmlns="http://payment.services.adyen.com">
<currency xmlns="http://common.services.adyen.com">EUR</currency>
<value xmlns="http://common.services.adyen.com">2000</value>
</amount>
<card xmlns="http://payment.services.adyen.com">
<cvc xmlns="http://payment.services.adyen.com">737</cvc>
</card>
<merchantAccount xmlns="http://payment.services.adyen.com">TestMerchant</merchantAccount>
<reference xmlns="http://payment.services.adyen.com">Your Reference Here</reference>
<shopperEmail xmlns="http://payment.services.adyen.com">s.hopper@test.com</shopperEmail>
<shopperIP xmlns="http://payment.services.adyen.com">61.294.12.12</shopperIP>
<shopperReference xmlns="http://payment.services.adyen.com">YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j</shopperReference>
<selectedRecurringDetailReference xmlns="http://payment.services.adyen.com">LATEST</selectedRecurringDetailReference>
<recurring xmlns="http://payment.services.adyen.com">
<contract xmlns="http://payment.services.adyen.com">ONECLICK</contract>
</recurring>
<recurringProcessingModel xmlns="http://payment.services.adyen.com">CardOnFile</recurringProcessingModel>
<shopperInteraction xmlns="http://payment.services.adyen.com">ContAuth</shopperInteraction>
</ns1:paymentRequest>
</ns1:authorise>
</soap:Body>
</soap:Envelope>
Form
merchantAccount=TestMerchant&amount.value=2000&amount.currency=EUR&card.cvc=737&reference=Your+Reference+Here&shopperReference=YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j&shopperEmail=s.hopper%40test.com&shopperIP=61.294.12.12&recurring.contract=ONECLICK&recurringProcessingModel=CardOnFile&selectedRecurringDetailReference=LATEST&shopperInteraction=ContAuth
additionalData:
{
"amount":{
"value":2000,
"currency":"EUR"
},
"additionalData":{
"card.encrypted.json":"adyenjs_0_1_18$*******"
},
"reference":"Your Reference Here",
"merchantAccount":"YOUR_MERCHANT_ACCOUNT",
"shopperEmail":"s.hopper@test.com",
"shopperIP":"61.294.12.12",
"shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"selectedRecurringDetailReference":"LATEST",
"recurring":{
"contract":"ONECLICK"
},
"recurringProcessingModel":"CardOnFile",
"shopperInteraction":"ContAuth"
}
Recurring payments
For subsequent recurring payments, include in your /authorise request:recurring.contract: RECURRINGrecurringProcessingModel: SubscriptionshopperReference: TheshopperReferencethat you specified when storing the payment details.shopperInteraction: ContAuthselectedRecurringDetailReference: Either therecurringDetailReferencereturned from the list of all stored details based on theshopperReference, or LATEST to use the most recent recurring detail.
JSON
{
"amount":{
"value":2000,
"currency":"EUR"
},
"reference":"Your Reference Here",
"merchantAccount":"TestMerchant",
"shopperEmail":"s.hopper@test.com",
"shopperIP":"61.294.12.12",
"shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"selectedRecurringDetailReference":"LATEST",
"recurring":{
"contract":"RECURRING"
},
"recurringProcessingModel": "Subscription",
"shopperInteraction":"ContAuth"
}
Soap
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance">
<soap:Body>
<ns1:authorise xmlns:ns1="http://payment.services.adyen.com">
<ns1:paymentRequest>
<amount xmlns="http://payment.services.adyen.com">
<currency xmlns="http://common.services.adyen.com">EUR</currency>
<value xmlns="http://common.services.adyen.com">2000</value>
</amount>
<merchantAccount xmlns="http://payment.services.adyen.com">TestMerchant</merchantAccount>
<reference xmlns="http://payment.services.adyen.com">Your Reference Here</reference>
<shopperEmail xmlns="http://payment.services.adyen.com">s.hopper@test.com</shopperEmail>
<shopperIP xmlns="http://payment.services.adyen.com">61.294.12.12</shopperIP>
<shopperReference xmlns="http://payment.services.adyen.com">YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j</shopperReference>
<selectedRecurringDetailReference xmlns="http://payment.services.adyen.com">LATEST</selectedRecurringDetailReference>
<recurring xmlns="http://payment.services.adyen.com">
<contract xmlns="http://payment.services.adyen.com">RECURRING</contract>
</recurring>
<recurringProcessingModel xmlns="http://payment.services.adyen.com">Subscription</recurringProcessingModel>
<shopperInteraction xmlns="http://payment.services.adyen.com">ContAuth</shopperInteraction>
</ns1:paymentRequest>
</ns1:authorise>
</soap:Body>
</soap:Envelope>
curl https://pal-test.adyen.com/pal/servlet/Payment/v46/authorise \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-d '{
"amount": {
"value": 2000,
"currency": "EUR"
},
"reference": "Your Reference Here",
"merchantAccount": "TestMerchant",
"shopperEmail": "s.hopper@test.com",
"shopperIP": "61.294.12.12",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"selectedRecurringDetailReference": "LATEST",
"recurring": {
"contract": "RECURRING"
},
"recurringProcessingModel": "Subscription",
"shopperInteraction": "ContAuth"
}'
// Adyen Java API Library v39.3.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.payment.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.*;
Client client = new Client("ADYEN_API_KEY", Environment.TEST);
// Create the request object(s)
Amount amount = new Amount()
.currency("EUR")
.value(2000L);
Recurring recurring = new Recurring()
.contract(Recurring.ContractEnum.RECURRING);
PaymentRequest paymentRequest = new PaymentRequest()
.reference("Your Reference Here")
.amount(amount)
.merchantAccount("TestMerchant")
.recurring(recurring)
.recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION)
.selectedRecurringDetailReference("LATEST")
.shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH)
.shopperEmail("s.hopper@test.com")
.shopperIP("61.294.12.12")
.shopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j");
// Send the request
paymentApi service = new paymentApi(client);
PaymentResult response = service.authorise(paymentRequest, null);
<?php
// Adyen PHP API Library v28.2.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Payments\Amount;
use Adyen\Model\Payments\Recurring;
use Adyen\Model\Payments\PaymentRequest;
use Adyen\Service\Payments\PaymentsApi;
$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);
// Create the request object(s)
$amount = new Amount();
$amount
->setCurrency("EUR")
->setValue(2000);
$recurring = new Recurring();
$recurring
->setContract("RECURRING");
$paymentRequest = new PaymentRequest();
$paymentRequest
->setReference("Your Reference Here")
->setAmount($amount)
->setMerchantAccount("TestMerchant")
->setRecurring($recurring)
->setRecurringProcessingModel("Subscription")
->setSelectedRecurringDetailReference("LATEST")
->setShopperInteraction("ContAuth")
->setShopperEmail("s.hopper@test.com")
->setShopperIP("61.294.12.12")
->setShopperReference("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j");
// Send the request
$service = new PaymentsApi($client);
$response = $service->authorise($paymentRequest);
// Adyen .net API Library v32.1.1
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Payment;
using Adyen.Service;
var config = new Config()
{
XApiKey = "ADYEN_API_KEY",
Environment = Environment.Test
};
var client = new Client(config);
// Create the request object(s)
Amount amount = new Amount
{
Currency = "EUR",
Value = 2000
};
Recurring recurring = new Recurring
{
Contract = Recurring.ContractEnum.RECURRING
};
PaymentRequest paymentRequest = new PaymentRequest
{
Reference = "Your Reference Here",
Amount = amount,
MerchantAccount = "TestMerchant",
Recurring = recurring,
RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription,
SelectedRecurringDetailReference = "LATEST",
ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth,
ShopperEmail = "s.hopper@test.com",
ShopperIP = "61.294.12.12",
ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"
};
// Send the request
var service = new PaymentService(client);
var response = service.Authorise(paymentRequest);
// Adyen Node API Library v29.0.0
const { Client, PaymentAPI } = require('@adyen/api-library');
const config = new Config({
apiKey: "ADYEN_API_KEY",
environment: EnvironmentEnum.TEST
});
const client = new Client(config);
// Create the request object(s)
const paymentRequest = {
amount: {
value: 2000,
currency: "EUR"
},
reference: "Your Reference Here",
merchantAccount: "TestMerchant",
shopperEmail: "s.hopper@test.com",
shopperIP: "61.294.12.12",
shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
selectedRecurringDetailReference: "LATEST",
recurring: {
contract: "RECURRING"
},
recurringProcessingModel: "Subscription",
shopperInteraction: "ContAuth"
}
// Send the request
const paymentAPI = new PaymentAPI(client);
const response = paymentAPI.authorise(paymentRequest);
// Adyen Go API Library v21.0.0
import (
"context"
"github.com/adyen/adyen-go-api-library/v21/src/common"
"github.com/adyen/adyen-go-api-library/v21/src/adyen"
"github.com/adyen/adyen-go-api-library/v21/src/payments"
)
client := adyen.NewClient(&common.Config{
ApiKey: "ADYEN_API_KEY",
Environment: common.TestEnv,
})
// Create the request object(s)
amount := payments.Amount{
Currency: "EUR",
Value: 2000,
}
recurring := payments.Recurring{
Contract: common.PtrString("RECURRING"),
}
paymentRequest := payments.PaymentRequest{
Reference: "Your Reference Here",
Amount: amount,
MerchantAccount: "TestMerchant",
Recurring: &recurring,
RecurringProcessingModel: common.PtrString("Subscription"),
SelectedRecurringDetailReference: common.PtrString("LATEST"),
ShopperInteraction: common.PtrString("ContAuth"),
ShopperEmail: common.PtrString("s.hopper@test.com"),
ShopperIP: common.PtrString("61.294.12.12"),
ShopperReference: common.PtrString("YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"),
}
// Send the request
service := client.Payments()
req := service.PaymentsApi.AuthoriseInput().PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Authorise(context.Background(), req)
# Adyen Python API Library v13.6.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 = {
"amount": {
"value": 2000,
"currency": "EUR"
},
"reference": "Your Reference Here",
"merchantAccount": "TestMerchant",
"shopperEmail": "s.hopper@test.com",
"shopperIP": "61.294.12.12",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"selectedRecurringDetailReference": "LATEST",
"recurring": {
"contract": "RECURRING"
},
"recurringProcessingModel": "Subscription",
"shopperInteraction": "ContAuth"
}
# Send the request
result = adyen.payment.payments_api.authorise(request=json_request)
# Adyen Ruby API Library v10.4.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 = {
:amount => {
:value => 2000,
:currency => 'EUR'
},
:reference => 'Your Reference Here',
:merchantAccount => 'TestMerchant',
:shopperEmail => 's.hopper@test.com',
:shopperIP => '61.294.12.12',
:shopperReference => 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j',
:selectedRecurringDetailReference => 'LATEST',
:recurring => {
:contract => 'RECURRING'
},
:recurringProcessingModel => 'Subscription',
:shopperInteraction => 'ContAuth'
}
# Send the request
result = adyen.payment.payments_api.authorise(request_body)
// Adyen Node API Library v29.0.0
import { Client, PaymentAPI, Types } from "@adyen/api-library";
const config = new Config({
apiKey: "ADYEN_API_KEY",
environment: EnvironmentEnum.TEST
});
const client = new Client(config);
// Create the request object(s)
const amount: Types.payment.Amount = {
currency: "EUR",
value: 2000
};
const recurring: Types.payment.Recurring = {
contract: Types.payment.Recurring.ContractEnum.RECURRING
};
const paymentRequest: Types.payment.PaymentRequest = {
reference: "Your Reference Here",
amount: amount,
merchantAccount: "TestMerchant",
recurring: recurring,
recurringProcessingModel: Types.payment.PaymentRequest.RecurringProcessingModelEnum.Subscription,
selectedRecurringDetailReference: "LATEST",
shopperInteraction: Types.payment.PaymentRequest.ShopperInteractionEnum.ContAuth,
shopperEmail: "s.hopper@test.com",
shopperIP: "61.294.12.12",
shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j"
};
// Send the request
const paymentAPI = new PaymentAPI(client);
const response = paymentAPI.authorise(paymentRequest);