{"title":"BACS Direct Debit for API only","category":"default","creationDate":1776961628,"content":"<div class=\"notices red\">\n<p>We strongly recommend that you use our Drop-in or Component solution. This is because BACS Direct Debit must certify the UI that you show to shoppers. If you do not use our Drop-in or Component, the BACS payment method may be disabled, and shoppers may file for chargebacks.<\/p>\n<\/div>\n<p>You can add BACS Direct Debit to your existing integration. The following instructions show only what you must add to your integration specifically for BACS Direct Debit.<\/p>\n<p>If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.<\/p>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have an existing <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\">API-only integration<\/a>.<\/td>\n<td> <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Action handling<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your existing integration is set up to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#additional-action\">handle the additional action<\/a>. <br> <code>action.type<\/code>: <strong>Direct<\/strong>.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\"> Before you begin, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add BACS Direct Debit in your Customer Area<\/a>. <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>The shopper selects BACS Direct Debit as the payment method.<\/li>\n<li>The shopper enters their details in the <a href=\"#build-your-payment-form\">payment form that you build<\/a>.<\/li>\n<li>When you make the payment request, you <a href=\"#additional-parameters-payments\">include additional information about the items that the shopper intends to purchase<\/a>.<\/li>\n<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include BACS Direct Debit in the list of <a href=\"#get-payment-method\">available payment methods<\/a>.<\/p>\n<div class=\"notices green\">\n<p>You can <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%2Bonly&amp;version=71#downloading-logos\">download the logo for BACS Direct Debit<\/a> to use in your form.<\/p>\n<\/div>\n<h2 id=\"get-payment-method\">Get BACS Direct Debit as an available payment method<\/h2>\n<p>When you make the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#get-available-payment-methods\">get available payment methods<\/a>, specify the following so that BACS Direct Debit is included in the response.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><strong>GB<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/td>\n<td><strong>GBP<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for available payment methods'\" :id=\"'payment-methods-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/paymentMethods \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;countryCode\\&quot;: \\&quot;GB\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;GBP\\&quot;,\\n\\t  \\&quot;value\\&quot;: 1000\\n   },\\n   \\&quot;shopperLocale\\&quot;: \\&quot;gb-GB\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v40.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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;GBP\\&quot;)\\n  .value(1000L);\\n\\nPaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest()\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .countryCode(\\&quot;GB\\&quot;)\\n  .shopperLocale(\\&quot;gb-GB\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentMethodsResponse response = service.paymentMethods(paymentMethodsRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&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.3.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentMethodsRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;GBP\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$paymentMethodsRequest = new PaymentMethodsRequest();\\n$paymentMethodsRequest\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setCountryCode(\\&quot;GB\\&quot;)\\n  -&gt;setShopperLocale(\\&quot;gb-GB\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;paymentMethods($paymentMethodsRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .NET API Library v32.2.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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;GBP\\&quot;,\\n  Value = 1000\\n};\\n\\nPaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest\\n{\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode = \\&quot;GB\\&quot;,\\n  ShopperLocale = \\&quot;gb-GB\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.PaymentMethods(paymentMethodsRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.0.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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 paymentMethodsRequest = {\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;GB\\&quot;,\\n  amount: {\\n    currency: \\&quot;GBP\\&quot;,\\n    value: 1000\\n  },\\n  shopperLocale: \\&quot;gb-GB\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.1.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\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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 := checkout.Amount{\\n  Currency: \\&quot;GBP\\&quot;,\\n  Value: 1000,\\n}\\n\\npaymentMethodsRequest := checkout.PaymentMethodsRequest{\\n  Amount: &amp;amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode: common.PtrString(\\&quot;GB\\&quot;),\\n  ShopperLocale: common.PtrString(\\&quot;gb-GB\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentMethodsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentMethodsRequest(paymentMethodsRequest)\\nres, httpRes, err := service.PaymentsApi.PaymentMethods(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;GB\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;GBP\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperLocale\\&quot;: \\&quot;gb-GB\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payment_methods(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v11.0.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :countryCode =&gt; 'GB',\\n  :amount =&gt; {\\n    :currency =&gt; 'GBP',\\n    :value =&gt; 1000\\n  },\\n  :shopperLocale =&gt; 'gb-GB'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payment_methods(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.0.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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.checkout.Amount = {\\n  currency: \\&quot;GBP\\&quot;,\\n  value: 1000\\n};\\n\\nconst paymentMethodsRequest: Types.checkout.PaymentMethodsRequest = {\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;GB\\&quot;,\\n  shopperLocale: \\&quot;gb-GB\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with BACS Direct Debit available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"BACS Direct Debit\\\",\\n            \\\"type\\\": \\\"directdebit_GB\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"additional-parameters-payments\">Add additional parameters to your \/payments request<\/h2>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#make-a-payment\">make a payment<\/a>, add the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperEmail\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperEmail<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The email of the shopper.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-BacsDirectDebitDetails-type\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.type<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Set to <strong>directdebit_GB<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-BacsDirectDebitDetails-holderName\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.holderName<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The bank account holder's name.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-BacsDirectDebitDetails-bankAccountNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.bankAccountNumber<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The bank account holder's bank account number.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-BacsDirectDebitDetails-bankLocationId\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.bankLocationId<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The bank routing number of the account.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for BACS Direct Debit'\" :id=\"'payments-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-API-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;GBP\\&quot;,\\n    \\&quot;value\\&quot;:1000\\n  },\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;directdebit_GB\\&quot;,\\n      \\&quot;holderName\\&quot;:\\&quot;S. Hopper\\&quot;,\\n      \\&quot;bankAccountNumber\\&quot;:\\&quot;09083055\\&quot;,\\n      \\&quot;bankLocationId\\&quot;:\\&quot;560036\\&quot;\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;GB\\&quot;,\\n  \\&quot;shopperEmail\\&quot;:\\&quot;s.hopper@gmail.com\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v41.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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;GBP\\&quot;)\\n  .value(1000L);\\n\\nBacsDirectDebitDetails bacsDirectDebitDetails = new BacsDirectDebitDetails()\\n  .holderName(\\&quot;S. Hopper\\&quot;)\\n  .bankAccountNumber(\\&quot;09083055\\&quot;)\\n  .type(BacsDirectDebitDetails.TypeEnum.DIRECTDEBIT_GB)\\n  .bankLocationId(\\&quot;560036\\&quot;);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .countryCode(\\&quot;GB\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(bacsDirectDebitDetails))\\n  .shopperEmail(\\&quot;s.hopper@gmail.com\\&quot;)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v29.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;GBP\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setHolderName(\\&quot;S. Hopper\\&quot;)\\n  -&gt;setBankAccountNumber(\\&quot;09083055\\&quot;)\\n  -&gt;setType(\\&quot;directdebit_GB\\&quot;)\\n  -&gt;setBankLocationId(\\&quot;560036\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setCountryCode(\\&quot;GB\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@gmail.com\\&quot;)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .NET API Library v34.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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;GBP\\&quot;,\\n  Value = 1000\\n};\\n\\nBacsDirectDebitDetails bacsDirectDebitDetails = new BacsDirectDebitDetails\\n{\\n  HolderName = \\&quot;S. Hopper\\&quot;,\\n  BankAccountNumber = \\&quot;09083055\\&quot;,\\n  Type = BacsDirectDebitDetails.TypeEnum.DirectdebitGB,\\n  BankLocationId = \\&quot;560036\\&quot;\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode = \\&quot;GB\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(bacsDirectDebitDetails),\\n  ShopperEmail = \\&quot;s.hopper@gmail.com\\&quot;,\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.1.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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    currency: \\&quot;GBP\\&quot;,\\n    value: 1000\\n  },\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;directdebit_GB\\&quot;,\\n    holderName: \\&quot;S. Hopper\\&quot;,\\n    bankAccountNumber: \\&quot;09083055\\&quot;,\\n    bankLocationId: \\&quot;560036\\&quot;\\n  },\\n  countryCode: \\&quot;GB\\&quot;,\\n  shopperEmail: \\&quot;s.hopper@gmail.com\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.2.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\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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 := checkout.Amount{\\n  Currency: \\&quot;GBP\\&quot;,\\n  Value: 1000,\\n}\\n\\nbacsDirectDebitDetails := checkout.BacsDirectDebitDetails{\\n  HolderName: common.PtrString(\\&quot;S. Hopper\\&quot;),\\n  BankAccountNumber: common.PtrString(\\&quot;09083055\\&quot;),\\n  Type: common.PtrString(\\&quot;directdebit_GB\\&quot;),\\n  BankLocationId: common.PtrString(\\&quot;560036\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode: common.PtrString(\\&quot;GB\\&quot;),\\n  PaymentMethod: checkout.BacsDirectDebitDetailsAsCheckoutPaymentMethod(&amp;bacsDirectDebitDetails),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@gmail.com\\&quot;),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\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;currency\\&quot;: \\&quot;GBP\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;directdebit_GB\\&quot;,\\n    \\&quot;holderName\\&quot;: \\&quot;S. Hopper\\&quot;,\\n    \\&quot;bankAccountNumber\\&quot;: \\&quot;09083055\\&quot;,\\n    \\&quot;bankLocationId\\&quot;: \\&quot;560036\\&quot;\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;GB\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@gmail.com\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v11.2.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :amount =&gt; {\\n    :currency =&gt; 'GBP',\\n    :value =&gt; 1000\\n  },\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..',\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'directdebit_GB',\\n    :holderName =&gt; 'S. Hopper',\\n    :bankAccountNumber =&gt; '09083055',\\n    :bankLocationId =&gt; '560036'\\n  },\\n  :countryCode =&gt; 'GB',\\n  :shopperEmail =&gt; 's.hopper@gmail.com'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.1.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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.checkout.Amount = {\\n  currency: \\&quot;GBP\\&quot;,\\n  value: 1000\\n};\\n\\nconst bacsDirectDebitDetails: Types.checkout.BacsDirectDebitDetails = {\\n  holderName: \\&quot;S. Hopper\\&quot;,\\n  bankAccountNumber: \\&quot;09083055\\&quot;,\\n  type: Types.checkout.BacsDirectDebitDetails.TypeEnum.DirectdebitGb,\\n  bankLocationId: \\&quot;560036\\&quot;\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;GB\\&quot;,\\n  paymentMethod: bacsDirectDebitDetails,\\n  shopperEmail: \\&quot;s.hopper@gmail.com\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The response includes the <code>action.type<\/code>: <strong>Direct<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response for a successful payment'\" :id=\"'payments-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"resultCode\\\": \\\"Received\\\",\\n    \\\"action\\\": {\\n        \\\"type\\\": \\\"voucher\\\",\\n        \\\"paymentMethodType\\\": \\\"directdebit_GB\\\",\\n        \\\"url\\\": \\\"PDF_MANDATE_URL\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Recurring payments<\/h2>\n<p>If you have a recurring or subscription business model, we recommend tokenizing the shopper's payment details. When you create a shopper token from a BACS Direct Debit payment, we store the shopper's payment details with the token. You can use this token to make recurring BACS Direct Debit payments.<\/p>\n<p>You need to use the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> endpoint to <a href=\"#make-recurring-payments\">make recurring payments with the token<\/a>.<\/p>\n<div class=\"sc-notice warning\"><div>\n<p>We strongly recommend that you request explicit permission from the shopper if you intend to make recurring BACS Direct Debit payments. Being transparent about the payment schedule and the amount they will be charged will reduce the risk of <a href=\"\/pt\/get-started-with-adyen\/adyen-glossary\/#chargeback\">chargebacks<\/a>.<\/p>\n<p>Under the <a href=\"https:\/\/www.directdebit.co.uk\/direct-debit-explained\/direct-debit-guarantee\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Direct Debit Guarantee<\/a>, if there is a change in the collection date or the amount, you must give the shopper advance notice of the payment.<\/p>\n<\/div><\/div>\n<h3 id=\"create-shopper-token\">Create shopper token<\/h3>\n<p><a href=\"\/pt\/online-payments\/tokenization\/make-token-payments\">Tokenize the shopper's payment details<\/a> when you make the initial BACS Direct Debit payment.<\/p>\n<ol>\n<li>When you make a POST request to  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> to make a payment, additionally include:<\/li>\n<\/ol>\n<ul>\n<li><code>shopperReference<\/code>: Your unique ID for this shopper.<\/li>\n<li><code>paymentMethod.storePaymentMethod<\/code>: <strong>true<\/strong>.<\/li>\n<\/ul>\n<ol start=\"2\">\n<li>When you receive the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a>, store the <code>storedPaymentMethodId<\/code>. This is the token you will need to make recurring payments for this shopper.<\/li>\n<\/ol>\n<h3 id=\"make-recurring-payments\">Make recurring payments<\/h3>\n<div class=\"notices red\">\n<p>We strongly recommend giving shoppers advance notice before each payment.<\/p>\n<\/div>\n<p>For each recurring payment for this shopper, make a BACS Direct Debit payment with a POST request to the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> endpoint, and additionally include:<\/p>\n<ul>\n<li><code>paymentMethod.recurringDetailReference<\/code> or <code>paymentMethod.storedPaymentMethodId<\/code>for API v49 and above. This is the <code>storedPaymentMethodId<\/code> returned in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a> webhook when you created the token.<\/li>\n<li><code>shopperReference<\/code>: the unique shopper ID you used to create the shopper token.<\/li>\n<li><code>shopperInteraction<\/code>: <strong>ContAuth<\/strong>.<\/li>\n<\/ul>\n<pre><code class=\"language-json\">{\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"reference\":\"BACS test payment\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"shopperInteraction\":\"ContAuth\",\n   \"amount\":{\n      \"currency\":\"GBP\",\n      \"value\":49900\n   },\n   \"paymentMethod\":{\n      \"type\":\"directdebit_GB\",\n      \"storedPaymentMethodId\":\"7219687191761347\"\n   },\n   \"countryCode\":\"GB\",\n   \"shopperLocale\":\"gb-GB\",\n   \"returnUrl\":\"https:\/\/your-company.com\/checkout?shopperOrder=12xy..\"\n}<\/code><\/pre>\n<p>If the payment was successfully received the response will contain the <code>resultCode<\/code> <strong>Received<\/strong> and a <code>pspReference<\/code>, which is our unique identifier for this transaction. You can track whether the payment was successful using webhooks.<\/p>\n<h2>Test and go live<\/h2>\n<p>Before accepting live BACS Direct Debit payments, test your integration using the following details:<\/p>\n<table>\n<thead>\n<tr>\n<th>Account Name<\/th>\n<th>Account Number<\/th>\n<th>Sort Code<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>David Archer<\/td>\n<td>09083055<\/td>\n<td>560036<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Check the status of BACS Direct Debit test payments in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>\u00a0&gt;\u00a0<strong>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<p> <\/p>\n<p>Before you can accept live BACS Direct Debit payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for BACS Direct Debit<\/a> in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/bacs\/api-only","articleFields":{"description":"Add BACS Direct Debit to your API-only integration.","never_cache_twig":true,"parameters":{"flow":"Advanced","integration_guide_url":"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&integration=API%20only","payment_method":"BACS Direct Debit","payment_method_type":"directdebit_GB","payment_method_type_capitalized":"Directdebit_gb","tx_variant":"directdebit_GB","tx_variant_capitalized":"Directdebit_gb","country_codes":"<strong>GB<\/strong>","currency_codes":"<strong>GBP<\/strong>","additional_api":"true","api_version":"none","action_type":"<strong>Direct<\/strong>","pm_directory":"bacs","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/bacs\/api-only","title":"BACS Direct Debit for API only","content":"\nWe strongly recommend that you use our Drop-in or Component solution. This is because BACS Direct Debit must certify the UI that you show to shoppers. If you do not use our Drop-in or Component, the BACS payment method may be disabled, and shoppers may file for chargebacks.\n\nYou can add BACS Direct Debit to your existing integration. The following instructions show only what you must add to your integration specifically for BACS Direct Debit.\nIf an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have an existing API-only integration.\n \n\n\nAction handling\nMake sure that your existing integration is set up to handle the additional action.  action.type: Direct.\n\n\n\nSetup steps\n Before you begin, add BACS Direct Debit in your Customer Area. \n\n\n\nHow it works\n\nThe shopper selects BACS Direct Debit as the payment method.\nThe shopper enters their details in the payment form that you build.\nWhen you make the payment request, you include additional information about the items that the shopper intends to purchase.\n\nBuild your payment form\nInclude BACS Direct Debit in the list of available payment methods.\n\nYou can download the logo for BACS Direct Debit to use in your form.\n\nGet BACS Direct Debit as an available payment method\nWhen you make the  \/paymentMethods to get available payment methods, specify the following so that BACS Direct Debit is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nGB\n\n\n amount.currency\nGBP\n\n\n\n\n    \n\n\n    \n\nAdd additional parameters to your \/payments request\nWhen you make a payment, add the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n shopperEmail\n\nThe email of the shopper.\n\n\n paymentMethod.type\n\nSet to directdebit_GB.\n\n\n paymentMethod.holderName\n\nThe bank account holder's name.\n\n\n paymentMethod.bankAccountNumber\n\nThe bank account holder's bank account number.\n\n\n paymentMethod.bankLocationId\n\nThe bank routing number of the account.\n\n\n\n\n    \n\nThe response includes the action.type: Direct.\n\n    \n\nRecurring payments\nIf you have a recurring or subscription business model, we recommend tokenizing the shopper's payment details. When you create a shopper token from a BACS Direct Debit payment, we store the shopper's payment details with the token. You can use this token to make recurring BACS Direct Debit payments.\nYou need to use the  \/payments endpoint to make recurring payments with the token.\n\nWe strongly recommend that you request explicit permission from the shopper if you intend to make recurring BACS Direct Debit payments. Being transparent about the payment schedule and the amount they will be charged will reduce the risk of chargebacks.\nUnder the Direct Debit Guarantee, if there is a change in the collection date or the amount, you must give the shopper advance notice of the payment.\n\nCreate shopper token\nTokenize the shopper's payment details when you make the initial BACS Direct Debit payment.\n\nWhen you make a POST request to  \/payments to make a payment, additionally include:\n\n\nshopperReference: Your unique ID for this shopper.\npaymentMethod.storePaymentMethod: true.\n\n\nWhen you receive the  recurring.token.created, store the storedPaymentMethodId. This is the token you will need to make recurring payments for this shopper.\n\nMake recurring payments\n\nWe strongly recommend giving shoppers advance notice before each payment.\n\nFor each recurring payment for this shopper, make a BACS Direct Debit payment with a POST request to the  \/payments endpoint, and additionally include:\n\npaymentMethod.recurringDetailReference or paymentMethod.storedPaymentMethodIdfor API v49 and above. This is the storedPaymentMethodId returned in the  recurring.token.created webhook when you created the token.\nshopperReference: the unique shopper ID you used to create the shopper token.\nshopperInteraction: ContAuth.\n\n{\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"reference\":\"BACS test payment\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"shopperInteraction\":\"ContAuth\",\n   \"amount\":{\n      \"currency\":\"GBP\",\n      \"value\":49900\n   },\n   \"paymentMethod\":{\n      \"type\":\"directdebit_GB\",\n      \"storedPaymentMethodId\":\"7219687191761347\"\n   },\n   \"countryCode\":\"GB\",\n   \"shopperLocale\":\"gb-GB\",\n   \"returnUrl\":\"https:\/\/your-company.com\/checkout?shopperOrder=12xy..\"\n}\nIf the payment was successfully received the response will contain the resultCode Received and a pspReference, which is our unique identifier for this transaction. You can track whether the payment was successful using webhooks.\nTest and go live\nBefore accepting live BACS Direct Debit payments, test your integration using the following details:\n\n\n\nAccount Name\nAccount Number\nSort Code\n\n\n\n\nDavid Archer\n09083055\n560036\n\n\n\nCheck the status of BACS Direct Debit test payments in your Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\n \nBefore you can accept live BACS Direct Debit payments, you need to submit a request for BACS Direct Debit in your live Customer Area.\nSee also\n\n\n                    API-only integration guide\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"BACS Direct Debit","lvl3":"BACS Direct Debit for API only"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/bacs","lvl3":"\/pt\/payment-methods\/bacs\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["Direct","Debit"]},"articleFiles":{"payment-methods-request.js":"<p alt=\"\">payment-methods-request.js<\/p>","payment-methods-response.json":"<p alt=\"\">payment-methods-response.json<\/p>","payments-request.js":"<p alt=\"\">payments-request.js<\/p>","payments-response.json":"<p alt=\"\">payments-response.json<\/p>"}}
