Authorise a recurring payment

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 one-click payments the following fields must be passed in a payment request:

  • amount
  • card.cvc
  • recurring.contract set to ONECLICK
  • shopperReference
  • shopperInteraction set to Ecommerce
  • selectedRecurringDetailReference
  • recurringProcessingModel - set to Subscription for payments that recur on a fixed schedule, and Card On File for payments that do not occur on a fixed schedule.

The following code examples show the request of a one-click payment in JSON, SOAP, and FORM.

{
   "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":"Simon Hopper",
   "selectedRecurringDetailReference":"LATEST",
   "recurring":{
      "contract":"ONECLICK"
   },
   "shopperInteraction":"Ecommerce"
}
<?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">Simon Hopper</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>
        <shopperInteraction xmlns="http://payment.services.adyen.com">Ecommerce</shopperInteraction>
       </ns1:paymentRequest>
    </ns1:authorise>
  </soap:Body>
</soap:Envelope>
merchantAccount=TestMerchant&amount.value=2000&amount.currency=EUR&card.cvc=737&reference=Your+Reference+Here&shopperReference=Simon+Hopper&shopperEmail=s.hopper%40test.com&shopperIP=61.294.12.12&recurring.contract=ONECLICK&selectedRecurringDetailReference=LATEST&shopperInteraction=Ecommerce

If you are using Hosting the CSE library, the card CVC must be encrypted and passed as additionalData:

{
   "amount":{
      "value":2000,
      "currency":"EUR"
   },
   "additionalData":{
      "card.encrypted.json":"adyenjs_0_1_18$*******"
   },
   "reference":"Your Reference Here",
   "merchantAccount":"TestMerchant",
   "shopperEmail":"s.hopper@test.com",
   "shopperIP":"61.294.12.12",
   "shopperReference":"Simon Hopper",
   "selectedRecurringDetailReference":"LATEST",
   "recurring":{
      "contract":"ONECLICK"
   },
   "shopperInteraction":"Ecommerce"
} 

Recurring payments

For recurring payments the following fields must be passed in a payment request:

  • amount
  • recurring.contract set to RECURRING
  • shopperReference
  • shopperInteraction set to ContAuth
  • selectedRecurringDetailReference
  • recurringProcessingModel - set to Subscription for payments that recur on a fixed schedule, and Card On File for payments that do not occur on a fixed schedule.

The following code examples show the request of a recurring payment in JSON, SOAP, and cURL.

{
   "amount":{
      "value":2000,
      "currency":"EUR"
   },
   "reference":"Your Reference Here",
   "merchantAccount":"TestMerchant",
   "shopperEmail":"s.hopper@test.com",
   "shopperIP":"61.294.12.12",
   "shopperReference":"Simon Hopper",
   "selectedRecurringDetailReference":"LATEST",
   "recurring":{
      "contract":"RECURRING"
   },
   "shopperInteraction":"ContAuth"
}
<?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">Simon Hopper</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>
        <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/v25/authorise \
 -d amount.value=2000 \
 -d amount.currency=EUR \
 -d reference=Your+Reference+Here \
 -d merchantAccount=TestMerchant \
 -d shopperEmail=s.hopper%40test.com \
 -d shopperIP=61.294.12.12 \
 -d shopperReference=Simon+Hopper \
 -d selectedRecurringDetailReference=LATEST \
 -d recurring.contract=RECURRING \
 -d shopperInteraction=ContAuth

Next steps