ACH direct debit
Debit a customer's US bank account over ACH, or send a Request for Payment over RTP, from your server with POST /v1/charges.
ACH direct debit pulls USD from a customer's US checking or savings account. You create each charge from your server with the customer's bank details or a saved bank account, and send it over ACH or as a Request for Payment (RfP) over the RTP network.
Payment method properties
ACH direct debit takes USD from customers in the United States, and you accept it only through the API.
| Property | Details |
|---|---|
| Type | Bank debit |
| API type | us_bank_account |
| Customer countries | United States |
| Currencies | USD |
| Recurring payments | Yes |
| Integrations | API |
How it works
An ACH direct debit charge is asynchronous, so its outcome arrives after you create it.
- You collect the customer's authorization to debit their account, and their routing number, account number, and account type.
- You create the charge with
POST /v1/charges. Every ACH direct debit charge returns201withstatus: "pending", including a charge that's declined later. - Pay.com sends the charge over the rail you chose. The charge moves to
succeededorfailed, and Pay.com sends thecharge.succeededorcharge.failedwebhook event. - After a charge succeeds, the customer's bank can still return the debit. See Returns.
Before you begin
Ask your account manager to enable ACH direct debit for your account. Request for Payment needs its own setup, so tell them if you plan to send charges over RTP.
You also need:
Charge a bank account
Send POST /v1/charges with
source_data.type set to "us_bank_account", the customer's bank details in
source_data.us_bank_account, and the rail in
payment_method_options.us_bank_account.network. The example debits $100.00,
because amount is in minor units.
{
"amount": 10000,
"currency": "usd",
"customer_reference_id": "cust-001",
"source_data": {
"type": "us_bank_account",
"us_bank_account": {
"account_number": "000123456789",
"routing_number": "021000021",
"account_holder_name": "Jane Smith",
"account_type": "checking",
"account_holder_type": "individual"
},
"billing_details": {
"name": "Jane Smith",
"email": "jane.smith@example.com",
"address": {
"line1": "1 Main Street",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
}
}
},
"payment_method_options": {
"us_bank_account": {
"network": "ach",
"ach_type": "same_day"
}
}
}{
"id": "chrg_702172227948251136",
"resource": "charge",
"amount": 10000,
"amount_human_readable": "100.00",
"currency": "usd",
"status": "pending",
"created": "2026-11-28T10:30:00Z",
"paid": false,
"refunded": false,
"disputed": false
}network and account_type are required, and a charge without network is
declined. account_type is checking or savings, and account_holder_type
is individual or company. billing_details needs at least the customer's
name and email. A Request for Payment also needs the full billing address,
including the street in address.line1.
Choose the rail
Set these options in payment_method_options.us_bank_account on the charge.
| Option | Values | Description |
|---|---|---|
network | ach, rtp | Required. The rail the charge uses. ach debits the account over ACH. rtp sends a Request for Payment over the RTP network, and the customer approves it with their bank. A charge with fednow is declined. |
ach_type | next_day, same_day | How fast an ACH debit settles. next_day, the default, settles the next business day. same_day settles the same business day. |
ach_entry | web, ppd, ccd, tel | The ACH entry class, which matches how the customer authorized the debit. web, the default, is for authorization online. ppd is for a consumer's written authorization, ccd is for a business account, and tel is for authorization by phone. |
ach_fallback | true, false | For a Request for Payment. Set to true to send the charge as a same-day ACH debit when the customer's bank can't receive Request for Payment, or when the billing address has no street. Without it, those charges are declined. |
Charge a saved bank account
To charge a bank account the customer saved before, pass its
pm_us_bank_account_… ID as payment_method, an alias of source, with the
same customer_reference_id it was saved for. Set off_session to true when
the customer isn't in your checkout, such as for a recurring charge. Each
charge's network decides its rail, so you can charge a saved account over ACH
or RTP.
{
"amount": 10000,
"currency": "usd",
"customer_reference_id": "cust-001",
"payment_method": "pm_us_bank_account_483260647404995584",
"off_session": true,
"payment_method_options": {
"us_bank_account": {
"network": "ach"
}
}
}{
"id": "chrg_702172234081976320",
"resource": "charge",
"amount": 10000,
"amount_human_readable": "100.00",
"currency": "usd",
"status": "pending",
"created": "2026-11-28T10:35:00Z",
"paid": false,
"refunded": false,
"disputed": false
}To find a saved bank account's ID, list the customer's payment methods with
GET /v1/customers/{reference_id}/payment_methods.
Track the outcome
An ACH direct debit charge stays pending until its outcome arrives. Pay.com
sends the outcome in a webhook event, and you can also retrieve the charge with
GET /v1/charges/{id}. Don't
fulfill an order while its charge is pending.
| Rail | When the charge moves to succeeded |
|---|---|
ACH with same_day | The same business day |
ACH with next_day | The next business day |
| Request for Payment | When the customer pays the request |
A declined charge moves to failed within a few seconds, with a failure_code
such as processing_error, or issuer_not_available when the customer's bank
can't receive Request for Payment. See Declines
for what each code means.
Subscribe to these events, and verify the Pay-Signature header before you act
on one. See Verify webhook signatures.
| Event | When it fires | What to do |
|---|---|---|
charge.succeeded | The debit or the Request for Payment completed | Fulfill the order |
charge.failed | The charge was declined | Read the charge's failure_code, and ask the customer to pay again or use another method |
Returns
An ACH debit isn't guaranteed. After a charge succeeds, the customer's bank can still return the debit:
- An administrative return, such as R01 for insufficient funds, usually arrives within 2 business days.
- A return for a debit the customer says they didn't authorize can arrive up to 60 days later.
Pay.com records a return as a lost dispute, with the ACH return code as its reason, and takes back the charge's amount and a chargeback fee. See Disputes.
Test in the sandbox
Test with your sandbox API key (sk-pay-com-sandbox-...) against
https://api.sandbox.pay.com/v1. Sandbox payments never move real funds. See
Environments.
Any account number works. The routing number decides whether the test bank can receive Request for Payment.
| Routing number | Test bank |
|---|---|
021000021 | Receives ACH only |
271975391 | Can receive Request for Payment |
Outcomes don't depend on the amount or the account number. In the sandbox, an ACH charge succeeds, and a Request for Payment is paid automatically about a minute after you create it. To test a decline, create one of these charges:
- A charge without
network. - A charge with
networkset to"fednow". - A charge in a currency other than USD.
- A Request for Payment to routing number
021000021withoutach_fallback. - A Request for Payment with no street in the billing address and without
ach_fallback.
Returns can't be simulated in the sandbox.
Next steps
- Disputes: Track returned debits, which Pay.com records as lost disputes.
- Refund a charge: Refund a succeeded charge, and review refund statuses.
- US bank account payouts: Pay out to a customer's US bank account.
- Webhooks: Configure a webhook endpoint and verify signatures.