Accept ACH Direct Debit payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.
Before you begin
These instructions explain how to add ACH Direct Debit to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.
Before starting your ACH Direct Debit integration:
- Make sure that you have set up your back end implementation.
- Add ACH Direct Debit in your test Customer Area.
Build your payment form for ACH Direct Debit
When a shopper chooses to pay with ACH Direct Debit, collect the following payment details in your payment form:
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 ABA routing transit number of the account. Do not remove any leading zeros. Example: 123456789 Adyen performs validation to ensure the routing number is genuine. |
Account Owner's Name | "John Smith" |
Account Owner's Address | A valid US address (optional field). |
We provide an ACH Direct Debit logo which you can use in your payment form. For more information, refer to Downloading logos.
You can also get the required fields from the /paymentMethods response as explained in our API-only integration guide. In your request, specify:
countryCode
: USamount.currency
: USD
The required fields are included in the object with type
ach.
Make a payment
From your server, make a /payments request, specifying:
paymentMethod.type
: achpaymentMethod.bankAccountNumber
: The bank account number.paymentMethod.bankLocationId
: The bank routing number of the account.paymentMethod.ownerName
: The name on the bank account.billingAddress
(Optional): Account owner's address information.
The following code sample is a /payments request for a ACH Direct Debit payment.
curl https://checkout-test.adyen.com/v68/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
"merchantAccount":"YOUR_MERCHANT_ACCOUNT",
"amount":{
"currency":"USD",
"value":"1000"
},
"reference":"YOUR_ORDER_NUMBER",
"{hint:state.data.paymentMethod from onSubmit}paymentMethod{/hint}":{
"type":"ach",
"bankAccountNumber":"1234567890",
"bankLocationId":"121000358",
"ownerName":"John Smith"
},
"billingAddress":{
"houseNumberOrName":"50",
"street":"Test Street",
"city":"Amsterdam",
"stateOrProvince":"NY",
"postalCode":"12010",
"country":"US"
}
}'
The /payments response contains:
resultCode
: Authorised. This means that the payment has been successfully received by Adyen. However, it may take up to 5 business days to know whether the payment was authorized by the bank. If the payment is successful, it will appear in the Settlement details report. If it fails, you will receive a CHARGEBACK notification.pspReference
: Our unique reference for the payment.
{
"pspReference":"881535534794261C",
"resultCode":"Authorised"
}
Present the payment result
Use the resultCode that you received in the /payments response to present the payment result to your shopper.
The resultCode
values you can receive for ACH Direct Debit are:
resultCode | Description | Action to take |
---|---|---|
Authorised | The payment has been successfully received by Adyen. It may take up to 5 business days to know whether the payment was authorized by the bank. If the payment is successful, it will appear in the Settlement Detail Report. If it fails, you will receive a CHARGEBACK notification. |
Inform the shopper that the payment was successful. |
Refused | The payment was refused. | Ask the shopper to try the payment again using a different payment method. |
Chargebacks
ACH Direct Debit payments can fail when:
-
There was a problem with settlement, for example because the account had insufficient funds, had been closed, or the account number was invalid.
-
The shopper asked their bank for a refund. This is referred to as a chargeback. Shoppers can reverse an ACH payment up to 60 days after settlement for one of the following reasons:
- They did not formally agree to the charge, or revoked such an agreement.
- The charge is processed earlier than the agreed date.
- The charge is different than the agreed amount.
This is different from credit card transactions, where a customer can initiate a chargeback by claiming that a product or service was not what they expected.
You cannot defend ACH Direct Debit chargebacks. These will always result in the payment being reversed.
For more information on the chargeback process, refer to Dispute management.
If an ACH Direct Debit payment fails, you will receive a CHARGEBACK webhook, and your Settlement details report will show a credit and a corresponding debit.
{
"live": "false",
"notificationItems": [
{
"NotificationRequestItem": {
"additionalData": {
"modificationMerchantReferences": ""
},
"amount": {
"currency": "",
"value": 1000
},
"eventCode": "CHARGEBACK",
"eventDate": "2019-03-20T15:40:27+01:00",
"merchantAccountCode": "YOUR_MERCHANT_ACCOUNT",
"merchantReference": "YOUR_PAYMENT_REFERENCE",
"originalReference": "161552590902659C",
"paymentMethod": "ach",
"pspReference": "181552594831625C",
"reason": "Chargeback",
"success": "true"
}
}
]
}
Test and go live
Before making live ACH Direct Debit payments, use the following account details to test your integration.
Account Owner's Name | Bank account number | Bank routing number | Account Owner's Address |
---|---|---|---|
Any name | Any correctly formatted account number. Example: 123456789 | 011000138 or 121000358 | Any correctly formatted US address. |