> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorise a Recurring Payment

> This page is for the Classic API ( /authorise ) integration, which we no longer accept new integrations with.

**Adyen is no longer developing the Classic API integration**

This page is for the Classic API (`/authorise`) integration, which we no longer accept new integrations with.

We strongly recommend migrating to the newer [Tokenization](https://adyen-preview.mintlify.site/online-payments/tokenization) integration. To use this newer integration, you must also [migrate to the Checkout API](https://adyen-preview.mintlify.site/online-payments/upgrade-your-integration/migrate-to-checkout-api).

After you successfully [stored payment details](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization/store-payment-details.md) 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](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization), include in your [/authorise](https://docs.adyen.com/api-explorer/Payment/authorise) request:

* `card.cvc`: the card CVC that you collected from the shopper.
* `recurring.contract`: **ONECLICK**
* `recurringProcessingModel`: **CardOnFile**
* `shopperReference`: The `shopperReference` that you specified when storing the payment details.
* `shopperInteraction`: **ContAuth**
* `selectedRecurringDetailReference`: Either the `recurringDetailReference` returned from the list of all stored details based on the `shopperReference`, or **LATEST** to use the most recent recurring detail.

The following code examples show the request of a one-click payment.

#### JSON

```json theme={null}
{
   "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 theme={null}
<?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

```html theme={null}
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
```

If you are [hosting the CSE library](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/client-side-encryption/hosting-the-cse-library.md), include the encrypted card CVC in `additionalData`:

```json theme={null}
{
   "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](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization), include in your [/authorise](https://docs.adyen.com/api-explorer/Payment/authorise) request:

* `recurring.contract`: **RECURRING**
* `recurringProcessingModel`: **Subscription**
* `shopperReference`: The `shopperReference` that you specified when storing the payment details.
* `shopperInteraction`: **ContAuth**
* `selectedRecurringDetailReference`: Either the `recurringDetailReference` returned from the list of all stored details based on the `shopperReference`, or **LATEST** to use the most recent recurring detail.

The following code examples show the request of a recurring payment.

#### JSON

```json theme={null}
{
   "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 theme={null}
<?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>
```

```bash curl theme={null}
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"
}'
```

```java Java theme={null}
// 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 PHP theme={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);
```

```cs C# theme={null}
// 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);
```

```js NodeJS (JavaScript) theme={null}
// 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);
```

```go Go theme={null}
// 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)
```

```py Python theme={null}
# 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)
```

```rb Ruby theme={null}
# 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)
```

```ts NodeJS (TypeScript) theme={null}
// 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);
```

## Next steps

* [Capture a recurring payment](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization/capture-a-recurring-payment.md)
* [Retrieve stored details](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization/retrieve-stored-details.md)
* [Update stored details](https://adyen-preview.mintlify.site/online-payments/classic-integrations/classic-api-integration/tokenization/update-stored-details.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.