{"title":"Authorise a recurring payment","category":"default","creationDate":1776961627,"content":"<div class=\"sc-notice warning\"><div>\n<p><strong>Adyen is no longer developing the Classic API integration<\/strong><\/p>\n<p>This page is for the Classic API (<code>\/authorise<\/code>) integration, which we no longer accept new integrations with. <\/p>\n<p>We strongly recommend migrating to the newer <a href=\"\/online-payments\/tokenization\">Tokenization<\/a> integration. To use this newer integration, you must also <a href=\"\/pt\/online-payments\/upgrade-your-integration\/migrate-to-checkout-api\">migrate to the Checkout API<\/a>.<\/p>\n<\/div><\/div>\n<p>After you successfully <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/store-payment-details\">stored payment details<\/a> during the first\u00a0<code>\/authorise<\/code>\u00a0call, you can refer to these details in subsequent calls every time a recurring payment should take place.<\/p>\n<h2 id=\"one-click-payments\">One-click payments<\/h2>\n<p>For subsequent <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\">one-click payments<\/a>, include in your <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise<\/a> request:<\/p>\n<ul>\n<li><code>card.cvc<\/code>: the card CVC that you collected from the shopper.<\/li>\n<li><code>recurring.contract<\/code>:\u00a0<strong>ONECLICK<\/strong><\/li>\n<li><code>recurringProcessingModel<\/code>: <strong>CardOnFile<\/strong><\/li>\n<li><code>shopperReference<\/code>: The <code>shopperReference<\/code> that you specified when storing the payment details.<\/li>\n<li><code>shopperInteraction<\/code>:\u00a0<strong>ContAuth<\/strong><\/li>\n<li><code>selectedRecurringDetailReference<\/code>: Either the <code>recurringDetailReference<\/code> returned from the list of all stored details based on the <code>shopperReference<\/code>, or <strong>LATEST<\/strong> to use the most recent recurring detail.<\/li>\n<\/ul>\n<p>The following code examples show the request of a one-click payment.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'339992852'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n   \\\"amount\\\":{\\n      \\\"value\\\":2000,\\n      \\\"currency\\\":\\\"EUR\\\"\\n   },\\n   \\\"card\\\":{\\n      \\\"cvc\\\":\\\"737\\\"\\n   },\\n   \\\"reference\\\":\\\"Your Reference Here\\\",\\n   \\\"merchantAccount\\\":\\\"TestMerchant\\\",\\n   \\\"shopperEmail\\\":\\\"s.hopper@test.com\\\",\\n   \\\"shopperIP\\\":\\\"61.294.12.12\\\",\\n   \\\"shopperReference\\\":\\\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\\",\\n   \\\"selectedRecurringDetailReference\\\":\\\"LATEST\\\",\\n   \\\"recurring\\\":{\\n      \\\"contract\\\":\\\"ONECLICK\\\"\\n   },\\n   \\\"recurringProcessingModel\\\": \\\"CardOnFile\\\",\\n   \\\"shopperInteraction\\\":\\\"ContAuth\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&lt;?xml version=\\\"1.0\\\"?&gt;\\n&lt;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\\\"&gt;\\n  &lt;soap:Body&gt;\\n    &lt;ns1:authorise xmlns:ns1=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n      &lt;ns1:paymentRequest&gt;\\n        &lt;amount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n          &lt;currency xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;EUR&lt;\\\/currency&gt;\\n          &lt;value xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;2000&lt;\\\/value&gt;\\n        &lt;\\\/amount&gt;\\n        &lt;card xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n          &lt;cvc xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;737&lt;\\\/cvc&gt;\\n        &lt;\\\/card&gt;\\n        &lt;merchantAccount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;TestMerchant&lt;\\\/merchantAccount&gt;\\n        &lt;reference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;Your Reference Here&lt;\\\/reference&gt;\\n        &lt;shopperEmail xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;s.hopper@test.com&lt;\\\/shopperEmail&gt;\\n        &lt;shopperIP xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;61.294.12.12&lt;\\\/shopperIP&gt;\\n        &lt;shopperReference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j&lt;\\\/shopperReference&gt;\\n        &lt;selectedRecurringDetailReference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;LATEST&lt;\\\/selectedRecurringDetailReference&gt;\\n        &lt;recurring xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n          &lt;contract xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;ONECLICK&lt;\\\/contract&gt;\\n        &lt;\\\/recurring&gt;\\n        &lt;recurringProcessingModel xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;CardOnFile&lt;\\\/recurringProcessingModel&gt;\\n        &lt;shopperInteraction xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;ContAuth&lt;\\\/shopperInteraction&gt;\\n       &lt;\\\/ns1:paymentRequest&gt;\\n    &lt;\\\/ns1:authorise&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"},{\"language\":\"html\",\"tabTitle\":\"Form\",\"content\":\"merchantAccount=TestMerchant&amp;amount.value=2000&amp;amount.currency=EUR&amp;card.cvc=737&amp;reference=Your+Reference+Here&amp;shopperReference=YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j&amp;shopperEmail=s.hopper%40test.com&amp;shopperIP=61.294.12.12&amp;recurring.contract=ONECLICK&amp;recurringProcessingModel=CardOnFile&amp;selectedRecurringDetailReference=LATEST&amp;shopperInteraction=ContAuth\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>If you are\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/client-side-encryption\/hosting-the-cse-library\">hosting the CSE library<\/a>, include the encrypted card CVC in\u00a0<code>additionalData<\/code>:<\/p>\n<pre><code class=\"language-json\">{\n   \"amount\":{\n      \"value\":2000,\n      \"currency\":\"EUR\"\n   },\n   \"additionalData\":{\n      \"card.encrypted.json\":\"adyenjs_0_1_18$*******\"\n   },\n   \"reference\":\"Your Reference Here\",\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"shopperEmail\":\"s.hopper@test.com\",\n   \"shopperIP\":\"61.294.12.12\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"selectedRecurringDetailReference\":\"LATEST\",\n   \"recurring\":{\n      \"contract\":\"ONECLICK\"\n   },\n   \"recurringProcessingModel\":\"CardOnFile\",\n   \"shopperInteraction\":\"ContAuth\"\n}<\/code><\/pre>\n<h2 id=\"recurring-payments\">Recurring payments<\/h2>\n<p>For subsequent <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\">recurring payments<\/a>, include in your <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise<\/a> request:<\/p>\n<ul>\n<li><code>recurring.contract<\/code>:\u00a0<strong>RECURRING<\/strong><\/li>\n<li><code>recurringProcessingModel<\/code>: <strong>Subscription<\/strong><\/li>\n<li><code>shopperReference<\/code>: The <code>shopperReference<\/code> that you specified when storing the payment details.<\/li>\n<li><code>shopperInteraction<\/code>:\u00a0<strong>ContAuth<\/strong><\/li>\n<li><code>selectedRecurringDetailReference<\/code>: Either the <code>recurringDetailReference<\/code> returned from the list of all stored details based on the <code>shopperReference<\/code>, or <strong>LATEST<\/strong> to use the most recent recurring detail.<\/li>\n<\/ul>\n<p>The following code examples show the request of a recurring payment.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'1261757400'\" :code-data=\"[{&quot;language&quot;:&quot;json&quot;,&quot;tabTitle&quot;:&quot;JSON&quot;,&quot;content&quot;:&quot;{\\n   \\&quot;amount\\&quot;:{\\n      \\&quot;value\\&quot;:2000,\\n      \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;\\n   },\\n   \\&quot;reference\\&quot;:\\&quot;Your Reference Here\\&quot;,\\n   \\&quot;merchantAccount\\&quot;:\\&quot;TestMerchant\\&quot;,\\n   \\&quot;shopperEmail\\&quot;:\\&quot;s.hopper@test.com\\&quot;,\\n   \\&quot;shopperIP\\&quot;:\\&quot;61.294.12.12\\&quot;,\\n   \\&quot;shopperReference\\&quot;:\\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;,\\n   \\&quot;selectedRecurringDetailReference\\&quot;:\\&quot;LATEST\\&quot;,\\n   \\&quot;recurring\\&quot;:{\\n      \\&quot;contract\\&quot;:\\&quot;RECURRING\\&quot;\\n   },\\n   \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n   \\&quot;shopperInteraction\\&quot;:\\&quot;ContAuth\\&quot;\\n}&quot;},{&quot;language&quot;:&quot;xml&quot;,&quot;tabTitle&quot;:&quot;Soap&quot;,&quot;content&quot;:&quot;&lt;?xml version=\\&quot;1.0\\&quot;?&gt;\\n&lt;soap:Envelope xmlns:soap=\\&quot;http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\&quot; xmlns:xsd=\\&quot;http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\&quot; xmlns:xsi=\\&quot;http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema- instance\\&quot;&gt;\\n  &lt;soap:Body&gt;\\n    &lt;ns1:authorise xmlns:ns1=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;\\n      &lt;ns1:paymentRequest&gt;\\n        &lt;amount xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;\\n          &lt;currency xmlns=\\&quot;http:\\\/\\\/common.services.adyen.com\\&quot;&gt;EUR&lt;\\\/currency&gt;\\n          &lt;value xmlns=\\&quot;http:\\\/\\\/common.services.adyen.com\\&quot;&gt;2000&lt;\\\/value&gt;\\n        &lt;\\\/amount&gt;\\n        &lt;merchantAccount xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;TestMerchant&lt;\\\/merchantAccount&gt;\\n        &lt;reference xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;Your Reference Here&lt;\\\/reference&gt;\\n        &lt;shopperEmail xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;s.hopper@test.com&lt;\\\/shopperEmail&gt;\\n        &lt;shopperIP xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;61.294.12.12&lt;\\\/shopperIP&gt;\\n        &lt;shopperReference xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j&lt;\\\/shopperReference&gt;\\n        &lt;selectedRecurringDetailReference xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;LATEST&lt;\\\/selectedRecurringDetailReference&gt;\\n        &lt;recurring xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;\\n          &lt;contract xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;RECURRING&lt;\\\/contract&gt;\\n        &lt;\\\/recurring&gt;\\n        &lt;recurringProcessingModel xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;Subscription&lt;\\\/recurringProcessingModel&gt;\\n        &lt;shopperInteraction xmlns=\\&quot;http:\\\/\\\/payment.services.adyen.com\\&quot;&gt;ContAuth&lt;\\\/shopperInteraction&gt;\\n       &lt;\\\/ns1:paymentRequest&gt;\\n    &lt;\\\/ns1:authorise&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;&quot;},{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/pal-test.adyen.com\\\/pal\\\/servlet\\\/Payment\\\/v46\\\/authorise \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n \\&quot;amount\\&quot;: {\\n   \\&quot;value\\&quot;: 2000,\\n   \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n },\\n \\&quot;reference\\&quot;: \\&quot;Your Reference Here\\&quot;,\\n \\&quot;merchantAccount\\&quot;: \\&quot;TestMerchant\\&quot;,\\n \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@test.com\\&quot;,\\n \\&quot;shopperIP\\&quot;: \\&quot;61.294.12.12\\&quot;,\\n \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;,\\n \\&quot;selectedRecurringDetailReference\\&quot;: \\&quot;LATEST\\&quot;,\\n \\&quot;recurring\\&quot;: {\\n   \\&quot;contract\\&quot;: \\&quot;RECURRING\\&quot;\\n },\\n \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n \\&quot;shopperInteraction\\&quot;: \\&quot;ContAuth\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v39.3.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.payment.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;EUR\\&quot;)\\n  .value(2000L);\\n\\nRecurring recurring = new Recurring()\\n  .contract(Recurring.ContractEnum.RECURRING);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;Your Reference Here\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;TestMerchant\\&quot;)\\n  .recurring(recurring)\\n  .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.SUBSCRIPTION)\\n  .selectedRecurringDetailReference(\\&quot;LATEST\\&quot;)\\n  .shopperInteraction(PaymentRequest.ShopperInteractionEnum.CONTAUTH)\\n  .shopperEmail(\\&quot;s.hopper@test.com\\&quot;)\\n  .shopperIP(\\&quot;61.294.12.12\\&quot;)\\n  .shopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;);\\n\\n\\\/\\\/ Send the request\\npaymentApi service = new paymentApi(client);\\nPaymentResult response = service.authorise(paymentRequest, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v28.2.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Payments\\\\Amount;\\nuse Adyen\\\\Model\\\\Payments\\\\Recurring;\\nuse Adyen\\\\Model\\\\Payments\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Payments\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;EUR\\&quot;)\\n  -&gt;setValue(2000);\\n\\n$recurring = new Recurring();\\n$recurring\\n  -&gt;setContract(\\&quot;RECURRING\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;Your Reference Here\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;TestMerchant\\&quot;)\\n  -&gt;setRecurring($recurring)\\n  -&gt;setRecurringProcessingModel(\\&quot;Subscription\\&quot;)\\n  -&gt;setSelectedRecurringDetailReference(\\&quot;LATEST\\&quot;)\\n  -&gt;setShopperInteraction(\\&quot;ContAuth\\&quot;)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@test.com\\&quot;)\\n  -&gt;setShopperIP(\\&quot;61.294.12.12\\&quot;)\\n  -&gt;setShopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;);\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;authorise($paymentRequest);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v32.1.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Payment;\\nusing Adyen.Service;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;EUR\\&quot;,\\n  Value = 2000\\n};\\n\\nRecurring recurring = new Recurring\\n{\\n  Contract = Recurring.ContractEnum.RECURRING\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;Your Reference Here\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;TestMerchant\\&quot;,\\n  Recurring = recurring,\\n  RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  SelectedRecurringDetailReference = \\&quot;LATEST\\&quot;,\\n  ShopperInteraction = PaymentRequest.ShopperInteractionEnum.ContAuth,\\n  ShopperEmail = \\&quot;s.hopper@test.com\\&quot;,\\n  ShopperIP = \\&quot;61.294.12.12\\&quot;,\\n  ShopperReference = \\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentService(client);\\nvar response = service.Authorise(paymentRequest);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v29.0.0\\nconst { Client, PaymentAPI } = require('@adyen\\\/api-library');\\n\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  amount: {\\n    value: 2000,\\n    currency: \\&quot;EUR\\&quot;\\n  },\\n  reference: \\&quot;Your Reference Here\\&quot;,\\n  merchantAccount: \\&quot;TestMerchant\\&quot;,\\n  shopperEmail: \\&quot;s.hopper@test.com\\&quot;,\\n  shopperIP: \\&quot;61.294.12.12\\&quot;,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;,\\n  selectedRecurringDetailReference: \\&quot;LATEST\\&quot;,\\n  recurring: {\\n    contract: \\&quot;RECURRING\\&quot;\\n  },\\n  recurringProcessingModel: \\&quot;Subscription\\&quot;,\\n  shopperInteraction: \\&quot;ContAuth\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise(paymentRequest);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.0.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/payments\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := payments.Amount{\\n  Currency: \\&quot;EUR\\&quot;,\\n  Value: 2000,\\n}\\n\\nrecurring := payments.Recurring{\\n  Contract: common.PtrString(\\&quot;RECURRING\\&quot;),\\n}\\n\\npaymentRequest := payments.PaymentRequest{\\n  Reference: \\&quot;Your Reference Here\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;TestMerchant\\&quot;,\\n  Recurring: &amp;recurring,\\n  RecurringProcessingModel: common.PtrString(\\&quot;Subscription\\&quot;),\\n  SelectedRecurringDetailReference: common.PtrString(\\&quot;LATEST\\&quot;),\\n  ShopperInteraction: common.PtrString(\\&quot;ContAuth\\&quot;),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@test.com\\&quot;),\\n  ShopperIP: common.PtrString(\\&quot;61.294.12.12\\&quot;),\\n  ShopperReference: common.PtrString(\\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Payments()\\nreq := service.PaymentsApi.AuthoriseInput().PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Authorise(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.6.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 2000,\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;Your Reference Here\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;TestMerchant\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@test.com\\&quot;,\\n  \\&quot;shopperIP\\&quot;: \\&quot;61.294.12.12\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;,\\n  \\&quot;selectedRecurringDetailReference\\&quot;: \\&quot;LATEST\\&quot;,\\n  \\&quot;recurring\\&quot;: {\\n    \\&quot;contract\\&quot;: \\&quot;RECURRING\\&quot;\\n  },\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;ContAuth\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.4.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :amount =&gt; {\\n    :value =&gt; 2000,\\n    :currency =&gt; 'EUR'\\n  },\\n  :reference =&gt; 'Your Reference Here',\\n  :merchantAccount =&gt; 'TestMerchant',\\n  :shopperEmail =&gt; 's.hopper@test.com',\\n  :shopperIP =&gt; '61.294.12.12',\\n  :shopperReference =&gt; 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j',\\n  :selectedRecurringDetailReference =&gt; 'LATEST',\\n  :recurring =&gt; {\\n    :contract =&gt; 'RECURRING'\\n  },\\n  :recurringProcessingModel =&gt; 'Subscription',\\n  :shopperInteraction =&gt; 'ContAuth'\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v29.0.0\\nimport { Client, PaymentAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.payment.Amount = {\\n  currency: \\&quot;EUR\\&quot;,\\n  value: 2000\\n};\\n\\nconst recurring: Types.payment.Recurring = {\\n  contract: Types.payment.Recurring.ContractEnum.RECURRING\\n};\\n\\nconst paymentRequest: Types.payment.PaymentRequest = {\\n  reference: \\&quot;Your Reference Here\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;TestMerchant\\&quot;,\\n  recurring: recurring,\\n  recurringProcessingModel: Types.payment.PaymentRequest.RecurringProcessingModelEnum.Subscription,\\n  selectedRecurringDetailReference: \\&quot;LATEST\\&quot;,\\n  shopperInteraction: Types.payment.PaymentRequest.ShopperInteractionEnum.ContAuth,\\n  shopperEmail: \\&quot;s.hopper@test.com\\&quot;,\\n  shopperIP: \\&quot;61.294.12.12\\&quot;,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise(paymentRequest);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"next-steps\">Next steps<\/h2>\n<ul>\n<li><a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/capture-a-recurring-payment\">Capture a recurring payment<\/a><\/li>\n<li><a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/retrieve-stored-details\">Retrieve stored details<\/a><\/li>\n<li><a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/update-stored-details\">Update stored details<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/authorise-a-recurring-payment","articleFields":{"id":"31495376","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"24-01-2020 16:44","sitemap":{"priority":0.3},"parameters":{"anchor_new":"<a href=\"\/online-payments\/tokenization\">Tokenization<\/a>","parent_page":"Classic API (<code>\/authorise<\/code>)","new_desc":"integrating using our Checkout APIs"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/authorise-a-recurring-payment","title":"Authorise a recurring payment","content":"\nAdyen is no longer developing the Classic API integration\nThis page is for the Classic API (\/authorise) integration, which we no longer accept new integrations with. \nWe strongly recommend migrating to the newer Tokenization integration. To use this newer integration, you must also migrate to the Checkout API.\n\nAfter you successfully stored payment details during the first\u00a0\/authorise\u00a0call, you can refer to these details in subsequent calls every time a recurring payment should take place.\nOne-click payments\nFor subsequent one-click payments, include in your \/authorise request:\n\ncard.cvc: the card CVC that you collected from the shopper.\nrecurring.contract:\u00a0ONECLICK\nrecurringProcessingModel: CardOnFile\nshopperReference: The shopperReference that you specified when storing the payment details.\nshopperInteraction:\u00a0ContAuth\nselectedRecurringDetailReference: Either the recurringDetailReference returned from the list of all stored details based on the shopperReference, or LATEST to use the most recent recurring detail.\n\nThe following code examples show the request of a one-click payment.\n\n    \n\nIf you are\u00a0hosting the CSE library, include the encrypted card CVC in\u00a0additionalData:\n{\n   \"amount\":{\n      \"value\":2000,\n      \"currency\":\"EUR\"\n   },\n   \"additionalData\":{\n      \"card.encrypted.json\":\"adyenjs_0_1_18$*******\"\n   },\n   \"reference\":\"Your Reference Here\",\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"shopperEmail\":\"s.hopper@test.com\",\n   \"shopperIP\":\"61.294.12.12\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"selectedRecurringDetailReference\":\"LATEST\",\n   \"recurring\":{\n      \"contract\":\"ONECLICK\"\n   },\n   \"recurringProcessingModel\":\"CardOnFile\",\n   \"shopperInteraction\":\"ContAuth\"\n}\nRecurring payments\nFor subsequent recurring payments, include in your \/authorise request:\n\nrecurring.contract:\u00a0RECURRING\nrecurringProcessingModel: Subscription\nshopperReference: The shopperReference that you specified when storing the payment details.\nshopperInteraction:\u00a0ContAuth\nselectedRecurringDetailReference: Either the recurringDetailReference returned from the list of all stored details based on the shopperReference, or LATEST to use the most recent recurring detail.\n\nThe following code examples show the request of a recurring payment.\n\n    \n\nNext steps\n\nCapture a recurring payment\nRetrieve stored details\nUpdate stored details\n","type":"page","locale":"pt","boost":15,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Classic API integration","lvl4":"Tokenization","lvl5":"Authorise a recurring payment"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration","lvl4":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization","lvl5":"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/tokenization\/authorise-a-recurring-payment"},"levels":6,"category":"Online Payments","category_color":"green","tags":["Authorise","recurring","payment"]},"articleFiles":{"1261757400.js":"<p alt=\"\">1261757400.js<\/p>","1261757400.json":"<p alt=\"\">1261757400.json<\/p>"}}
