---
title: "ACH Direct Debit for API only"
description: "Add ACH Direct Debit to your API-only integration."
url: "https://docs.adyen.com/payment-methods/ach-direct-debit/api-only"
source_url: "https://docs.adyen.com/payment-methods/ach-direct-debit/api-only.md"
canonical: "https://docs.adyen.com/payment-methods/ach-direct-debit/api-only"
last_modified: "2026-06-01T15:33:15+02:00"
language: "en"
---

# ACH Direct Debit for API only

Add ACH Direct Debit to your API-only integration.

[View source](/payment-methods/ach-direct-debit/api-only.md)

You can add ACH Direct Debit to your existing integration. The following instructions show only what you must add to your integration specifically for ACH Direct Debit.

If an instruction on this page corresponds with a step in the main integration guide, it includes a link to that corresponding step of the main integration guide.

## Requirements

| Requirement                                                    | Description                                                                                                                                                                                                                                         |   |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| **Integration type**                                           | Make sure that you have an existing [API-only integration](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only). This page includes only instructions to add ACH Direct Debit to your existing integration. |   |
| **[API credentials](/development-resources/api-credentials/)** | To issue a refund using an API request, make sure you have the **Merchant allow bank-refund** role.                                                                                                                                                 |   |
| **[Customer Area roles](/account/user-roles)**                 | To issue a refund using the Customer Area, make sure you have the **Merchant allow bank-refund** role.                                                                                                                                              |   |
| **Webhooks**                                                   | Subscribe to [DIRECT\_DEBIT\_NOTICE\_OF\_CHANGE\_NOTIFICATION](https://docs.adyen.com/api-explorer/Webhooks/latest/post/DIRECT_DEBIT_NOTICE_OF_CHANGE_NOTIFICATION) webhooks to receive a notification when a shopper has outdated banking details. |   |
| **Setup steps**                                                | Before you begin, [add ACH Direct Debit in your Customer Area](/payment-methods/add-payment-methods).                                                                                                                                               |   |

## Get ACH Direct Debit as an available payment method

When you make the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) call to [get available payment methods](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#get-available-payment-methods), specify the following so that ACH Direct Debit is included in the response.

| Parameter                                                                                                          | Values             |
| ------------------------------------------------------------------------------------------------------------------ | ------------------ |
| [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode)         | ****US**, **PR**** |
| [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | ****USD****        |

## Build your payment form

We provide the logo for ACH Direct Debit that [you can download](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#downloading-logos).

When a customer chooses to pay with ACH Direct Debit, collect the following payment details in your payment form and use these to get a [mandate from the customer](/payment-methods/ach-direct-debit#mandate):

| Payment details                         | Example                                                                                                                                                                                                                                                                                                                              |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Bank account number                     | The US bank account number from which the payment will be debited. Format: numeric. Minimum length: 4 Maximum length: 17 Example: `01234567890123`                                                                                                                                                                                   |
| Bank routing number                     | The 9-digit ACH routing number of the account.Alert your customers that some banks have different routing numbers for different transfers. Customers should not provide their wire transfer routing number. Do not remove any leading zeros. Adyen performs validation to ensure the routing number is genuine. Example: `123456789` |
| [Bank account type](#bank-account-type) | **checking** or **savings**                                                                                                                                                                                                                                                                                                          |
| Account holder name                     | "John Smith"                                                                                                                                                                                                                                                                                                                         |
| Account holder address                  | A valid US address (optional field).                                                                                                                                                                                                                                                                                                 |
| Type of account holder                  | **personal** or **business**                                                                                                                                                                                                                                                                                                         |

### Bank account type

Customers can use both checking accounts and savings accounts to make ACH payments. If you do not provide the `bankAccountType` in your payment request, this defaults to **checking** account. In cases where the account type defaulted to checking account while the customer provided the account number of a savings account, this mismatch will lead to a chargeback.

To avoid chargebacks, we recommend collecting the bank account type from the customer, and providing it in your payment request.

### SEC code

Nacha requires a [Standard Entry Class (SEC) code](/payment-methods/ach-direct-debit#sec-code) for ACH payments. If you do not provide the correct SEC code, you risk chargebacks and potential fines.

Collect the account holder type (**personal** or **business**) from the customer and provide the appropriate SEC code in your payment request. There are a few ways you can specify an SEC code:

* Send the SEC code in your ACH Direct Debit payment request using the `additionalData.ach.secCode` field.

* Send the field `paymentmethod.accountHolderType` in your payment request.

  * If the value is **business**, we use **CCD**.
  * If it is **personal**, we use **WEB**.

* Ask our Support Team to configure a default SEC code for all your ACH Direct Debit payments.

If you do not provide an SEC code, we try to select the correct code based on the account holder's name. If we cannot make a confident guess, we default to **WEB**.

## Add additional parameters to your /payments request

When you [make a payment](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#make-a-payment), add the following parameters:

| Parameter                                                                                                                                                                                                                                                                                                                            | Required                                                                                    | Description                                                                                                                                                                                                                                                            |   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| [paymentMethod.type](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-type)                                                                                                                                                                                                        | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **ach**                                                                                                                                                                                                                                                                |   |
| [paymentMethod.bankAccountNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-bankAccountNumber) or [paymentMethod.encryptedBankAccountNumber](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-encryptedBankAccountNumber) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The customer's bank account number.                                                                                                                                                                                                                                    |   |
| [paymentMethod.bankAccountType](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-bankAccountType)                                                                                                                                                                                  |                                                                                             | The [type of bank account](#bank-account-type). Allowed values: **checking**, **savings**.                                                                                                                                                                             |   |
| [paymentMethod.bankLocationId](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-bankLocationId) or [paymentMethod.encryptedBankLocationId](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-encryptedBankLocationId)             | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The ACH routing number of the account.                                                                                                                                                                                                                                 |   |
| [paymentMethod.ownerName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-ownerName)                                                                                                                                                                                              | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The name on the bank account.                                                                                                                                                                                                                                          |   |
| `additionalData.ach.secCode`                                                                                                                                                                                                                                                                                                         |                                                                                             | The [SEC code](/payment-methods/ach-direct-debit#sec-code) to use for the payment. Possible values: **CDD** (for B2B transactions), **PPD** (for personal transactions with written authorization), or **WEB** (for personal transactions with digital authorization). |   |
| [paymentMethod.accountHolderType](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod-AchDetails-accountHolderType)                                                                                                                                                                              |                                                                                             | The type of account holder (**personal** or **business**). If you are not using `additionalData.ach.secCode`, use this field to determine the SEC code.                                                                                                                |   |

**Make a payment request**

#### curl

```bash
curl https://checkout-test.adyen.com/v72/payments \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X POST
-d '{
  "amount":{
    "currency":"USD",
    "value":1000
  },
  "reference":"YOUR_ORDER_NUMBER",
  "paymentMethod": {
    "type":"ach",
    "encryptedBankAccountNumber": "adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hn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OkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ=",
    "ownerName": "John Smith",
    "bankAccountType":"checking"
  },
  "returnUrl":"https://your-company.example.com/checkout?shopperOrder=12xy..",
  "merchantAccount":"ADYEN_MERCHANT_ACCOUNT",
}'
```

#### Java

```java
// Adyen Java API Library v38.1.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.checkout.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.model.RequestOptions;
import com.adyen.service.checkout.*;

// For the LIVE environment, also include your liveEndpointUrlPrefix.
Client client = new Client("ADYEN_API_KEY", Environment.TEST);

// Create the request object(s)
Amount amount = new Amount()
  .currency("USD")
  .value(1000L);

AchDetails achDetails = new AchDetails()
  .ownerName("John Smith")
  .bankAccountType(AchDetails.BankAccountTypeEnum.CHECKING)
  .encryptedBankAccountNumber("adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLR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w+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ=");

PaymentRequest paymentRequest = new PaymentRequest()
  .reference("YOUR_ORDER_NUMBER")
  .amount(amount)
  .merchantAccount("ADYEN_MERCHANT_ACCOUNT")
  .paymentMethod(new CheckoutPaymentMethod(achDetails))
  .returnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..");

// Send the request
PaymentsApi service = new PaymentsApi(client);
PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID"));
```

#### PHP

```php
<?php
// Adyen PHP API Library v28.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Checkout\Amount;
use Adyen\Model\Checkout\CheckoutPaymentMethod;
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Service\Checkout\PaymentsApi;

$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
// For the LIVE environment, also include your liveEndpointUrlPrefix.
$client->setEnvironment(Environment::TEST);


// Create the request object(s)
$amount = new Amount();
$amount
  ->setCurrency("USD")
  ->setValue(1000);

$checkoutPaymentMethod = new CheckoutPaymentMethod();
$checkoutPaymentMethod
  ->setOwnerName("John Smith")
  ->setBankAccountType("checking")
  ->setEncryptedBankAccountNumber("adyenjs_0_1_25\$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd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jU57DE0YFrTtEsvsGJIcgF70vY5yXj2ODpLnnMHr3Fwd8pne0j/zzd/IT/+UDXOQoZvzDWpmO7tNW6rcVLCEtBijnqUCw==\$9COJh5qZrOHnhmPXv9z07sDKu3DCFe5iyxBwy/rtDhBL7pZFpsmpxtCfFhFqjfd/A2iwMFQ8WqOaHQhzKGYswlauH33WbcNVUmw+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ=");

$paymentRequest = new PaymentRequest();
$paymentRequest
  ->setReference("YOUR_ORDER_NUMBER")
  ->setAmount($amount)
  ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT")
  ->setPaymentMethod($checkoutPaymentMethod)
  ->setReturnUrl("https://your-company.example.com/checkout?shopperOrder=12xy..");

$requestOptions['idempotencyKey'] = 'UUID';

// Send the request
$service = new PaymentsApi($client);
$response = $service->payments($paymentRequest, $requestOptions);
```

#### C\#

```cs
// Adyen .net API Library v32.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Checkout;
using Adyen.Service.Checkout;

// For the LIVE environment, also include your liveEndpointUrlPrefix.
var config = new Config()
{
    XApiKey = "ADYEN_API_KEY",
    Environment = Environment.Test
};
var client = new Client(config);

// Create the request object(s)
Amount amount = new Amount
{
  Currency = "USD",
  Value = 1000
};

AchDetails achDetails = new AchDetails
{
  OwnerName = "John Smith",
  BankAccountType = AchDetails.BankAccountTypeEnum.Checking,
  EncryptedBankAccountNumber = "adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsWUGWVuOFFZEANhnJCtyLbQCVYzqs6t9ziAARMXyb/ZhUR+/R2gAkIP7dGQZFUyCzyCHyCSExbUv/VEHSIVTR8NVUx+inHfLMtsS3cplRwCeKJ4ThQR228F8KPEaZlu7FOCUmZxQcDyYUrcTa70ddJkNEt0NsjOMUDaNPSaURUnCkFwsY83FUY/rql74p8ZFF",
  Type = AchDetails.TypeEnum.Ach,
  EncryptedBankLocationId = "adyenjs_0_1_25$UbyYyi7693Ya9e3cZNYOJj//l7bxQMMYChWRpLmzhx+WU21kI0RGOTrf26YSeGZBPY04D0vYohMLJfXkBrvIHFthOtat7ZPvQgXCpXfao3KuKogDMM6KoAVpH7wtp7D6wZfUR7uP38ARbqyl4Ztn7ymPJ3OcCl6CxqMn05ixtcLv418XvNTM+P/67TLhQbdhy9OYUnh2Ja2+xueXZJRSTaUn/ILtMQs81hp8XTwMF7aoQJ6cd4cxfkmZ/jU57DE0YFrTtEsvsGJIcgF70vY5yXj2ODpLnnMHr3Fwd8pne0j/zzd/IT/+UDXOQoZvzDWpmO7tNW6rcVLCEtBijnqUCw==$9COJh5qZrOHnhmPXv9z07sDKu3DCFe5iyxBwy/rtDhBL7pZFpsmpxtCfFhFqjfd/A2iwMFQ8WqOaHQhzKGYswlauH33WbcNVUmw+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ="
};

PaymentRequest paymentRequest = new PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  MerchantAccount = "ADYEN_MERCHANT_ACCOUNT",
  PaymentMethod = new CheckoutPaymentMethod(achDetails),
  ReturnUrl = "https://your-company.example.com/checkout?shopperOrder=12xy.."
};

// Send the request
var service = new PaymentsService(client);
var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"});
```

#### NodeJS (JavaScript)

```js
// Adyen Node API Library v27.0.0
const { Client, CheckoutAPI } = require('@adyen/api-library');

// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const paymentRequest = {
  amount: {
    currency: "USD",
    value: 1000
  },
  reference: "YOUR_ORDER_NUMBER",
  paymentMethod: {
    type: "ach",
    encryptedBankAccountNumber: "adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsWUGWVuOFFZEANhnJCtyLbQCVYzqs6t9ziAARMXyb/ZhUR+/R2gAkIP7dGQZFUyCzyCHyCSExbUv/VEHSIVTR8NVUx+inHfLMtsS3cplRwCeKJ4ThQR228F8KPEaZlu7FOCUmZxQcDyYUrcTa70ddJkNEt0NsjOMUDaNPSaURUnCkFwsY83FUY/rql74p8ZFF",
    encryptedBankLocationId: "adyenjs_0_1_25$UbyYyi7693Ya9e3cZNYOJj//l7bxQMMYChWRpLmzhx+WU21kI0RGOTrf26YSeGZBPY04D0vYohMLJfXkBrvIHFthOtat7ZPvQgXCpXfao3KuKogDMM6KoAVpH7wtp7D6wZfUR7uP38ARbqyl4Ztn7ymPJ3OcCl6CxqMn05ixtcLv418XvNTM+P/67TLhQbdhy9OYUnh2Ja2+xueXZJRSTaUn/ILtMQs81hp8XTwMF7aoQJ6cd4cxfkmZ/jU57DE0YFrTtEsvsGJIcgF70vY5yXj2ODpLnnMHr3Fwd8pne0j/zzd/IT/+UDXOQoZvzDWpmO7tNW6rcVLCEtBijnqUCw==$9COJh5qZrOHnhmPXv9z07sDKu3DCFe5iyxBwy/rtDhBL7pZFpsmpxtCfFhFqjfd/A2iwMFQ8WqOaHQhzKGYswlauH33WbcNVUmw+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ=",
    ownerName: "John Smith",
    bankAccountType: "checking"
  },
  returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..",
  merchantAccount: "ADYEN_MERCHANT_ACCOUNT",
  billingAddress: {
    city: "Amsterdam",
    country: "US",
    houseNumberOrName: "50",
    postalCode: "12010",
    stateOrProvince: "NY",
    street: "Test Street"
  }
}

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
```

#### Go

```go
// Adyen Go API Library v21.0.0
import (
  "context"
  "github.com/adyen/adyen-go-api-library/v21/src/common"
  "github.com/adyen/adyen-go-api-library/v21/src/adyen"
  "github.com/adyen/adyen-go-api-library/v21/src/checkout"
)
// For the LIVE environment, also include your liveEndpointUrlPrefix.
client := adyen.NewClient(&common.Config{
  ApiKey:      "ADYEN_API_KEY",
  Environment: common.TestEnv,
})

// Create the request object(s)
amount := checkout.Amount{
  Currency: "USD",
  Value: 1000,
}

achDetails := checkout.AchDetails{
  OwnerName: common.PtrString("John Smith"),
  BankAccountType: common.PtrString("checking"),
  EncryptedBankAccountNumber: common.PtrString("adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsWUGWVuOFFZEANhnJCtyLbQCVYzqs6t9ziAARMXyb/ZhUR+/R2gAkIP7dGQZFUyCzyCHyCSExbUv/VEHSIVTR8NVUx+inHfLMtsS3cplRwCeKJ4ThQR228F8KPEaZlu7FOCUmZxQcDyYUrcTa70ddJkNEt0NsjOMUDaNPSaURUnCkFwsY83FUY/rql74p8ZFF"),
  Type: common.PtrString("ach"),
  EncryptedBankLocationId: common.PtrString("adyenjs_0_1_25$UbyYyi7693Ya9e3cZNYOJj//l7bxQMMYChWRpLmzhx+WU21kI0RGOTrf26YSeGZBPY04D0vYohMLJfXkBrvIHFthOtat7ZPvQgXCpXfao3KuKogDMM6KoAVpH7wtp7D6wZfUR7uP38ARbqyl4Ztn7ymPJ3OcCl6CxqMn05ixtcLv418XvNTM+P/67TLhQbdhy9OYUnh2Ja2+xueXZJRSTaUn/ILtMQs81hp8XTwMF7aoQJ6cd4cxfkmZ/jU57DE0YFrTtEsvsGJIcgF70vY5yXj2ODpLnnMHr3Fwd8pne0j/zzd/IT/+UDXOQoZvzDWpmO7tNW6rcVLCEtBijnqUCw==$9COJh5qZrOHnhmPXv9z07sDKu3DCFe5iyxBwy/rtDhBL7pZFpsmpxtCfFhFqjfd/A2iwMFQ8WqOaHQhzKGYswlauH33WbcNVUmw+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ="),
}

paymentRequest := checkout.PaymentRequest{
  Reference: "YOUR_ORDER_NUMBER",
  Amount: amount,
  MerchantAccount: "ADYEN_MERCHANT_ACCOUNT",
  PaymentMethod: checkout.AchDetailsAsCheckoutPaymentMethod(&achDetails),
  ReturnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy..",
}

// Send the request
service := client.Checkout()
req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest)
res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)
```

#### Python

```py
# Adyen Python API Library v13.4.0
import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.client.platform = "test" # The environment to use library in.

# Create the request object(s)
json_request = {
  "amount": {
    "currency": "USD",
    "value": 1000
  },
  "reference": "YOUR_ORDER_NUMBER",
  "paymentMethod": {
    "type": "ach",
    "encryptedBankAccountNumber": "adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsW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Smith",
    "bankAccountType": "checking"
  },
  "returnUrl": "https://your-company.example.com/checkout?shopperOrder=12xy..",
  "merchantAccount": "ADYEN_MERCHANT_ACCOUNT",
}

# Send the request
result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID")
```

#### Ruby

```rb
# Adyen Ruby API Library v10.3.0
require "adyen-ruby-api-library"

adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_API_KEY'
# For the LIVE environment, also include your liveEndpointUrlPrefix.
adyen.env = :test # Set to "live" for live environment

# Create the request object(s)
request_body = {
  :amount => {
    :currency => 'USD',
    :value => 1000
  },
  :reference => 'YOUR_ORDER_NUMBER',
  :paymentMethod => {
    :type => 'ach',
    :encryptedBankAccountNumber => 'adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsWUGWVuOFFZEANhnJCtyLbQCVYzqs6t9ziAARMXyb/ZhUR+/R2gAkIP7dGQZFUyCzyCHyCSExbUv/VEHSIVTR8NVUx+inHfLMtsS3cplRwCeKJ4ThQR228F8KPEaZlu7FOCUmZxQcDyYUrcTa70ddJkNEt0NsjOMUDaNPSaURUnCkFwsY83FUY/rql74p8ZFF',
    :encryptedBankLocationId => 'adyenjs_0_1_25$UbyYyi7693Ya9e3cZNYOJj//l7bxQMMYChWRpLmzhx+WU21kI0RGOTrf26YSeGZBPY04D0vYohMLJfXkBrvIHFthOtat7ZPvQgXCpXfao3KuKogDMM6KoAVpH7wtp7D6wZfUR7uP38ARbqyl4Ztn7ymPJ3OcCl6CxqMn05ixtcLv418XvNTM+P/67TLhQbdhy9OYUnh2Ja2+xueXZJRSTaUn/ILtMQs81hp8XTwMF7aoQJ6cd4cxfkmZ/jU57DE0YFrTtEsvsGJIcgF70vY5yXj2ODpLnnMHr3Fwd8pne0j/zzd/IT/+UDXOQoZvzDWpmO7tNW6rcVLCEtBijnqUCw==$9COJh5qZrOHnhmPXv9z07sDKu3DCFe5iyxBwy/rtDhBL7pZFpsmpxtCfFhFqjfd/A2iwMFQ8WqOaHQhzKGYswlauH33WbcNVUmw+B+SvHSJIWxJOkPbWv5zCX5KIATnIRGmi9c/vNNRI2TBbxML8P89245lyc2c7mIXZC/xCbpVXu0fRZCEWEo2PM43HNBwYZNQ/QTf285lMFNHhIEJUJnfMElHp1nV/pcdo2zw8zwKsAXn/BiTaT341SQcmm4JtcXvFEcetCPEElN9yemcwtCt1qzPUSZuM5+q5A/s+M4edH6lyjKKUqrqxps39EJxzam0NISJIszlhPKib0ML/lG7yiJU6EDBOflntKBBt490A0igN2GyK4HbxjonvlDMTgpHwkLLU5cf3zg3lfHFHyxTpsq5sLuwXuJcDaDK3TSl8/jjkmCcHXWJLdK5UaqRjg1QZ4EQadTiP/iPjEIrj4mKZJMXyw2gB/dDDN0egEy6pQmt9pzlgRNQ=',
    :ownerName => 'John Smith',
    :bankAccountType => 'checking'
  },
  :returnUrl => 'https://your-company.example.com/checkout?shopperOrder=12xy..',
  :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT',
}

# Send the request
result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' })
```

#### NodeJS (TypeScript)

```ts
// Adyen Node API Library v27.0.0
import { Client, CheckoutAPI, Types } from "@adyen/api-library";

// For the LIVE environment, also include your liveEndpointUrlPrefix.
const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const amount: Types.checkout.Amount = {
  currency: "USD",
  value: 1000
};

const achDetails: Types.checkout.AchDetails = {
  ownerName: "John Smith",
  bankAccountType: Types.checkout.AchDetails.BankAccountTypeEnum.Checking,
  encryptedBankAccountNumber: "adyenjs_0_1_25$GTE/ytzAupIEbFEybScAA/T3W8+Xj3ZWj3CIl5IeIdMfkNd8rRnH0T/YfmR9rU3pLsZDEoIg8SLGLTdehuYFf9Oxl7FO+Fqi7uFBJpDyJm0BE8IFN330k+01UNRObpLjbJSUr0a7ylZoZxEBrw7Sj2PDEIIxfnHF8mVuxanDUoD7t91MB1VKe/p5vwE2YylLzkuCbmM5RXv5Ahd05eF+zL39B8+TUpuK+gShwCJH0Ay+hnF6FavpcLRvmD4YYL4glBTqiEta+vsO6R9EDejDRlDTOqDAZ4P5gleU1ALEkWzwcN+GNCk0K0LQVNkPCsMUTLIeor+n95t3zuUC+5kTAw==$a7K23S61C2maU8SUH6w/XzZbNYoXF/ndSLd3JyLS51EqXCEx8JGOzFjp52uIKCyHPxxr9zquWSqdiC8GQsXl1mth2AOS97Xcwu1pf+pYO3NGCPsTzQNKoXcd5yyyb+1SYdiiPsPSdSNhb1CT9O2rvfWRqSBUSikgyhoYkUg/o8KPI8hKVvpdUf5EEZoctKPr5CU7mXFp+pD8M2FzDP8dr6KYgGprtytWjPxXYtUw7T+uNJfbuIvAuKDsFPK0UrkYcDyW43QHZwtualg/YRDXnIzeIdY/I5s13zGsWUGWVuOFFZEANhnJCtyLbQC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ymentRequest: Types.checkout.PaymentRequest = {
  reference: "YOUR_ORDER_NUMBER",
  amount: amount,
  merchantAccount: "ADYEN_MERCHANT_ACCOUNT",
  paymentMethod: achDetails,
  returnUrl: "https://your-company.example.com/checkout?shopperOrder=12xy.."
};

// Send the request
const checkoutAPI = new CheckoutAPI(client);
const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" });
```

## Test and go live

You can test ACH Direct Debit payments as well as chargebacks.

### Test the payment flow

Before making live ACH Direct Debit payments, use the following account details to test your integration.

| `ownerName` | `bankAccountNumber`                                             | `bankLocationId` (routing number)                                                |
| ----------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| Any name    | Any correctly formatted account number. Example: **1234567890** | Any correctly formatted routing number. Examples: **011000138** or **121000358** |

### Test the chargeback flow

You can test the chargeback flow by making test payments with an `ownerName` value that consists of **chargeback:** followed by an ACH return [reason code](/risk-management/chargeback-guidelines/ach-chargebacks/#ach-retry). For example, **chargeback:R01**. The other account details to use are the same as when testing payments.

For instructions, see [Test a chargeback scenario](/risk-management/chargeback-guidelines/ach-chargebacks#test-a-chargeback-scenario).

## See also

* [Account validation with giact](/payment-methods/ach-direct-debit/verification-with-giact)
* [Tokenization](/online-payments/tokenization)
* [ACH Direct Debit chargebacks](/risk-management/chargeback-guidelines/ach-chargebacks)
