{"title":"Pay by Bank (US) for API only","category":"default","creationDate":1567783140,"content":"<p>Accept Pay by Bank (US) payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.<\/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 built your <a href=\"\/pt\/online-payments\/build-your-integration\">API-only integration<\/a>.<\/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, contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to add Pay by Bank (US) in your Customer Area.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Build your payment form<\/h2>\n<ol>\n<li>\n<p>In your POST  <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> request, use:<\/p>\n<ul>\n<li><code>currency<\/code>: <span translate=\"no\"><strong>USD<\/strong><\/span><\/li>\n<li><code>countryCode<\/code>: <span translate=\"no\"><strong>US<\/strong><\/span><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>When you receive the <code>\/paymentMethods<\/code> response, note the object for Pay by Bank (US):<\/p>\n<ul>\n<li><code>name<\/code>: <span translate=\"no\"><strong>Pay by Bank<\/strong><\/span>. Use this to show the payment method in your payment form.<\/li>\n<li><code>type<\/code>: <span translate=\"no\"><strong>paybybank_AIS_DD<\/strong><\/span>. Use this in your payment request as the <code>paymentMethod.type<\/code>.<\/li>\n<\/ul>\n<p>There is no list of issuing banks that you can show in your payment form.<\/p>\n<\/li>\n<li>\n<p>Make sure that when shoppers select <span translate=\"no\"><strong>Pay by Bank<\/strong><\/span>, you obtain their authorization to debit their bank account. ACH rules require that. We recommend showing the following text:<\/p>\n<blockquote>\n<p><em>By connecting your bank account you are authorizing debits to your account for any amount owed for the use of our services and\/or purchase of our products, until you revoke this authorization.<\/em><\/p>\n<\/blockquote>\n<\/li>\n<\/ol>\n<h2 id=\"make-payment\">Make a payment<\/h2>\n<ol>\n<li>\n<p>Make a  <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> request, specifying:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>paymentMethod.type<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\"><span translate=\"no\"><strong>paybybank_AIS_DD<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>returnUrl<\/code><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">URL to where the shopper should be redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>countryCode<\/code><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">The shopper's country\/region. <br>Format: the two-letter <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO-3166-1 alpha-2<\/a> country code. Exception: <strong>QZ<\/strong> (Kosovo). This determines the banks that our partner shows to the shopper. Currently, only <span translate=\"no\"><strong>US<\/strong><\/span> is supported. This is also the default if you do not include this parameter. <br> The <code>countryCode<\/code> is not required, but we recommend implementing it because of future enhancements that will allow Pay by Bank (US) payments through non-US banks.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'open-banking-us-payment'\" :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 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;amount\\&quot;:{\\n      \\&quot;currency\\&quot;:\\&quot;USD\\&quot;,\\n      \\&quot;value\\&quot;:1000\\n   },\\n   \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n   \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;paybybank_AIS_DD\\&quot;\\n   },\\n   \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n   \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.1.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object\\nconst paymentRequest = {\\n  amount: {\\n    currency: \\&quot;USD\\&quot;,\\n    value: 1000\\n  },\\n  countryCode: \\&quot;US\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;paybybank_AIS_DD\\&quot;\\n  },\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  returnUrl: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Make the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.0.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\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paybybank_AIS_DD\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\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 v9.1.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\\nrequest_body = {\\n  :amount =&gt; {\\n    :currency =&gt; 'USD',\\n    :value =&gt; 1000\\n  },\\n  :countryCode =&gt; 'US',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'paybybank_AIS_DD'\\n  },\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :returnUrl =&gt; 'https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..'\\n}\\n\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In 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> response, check the <code>action<\/code> object for the information that you must use to redirect the shopper.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\":\\\"RedirectShopper\\\",\\n  \\\"action\\\":{\\n    \\\"paymentMethodType\\\":\\\"paybybank_AIS_DD\\\",\\n    \\\"method\\\":\\\"GET\\\",\\n    \\\"url\\\":\\\"https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/checkoutPaymentRedirect?redirectData=...\\\",\\n    \\\"type\\\":\\\"redirect\\\"\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Handle the redirect<\/h2>\n<ol>\n<li>\n<p>To complete the payment, redirect the shopper to the <code>action.url<\/code> returned in 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> response, taking into account the following recommendations:<\/p>\n<ul>\n<li>\n<p><strong>When using the HTTP GET method:<\/strong><br \/>\nFor security reasons, when showing the redirect in the app, we recommend that you use <a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">SFSafariViewController<\/a> for iOS or <a href=\"https:\/\/developer.chrome.com\/multidevice\/android\/customtabs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Chrome Custom Tabs<\/a> for Android, instead of WebView objects. Also refer to the <a href=\"https:\/\/developer.android.com\/topic\/security\/best-practices#webview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">security best practices<\/a> for WebView.<\/p>\n<\/li>\n<li>\n<p><strong>Redirection for mobile integrations:<\/strong><br \/>\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>After the shopper is redirected back to your website, check the payment result by making a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request, specifying:<\/p>\n<ul>\n<li><code>details<\/code>: object that contains the URL-decoded <code>redirectResult<\/code> returned when the shopper was redirected back to your site.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details request'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/details \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;details\\&quot;: {\\n      \\&quot;redirectResult\\&quot;: \\&quot;eyJ0cmFuc1N0YXR1cyI6IlkifQ==\\&quot;\\n   }\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the response note the following:<\/p>\n<ul>\n<li><code>resultCode<\/code>: use this to present the result to your shopper.<\/li>\n<li><code>pspReference<\/code>: our unique identifier for the transaction.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"resultCode\\\": \\\"Authorised\\\",\\n   \\\"pspReference\\\": \\\"V4HZ4RBFJGXXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Present the payment result<\/h2>\n<p>Use the\u00a0 <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details#responses-200-resultCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">resultCode<\/a> that you received in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response\u00a0to present the payment result to your shopper.<\/p>\n<p> <\/p>\n<p>The <code>resultCode<\/code> values you can receive for Pay by Bank (US) are:<\/p>\n<table>\n<thead>\n<tr>\n<th>resultCode<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Authorised<\/strong><\/td>\n<td>The payment was successful.<\/td>\n<td>Inform the shopper that the payment has been successful. <br> You will receive the funds in 2-3 days.<\/td>\n<\/tr>\n<tr>\n<td><strong>Cancelled<\/strong><\/td>\n<td>The shopper cancelled the payment while on their bank's website.<\/td>\n<td>Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>There was an error while the payment was processed.<\/td>\n<td>Inform the shopper that there was an error processing their payment. The response contains a <code>refusalReason<\/code>, indicating the cause of the error.<\/td>\n<\/tr>\n<tr>\n<td><strong>Pending<\/strong> or <br> <strong>Received<\/strong><\/td>\n<td>The shopper has completed the payment but the final result is not yet known. It may take minutes or hours to confirm this.<\/td>\n<td>Inform the shopper that you received their order, and are waiting for the payment to be completed. <br> You will receive the final result of the payment in an <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\">AUTHORISATION webhook<\/a>. If the transaction is not authorised within 30 minutes, the offer will close. Optionally, you can be informed of this through an  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/OFFER_CLOSED\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OFFER_CLOSED webhook<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Refused<\/strong><\/td>\n<td>The payment was refused for risk reasons.<\/td>\n<td>See the <a href=\"https:\/\/docs.adyen.com\/development-resources\/raw-acquirer-responses\/#pay-by-bank-us-raw-responses\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Pay by Bank (US) raw responses<\/a> for more information about risk-related refusals and how to handle them.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"webhooks\"><\/a> If the shopper closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment:<\/p>\n<table>\n<thead>\n<tr>\n<th>eventCode<\/th>\n<th>success field<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>false<\/strong><\/td>\n<td>The payment failed.<\/td>\n<td>Cancel the order and inform the shopper that the payment failed.<\/td>\n<\/tr>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>true<\/strong><\/td>\n<td>The shopper successfully completed the payment.<\/td>\n<td>Inform the shopper that the payment has been successful and proceed with the order.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Capture<\/h2>\n<p>We strongly recommend capturing Pay by Bank (US) payments immediately, to reduce the risk of insufficient funds at the time of capture. <\/p>\n<p>Through our partner Plaid, Adyen completes the checks on the shopper's bank account, including a balance check and risk checks, at the time of authorization. However, the issuing bank does not hold the authorized funds and thus it is possible that the account balance is no longer sufficient by the time you capture the payment. For that reason, you should capture Pay by Bank (US) payments as soon as possible.<\/p>\n<p>However, even with immediate capture there is still a risk of insufficient funds at the time of capture, because capturing is an asynchronous process on the ACH Direct Debit network.<\/p>\n<h2 id=\"recurring-payments\">Recurring payments<\/h2>\n<p>Pay by Bank (US) supports <a href=\"\/pt\/online-payments\/tokenization\">tokenization<\/a> for recurring transactions.<\/p>\n<div class=\"notices red\">\n<p>We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.<\/p>\n<\/div>\n<p>To make recurring payments:<\/p>\n<ol>\n<li>\n<p>Create a token through the initial Pay by Bank (US) transaction for the shopper, specifying:<\/p>\n<ul>\n<li>The <a href=\"\/pt\/online-payments\/tokenization\/create-tokens\">tokenization parameters<\/a>.<\/li>\n<li><code>paymentMethod.type<\/code>: <strong>paybybank_AIS_DD<\/strong><\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'open-banking-us-token'\" :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 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;amount\\&quot;:{\\n      \\&quot;currency\\&quot;:\\&quot;USD\\&quot;,\\n      \\&quot;value\\&quot;:1000\\n    },\\n    \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n    \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;paybybank_AIS_DD\\&quot;\\n    },\\n    \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;storePaymentMethod\\&quot;: \\&quot;true\\&quot;,\\n    \\&quot;shopperInteraction\\&quot;: \\&quot;Ecommerce\\&quot;,\\n    \\&quot;shopperReference\\&quot;:\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n    \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n    \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n    \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.1.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object\\nconst paymentRequest = {\\n  amount: {\\n    currency: \\&quot;USD\\&quot;,\\n    value: 1000\\n  },\\n  countryCode: \\&quot;US\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;paybybank_AIS_DD\\&quot;\\n  },\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  storePaymentMethod: \\&quot;true\\&quot;,\\n  shopperInteraction: \\&quot;Ecommerce\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  recurringProcessingModel: \\&quot;Subscription\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  returnUrl: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Make the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.0.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\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paybybank_AIS_DD\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;storePaymentMethod\\&quot;: \\&quot;True\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;Ecommerce\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\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 v9.1.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\\nrequest_body = {\\n  :amount =&gt; {\\n    :currency =&gt; 'USD',\\n    :value =&gt; 1000\\n  },\\n  :countryCode =&gt; 'US',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'paybybank_AIS_DD'\\n  },\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :storePaymentMethod =&gt; 'true',\\n  :shopperInteraction =&gt; 'Ecommerce',\\n  :shopperReference =&gt; 'YOUR_SHOPPER_REFERENCE',\\n  :recurringProcessingModel =&gt; 'Subscription',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :returnUrl =&gt; 'https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..'\\n}\\n\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Get the shopper's token from the payment response or 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.<br \/>\nFor example: <code>additionalData.tokenization.storedPaymentMethodId<\/code>: <strong>M5N7TQ4TG5PFWR50<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Use the token in later Pay by Bank (US) payments for the shopper, specifying:<\/p>\n<ul>\n<li>The <a href=\"\/pt\/online-payments\/tokenization\/make-token-payments\">tokenization parameters<\/a>.<\/li>\n<li><code>paymentMethod.type<\/code>: <strong>paybybank_AIS_DD<\/strong><\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'open-banking-us-recurring'\" :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 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;amount\\&quot;:{\\n      \\&quot;value\\&quot;:1000,\\n      \\&quot;currency\\&quot;:\\&quot;USD\\&quot;\\n   },\\n   \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n   \\&quot;paymentMethod\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;paybybank_AIS_DD\\&quot;,\\n      \\&quot;storedPaymentMethodId\\&quot;:\\&quot;M5N7TQ4TG5PFWR50\\&quot;\\n   },\\n   \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n   \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;shopperReference\\&quot;:\\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n   \\&quot;shopperInteraction\\&quot;:\\&quot;ContAuth\\&quot;,\\n   \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.1.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object\\nconst paymentRequest = {\\n  amount: {\\n    value: 1000,\\n    currency: \\&quot;USD\\&quot;\\n  },\\n  paymentMethod: {\\n    type: \\&quot;paybybank_AIS_DD\\&quot;,\\n    storedPaymentMethodId: \\&quot;M5N7TQ4TG5PFWR50\\&quot;\\n  },\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  shopperReference: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  shopperInteraction: \\&quot;ContAuth\\&quot;,\\n  recurringProcessingModel: \\&quot;Subscription\\&quot;\\n}\\n\\n\\\/\\\/ Make the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.0.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\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 1000,\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;\\n  },\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paybybank_AIS_DD\\&quot;,\\n    \\&quot;storedPaymentMethodId\\&quot;: \\&quot;7219687191761347\\&quot;\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;ContAuth\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;Subscription\\&quot;\\n}\\n\\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 v9.1.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\\nrequest_body = {\\n  :amount =&gt; {\\n    :value =&gt; 1000,\\n    :currency =&gt; 'USD'\\n  },\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'paybybank_AIS_DD',\\n    :storedPaymentMethodId =&gt; '7219687191761347'\\n  },\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :shopperReference =&gt; 'YOUR_SHOPPER_REFERENCE',\\n  :shopperInteraction =&gt; 'ContAuth',\\n  :recurringProcessingModel =&gt; 'Subscription'\\n}\\n\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>You can test the payment flow as well as the chargeback flow.<\/p>\n<p>To go live, you need to await registration with our partner Plaid.<\/p>\n<h3>Test the payment flow<\/h3>\n<p>In the test environment, the redirect flow mimics the live flow, but not all refusal reasons can be simulated.<\/p>\n<p>To test the payment flow, you can either include a specific amount in your payment request to test a specific scenario, or you can specify <strong>custom_balances<\/strong> as your username when you are redirected to confirm the payment.<\/p>\n<p>These are the scenarios you can test:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Scenario<\/th>\n<th style=\"text-align: left;\">Username<\/th>\n<th style=\"text-align: left;\">Amount<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Approved<\/td>\n<td style=\"text-align: left;\">Not required, but you can use <strong>custom_chase<\/strong>, <strong>custom_boa<\/strong>, <strong>custom_citi<\/strong>, or <strong>custom_wellsfargo<\/strong> to test different bank accounts.<\/td>\n<td style=\"text-align: left;\">USD&nbsp;3.53<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Refused with refusal reason <strong>Failed: Risk of unauthorized returns<\/strong><\/td>\n<td style=\"text-align: left;\">Not required, but you can use <strong>custom_chase<\/strong>, <strong>custom_boa<\/strong>, <strong>custom_citi<\/strong>, or <strong>custom_wellsfargo<\/strong> to test different bank accounts.<\/td>\n<td style=\"text-align: left;\">USD&nbsp;27.53<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Test custom transaction amounts with different account balances, such as high value transactions or refusals due to an insufficient balance.<\/td>\n<td style=\"text-align: left;\"><strong>custom_balances<\/strong><\/td>\n<td style=\"text-align: left;\">Any USD amount<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Entering a username is not required to test the payment flow. Tests without a username all use the same bank account from CITIZENS BANK. The <strong>custom_balances<\/strong> username allows you to select from several bank accounts with different balances. For example, if you want to test high value transactions, you can use the <strong>custom_balances<\/strong> username and select a bank account with a high balance.<\/p>\n<ol>\n<li>\n<p>Make a test Pay by Bank (US) payment using an amount from the table with scenarios or your own amount.<\/p>\n<\/li>\n<li>\n<p>When you are redirected to <strong>First Platypus Bank<\/strong>, depending on your test scenario, either enter a username or leave this field blank.<\/p>\n<\/li>\n<li>\n<p>Leave the password blank and select <strong>Continue<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Check the status of test payments in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a> \u00a0&gt;\u00a0<strong>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<\/li>\n<\/ol>\n<h3>Test the chargeback flow<\/h3>\n<p>The chargeback mechanism for <a href=\"\/pt\/payment-methods\/pay-by-bank-us#chargebacks\">Pay by Bank (US) chargebacks<\/a> relies on the ACH Direct Debit network. You can simulate a Pay by Bank (US) chargeback by providing a username that indicates the chargeback scenario you want to test. In the test environment, the flow goes directly to the Chargeback stage.<\/p>\n<ol>\n<li>\n<p>Send a test Pay by Bank (US) payment request.<\/p>\n<\/li>\n<li>\n<p>When redirected to <strong>First Platypus Bank<\/strong>, specify the following username:<\/p>\n<ul>\n<li>\n<p><strong>custom_chargeback_rXX<\/strong> where <strong>XX<\/strong> is the dispute reason code without the leading <strong>R<\/strong>.<br \/>\nYou can use any of the <a href=\"\/pt\/risk-management\/understanding-disputes\/dispute-reason-codes\/#ach-direct-debit\">ACH Direct Debit reason codes<\/a>.<\/p>\n<p>Example: the username <strong>custom_chargeback_r01<\/strong> triggers a chargeback with reason code R01 for <em>Insufficient Funds<\/em>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Leave the password blank and select <strong>Continue<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Note that the request succeeds with <code>resultCode<\/code>: <strong>Authorised<\/strong>.<br \/>\nThe chargeback flow starts after the test payment is captured and settled.<\/p>\n<\/li>\n<li>\n<p>Wait for the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/CHARGEBACK\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CHARGEBACK<\/a> webhook and check your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a> &gt; <strong>Revenue &amp; risk<\/strong> &gt; <strong>Disputes<\/strong>.<br \/>\nThe webhook and your Customer Area show a chargeback with the return reason code that you specified in the test payment request.<\/p>\n<\/li>\n<\/ol>\n<h3>Go live<\/h3>\n<p>To go live, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\/\">add Pay by Bank (US) in your live Customer Area<\/a>. Our <a href=\"\/pt\/payment-methods\/pay-by-bank-us#plaid-partner\">partner Plaid<\/a> then registers your merchant account with participating banks, including some of the largest banks in the US. The registration takes up to one business week from the moment Plaid has started the process. During this time, your shoppers cannot connect their bank account to Plaid. For this reason, you cannot accept live Pay by Bank (US) payments until the registration process is completed.<\/p>\n<p>We send you a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/ManagementNotification\/latest\/post\/paymentMethod.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.created<\/a> webhook when you can start accepting live Pay by Bank (US) payments.<\/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><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"\/online-payments\/tokenization\"\n                        target=\"_self\"\n                        >\n                    Tokenization for recurring payments\n                <\/a><\/li><li><a href=\"\/risk-management\/chargeback-guidelines\/ach-chargebacks\"\n                        target=\"_self\"\n                        >\n                    ACH Direct Debit chargebacks\n                <\/a><\/li><li><a href=\"\/development-resources\/raw-acquirer-responses#pay-by-bank-us-raw-responses\"\n                        target=\"_self\"\n                        >\n                    Pay by Bank (US) raw refusal responses\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/pay-by-bank-us\/api-only","articleFields":{"description":"Add Pay by Bank (US) to an existing API-only integration.","parameters":{"integration":"API-only","platform":"Web","integration_guide_url":"build-your-integration\/advanced-flow?platform=Web&integration=API%20only","payment_method_type":"paybybank_AIS_DD","return_url":"https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..","currency":"USD","country_code":"US","shopper_locale":"en-US","payment_method":"Pay by Bank (US)"},"feedback_component":true,"filters_component":false},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/pay-by-bank-us\/api-only","title":"Pay by Bank (US) for API only","content":"Accept Pay by Bank (US) payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built your API-only integration.\n\n\nSetup steps\nBefore you begin, contact our Support Team to add Pay by Bank (US) in your Customer Area.\n\n\n\nBuild your payment form\n\n\nIn your POST  \/paymentMethods request, use:\n\ncurrency: USD\ncountryCode: US\n\n\n\nWhen you receive the \/paymentMethods response, note the object for Pay by Bank (US):\n\nname: Pay by Bank. Use this to show the payment method in your payment form.\ntype: paybybank_AIS_DD. Use this in your payment request as the paymentMethod.type.\n\nThere is no list of issuing banks that you can show in your payment form.\n\n\nMake sure that when shoppers select Pay by Bank, you obtain their authorization to debit their bank account. ACH rules require that. We recommend showing the following text:\n\nBy connecting your bank account you are authorizing debits to your account for any amount owed for the use of our services and\/or purchase of our products, until you revoke this authorization.\n\n\n\nMake a payment\n\n\nMake a  \/payments request, specifying:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\npaymentMethod.type\n\npaybybank_AIS_DD\n\n\nreturnUrl\n\nURL to where the shopper should be redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.\n\n\ncountryCode\n\nThe shopper's country\/region. Format: the two-letter ISO-3166-1 alpha-2 country code. Exception: QZ (Kosovo). This determines the banks that our partner shows to the shopper. Currently, only US is supported. This is also the default if you do not include this parameter.  The countryCode is not required, but we recommend implementing it because of future enhancements that will allow Pay by Bank (US) payments through non-US banks.\n\n\n\n\n\n\n\n\nIn the  \/payments response, check the action object for the information that you must use to redirect the shopper.\n\n\n\n\n\nHandle the redirect\n\n\nTo complete the payment, redirect the shopper to the action.url returned in the  \/payments response, taking into account the following recommendations:\n\n\nWhen using the HTTP GET method:\nFor security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.\n\n\nRedirection for mobile integrations:\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.\n\n\n\n\nAfter the shopper is redirected back to your website, check the payment result by making a POST  \/payments\/details request, specifying:\n\ndetails: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.\n\n\n\n\n\n\nIn the response note the following:\n\nresultCode: use this to present the result to your shopper.\npspReference: our unique identifier for the transaction.\n\n\n\n\n\n\nPresent the payment result\nUse the\u00a0 resultCode that you received in the  \/payments\/details response\u00a0to present the payment result to your shopper.\n \nThe resultCode values you can receive for Pay by Bank (US) are:\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthorised\nThe payment was successful.\nInform the shopper that the payment has been successful.  You will receive the funds in 2-3 days.\n\n\nCancelled\nThe shopper cancelled the payment while on their bank's website.\nAsk the shopper whether they want to continue with the order, or ask them to select a different payment method.\n\n\nError\nThere was an error while the payment was processed.\nInform the shopper that there was an error processing their payment. The response contains a refusalReason, indicating the cause of the error.\n\n\nPending or  Received\nThe shopper has completed the payment but the final result is not yet known. It may take minutes or hours to confirm this.\nInform the shopper that you received their order, and are waiting for the payment to be completed.  You will receive the final result of the payment in an AUTHORISATION webhook. If the transaction is not authorised within 30 minutes, the offer will close. Optionally, you can be informed of this through an  OFFER_CLOSED webhook.\n\n\nRefused\nThe payment was refused for risk reasons.\nSee the Pay by Bank (US) raw responses for more information about risk-related refusals and how to handle them.\n\n\n\n If the shopper closed the browser and failed to return to your website, wait for webhooks to know the outcome of the payment:\n\n\n\neventCode\nsuccess field\nDescription\nAction to take\n\n\n\n\nAUTHORISATION\nfalse\nThe payment failed.\nCancel the order and inform the shopper that the payment failed.\n\n\nAUTHORISATION\ntrue\nThe shopper successfully completed the payment.\nInform the shopper that the payment has been successful and proceed with the order.\n\n\n\nCapture\nWe strongly recommend capturing Pay by Bank (US) payments immediately, to reduce the risk of insufficient funds at the time of capture. \nThrough our partner Plaid, Adyen completes the checks on the shopper's bank account, including a balance check and risk checks, at the time of authorization. However, the issuing bank does not hold the authorized funds and thus it is possible that the account balance is no longer sufficient by the time you capture the payment. For that reason, you should capture Pay by Bank (US) payments as soon as possible.\nHowever, even with immediate capture there is still a risk of insufficient funds at the time of capture, because capturing is an asynchronous process on the ACH Direct Debit network.\nRecurring payments\nPay by Bank (US) supports tokenization for recurring transactions.\n\nWe strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.\n\nTo make recurring payments:\n\n\nCreate a token through the initial Pay by Bank (US) transaction for the shopper, specifying:\n\nThe tokenization parameters.\npaymentMethod.type: paybybank_AIS_DD\n\n\n\n\n\n\nGet the shopper's token from the payment response or the  recurring.token.created webhook.\nFor example: additionalData.tokenization.storedPaymentMethodId: M5N7TQ4TG5PFWR50.\n\n\nUse the token in later Pay by Bank (US) payments for the shopper, specifying:\n\nThe tokenization parameters.\npaymentMethod.type: paybybank_AIS_DD\n\n\n\n\n\n\nTest and go live\nYou can test the payment flow as well as the chargeback flow.\nTo go live, you need to await registration with our partner Plaid.\nTest the payment flow\nIn the test environment, the redirect flow mimics the live flow, but not all refusal reasons can be simulated.\nTo test the payment flow, you can either include a specific amount in your payment request to test a specific scenario, or you can specify custom_balances as your username when you are redirected to confirm the payment.\nThese are the scenarios you can test:\n\n\n\nScenario\nUsername\nAmount\n\n\n\n\nApproved\nNot required, but you can use custom_chase, custom_boa, custom_citi, or custom_wellsfargo to test different bank accounts.\nUSD&nbsp;3.53\n\n\nRefused with refusal reason Failed: Risk of unauthorized returns\nNot required, but you can use custom_chase, custom_boa, custom_citi, or custom_wellsfargo to test different bank accounts.\nUSD&nbsp;27.53\n\n\nTest custom transaction amounts with different account balances, such as high value transactions or refusals due to an insufficient balance.\ncustom_balances\nAny USD amount\n\n\n\nEntering a username is not required to test the payment flow. Tests without a username all use the same bank account from CITIZENS BANK. The custom_balances username allows you to select from several bank accounts with different balances. For example, if you want to test high value transactions, you can use the custom_balances username and select a bank account with a high balance.\n\n\nMake a test Pay by Bank (US) payment using an amount from the table with scenarios or your own amount.\n\n\nWhen you are redirected to First Platypus Bank, depending on your test scenario, either enter a username or leave this field blank.\n\n\nLeave the password blank and select Continue.\n\n\nCheck the status of test payments in your test Customer Area \u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\n\n\nTest the chargeback flow\nThe chargeback mechanism for Pay by Bank (US) chargebacks relies on the ACH Direct Debit network. You can simulate a Pay by Bank (US) chargeback by providing a username that indicates the chargeback scenario you want to test. In the test environment, the flow goes directly to the Chargeback stage.\n\n\nSend a test Pay by Bank (US) payment request.\n\n\nWhen redirected to First Platypus Bank, specify the following username:\n\n\ncustom_chargeback_rXX where XX is the dispute reason code without the leading R.\nYou can use any of the ACH Direct Debit reason codes.\nExample: the username custom_chargeback_r01 triggers a chargeback with reason code R01 for Insufficient Funds.\n\n\n\n\nLeave the password blank and select Continue.\n\n\nNote that the request succeeds with resultCode: Authorised.\nThe chargeback flow starts after the test payment is captured and settled.\n\n\nWait for the  CHARGEBACK webhook and check your test Customer Area &gt; Revenue &amp; risk &gt; Disputes.\nThe webhook and your Customer Area show a chargeback with the return reason code that you specified in the test payment request.\n\n\nGo live\nTo go live, you need to add Pay by Bank (US) in your live Customer Area. Our partner Plaid then registers your merchant account with participating banks, including some of the largest banks in the US. The registration takes up to one business week from the moment Plaid has started the process. During this time, your shoppers cannot connect their bank account to Plaid. For this reason, you cannot accept live Pay by Bank (US) payments until the registration process is completed.\nWe send you a  paymentMethod.created webhook when you can start accepting live Pay by Bank (US) payments.\nSee also\n\n\n                    API-only integration guide\n                \n                    Webhooks\n                \n                    Tokenization for recurring payments\n                \n                    ACH Direct Debit chargebacks\n                \n                    Pay by Bank (US) raw refusal responses\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Pay by Bank (US)","lvl3":"Pay by Bank (US) 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\/pay-by-bank-us","lvl3":"\/pt\/payment-methods\/pay-by-bank-us\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":[]},"articleFiles":{"open-banking-us-payment.js":"<p alt=\"\">open-banking-us-payment.js<\/p>","open-banking-us-recurring.js":"<p alt=\"\">open-banking-us-recurring.js<\/p>","open-banking-us-token.js":"<p alt=\"\">open-banking-us-token.js<\/p>"}}
