ACH Guide
Accept bank account (ACH) payments and handle NACHA returns correctly.
ACH (Automated Clearing House) payments let you debit a customer's US bank account directly. ACH is commonly used for high-value transactions, recurring billing, and healthcare payments.
ACH vs. card payments
| ACH | Card | |
|---|---|---|
| Settlement | 1–3 business days | Next business day |
| Return window | Up to 60 days (R10) | 60–120 days (chargeback) |
| Cost | Lower per-transaction | Higher per-transaction |
| Failure mode | R-code returns | Declines |
Authorization language (NACHA requirement)
Before debiting a bank account, you must obtain the customer's authorization. NACHA requires specific language depending on the payment type:
You must display NACHA-compliant authorization language before the payer confirms the debit. Take the exact text from the consent-versions catalog, GET /api/v1/ach/consent-versions — see consent_text_version below.
Create an ACH payment
The request is one flat JSON object — there is no nested bank_account block. The only ACH instrument is a saved account: pass its vault_token (cvt_…) plus the use_type that declares your reuse intent. Raw routing_number / account_number are rejected as unknown fields. A first-time payer saves the account through a hosted payment page; the hpp_session.completed webhook carries the token. consent_text_version, consent_ip and consent_at are your NACHA authorization proof, so the API will not accept a debit without them. On this request you fill all three, from your own checkout — Cresora resolves the registered authorization text from the version you name, records the evidence, and does not default any of the three for you here. Add consent_text_values when the version you name has placeholders. (A first-time payer's hosted-page save is different: there the consent evidence comes from the page itself.)
# The instant the payer accepted the authorization. Computed here so the
# snippet still runs next month; in production send the instant you actually
# captured — it is your NACHA evidence, not a timestamp of convenience.
# consent_text_version and consent_text_values name the text you displayed and
# the values you filled into its placeholders: read the versions you may attest
# from GET /api/v1/ach/consent-versions on the environment you call.
CONSENT_AT="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
curl -X POST https://api.cresoracommerce.ai/api/v1/transactions \
-H "Authorization: Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: idem_$(uuidgen)" \
-d '{
"type": "ACH_DEBIT",
"merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd",
"amount": "500.00",
"currency": "USD",
"vault_token": "cvt_0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f",
"use_type": "ONE_TIME_FUTURE",
"ach_sec_code": "WEB",
"consent_text_version": "single-entry-v2.0",
"consent_text_values": {
"MerchantName": "Acme Utilities LLC",
"MerchantContact": "billing@acme.example"
},
"consent_ip": "203.0.113.42",
"consent_at": "'"$CONSENT_AT"'"
}'| Field | Notes |
|---|---|
merchant_id | UUID. Must be a merchant your partner account owns — a foreign id returns 404 |
vault_token | Saved bank account to debit (cvt_…), from an hpp_session.completed webhook or the stored-credentials API. The only ACH instrument |
use_type | ONE_TIME_FUTURE, RECURRING, INSTALLMENT or UNSCHEDULED_COF — your reuse intent for the saved account |
ach_sec_code | WEB, or CCD for a business receiver. Every saved account was authorized through the hosted page, over the Internet, so a debit against it is a WEB entry on every use_type, whether the payer or the merchant initiates it. PPD and TEL are refused with 422 ach_sec_code_mismatch |
consent_text_version | The Cresora-registered authorization-text version you displayed. Show that text verbatim — this field attests which registered version the payer saw, not your own wording. Read the versions you may attest, with each one's exact text, placeholders and button label, from GET /api/v1/ach/consent-versions; the catalog differs per environment, and the samples' single-entry-v2.0 is a single-entry text. Pick by kind: a SINGLE_ENTRY version for ONE_TIME_FUTURE, a STANDING version for RECURRING, INSTALLMENT and UNSCHEDULED_COF, otherwise 400 ach_consent_version_kind_mismatch. The catalog lists the versions you may attest for a new authorization: if it lists no STANDING version, RECURRING, INSTALLMENT and UNSCHEDULED_COF debits cannot be made yet. Ids match exactly, case included; an unknown id is 400 ach_consent_version_unknown |
consent_text_values | Object keyed by placeholder name (MerchantName, MerchantContact): the value you displayed for each placeholder of the attested version. Give exactly that version's placeholders, otherwise 400 ach_consent_text_values_invalid; omit it for a version whose placeholders is empty. Each value is the single line of readable text you displayed; a value that is not is rejected with 400 |
consent_ip | The IPv4/IPv6 literal the payer authorized from, as your checkout saw it — not your server's egress address, and never a hostname |
consent_at | ISO-8601 UTC instant the payer authorized, with seconds and a trailing Z as in the examples — offset forms such as +02:00 are rejected with 400. Never in the future beyond a small clock-skew tolerance. It must fall while the attested version was in force — at or after its activation and, once superseded, before its sunset_at — otherwise 400 ach_consent_version_not_yet_active or 400 ach_consent_version_retired. A merchant-initiated debit made after the sunset also needs an earlier debit on the same saved account, recorded before the sunset, with the same version and consent_at; without one it is 400 ach_consent_version_retired. A merchant-initiated debit's consent_at also cannot predate the moment Cresora saved the bank account, beyond a short tolerance for the save to arrive; earlier is rejected with 400. A 7-day recency window applies to payer-initiated debits only — see the note below |
The recency window depends on who initiated the debit.
A payer-initiated debit — use_type: ONE_TIME_FUTURE — attests a fresh online affirmation, so consent_at must fall within a 7-day window; older is rejected with 400. (The retention obligation is NACHA OR1 §2.5; the 7 days quantifying "reasonably recent" is Cresora policy.)
A merchant-initiated debit — use_type: RECURRING, INSTALLMENT or UNSCHEDULED_COF — stands on the standing authorization you already hold, which is legitimately older than 7 days. The window is not applied there. Its consent_at still cannot predate the moment Cresora saved the bank account, beyond a short tolerance for the save to arrive; earlier is rejected with 400.
Either way the instant must be the real capture time: it is recorded as the entry's authorization evidence and produced in a bank-return dispute (R10). Never in the future, on any debit — a small clock-skew tolerance absorbs clock drift between your servers and Cresora's, nothing more.
Separately, the merchant must be opted into the ach_payments modality. Without it the request returns 422 ach_not_enabled_for_merchant, which is not retryable until the modality is granted.
import requests, uuid
from datetime import datetime, timezone
# See the curl note: send the instant you actually captured the authorization,
# and the consent version and placeholder values you displayed.
consent_captured_at = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
requests.post(
"https://api.cresoracommerce.ai/api/v1/transactions",
headers={
"Authorization": "Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx",
"Idempotency-Key": f"idem_{uuid.uuid4()}",
},
json={
"type": "ACH_DEBIT",
"merchant_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd",
"amount": "500.00",
"currency": "USD",
"vault_token": "cvt_0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f",
"use_type": "ONE_TIME_FUTURE",
"ach_sec_code": "WEB",
"consent_text_version": "single-entry-v2.0",
"consent_text_values": {
"MerchantName": "Acme Utilities LLC",
"MerchantContact": "billing@acme.example",
},
"consent_ip": "203.0.113.42",
"consent_at": consent_captured_at,
},
)// See the curl note: send the instant you actually captured the authorization,
// and the consent version and placeholder values you displayed.
const consentCapturedAt = new Date().toISOString().replace(/\.\d{3}Z$/, "Z");
await fetch("https://api.cresoracommerce.ai/api/v1/transactions", {
method: "POST",
headers: {
Authorization: "Bearer csk_ab12cd34_xxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json",
"Idempotency-Key": "idem_" + crypto.randomUUID(),
},
body: JSON.stringify({
type: "ACH_DEBIT",
merchant_id: "0190a1b2-c3d4-7e5f-8901-23456789abcd",
amount: "500.00",
currency: "USD",
vault_token: "cvt_0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f",
use_type: "ONE_TIME_FUTURE",
ach_sec_code: "WEB",
consent_text_version: "single-entry-v2.0",
consent_text_values: {
MerchantName: "Acme Utilities LLC",
MerchantContact: "billing@acme.example",
},
consent_ip: "203.0.113.42",
consent_at: consentCapturedAt,
}),
});ACH returns
ACH returns occur when the receiving bank rejects the debit. When it returns a debit that is SUBMITTED or SETTLED, Cresora moves it to RETURNED and fires a transaction.returned webhook. Every delivery arrives in the standard envelope — note the field is event_type, not event, and the business fields live inside data:
{
"envelope_version": 1,
"event_id": "0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f",
"event_type": "transaction.returned",
"occurred_at": "2026-05-23T14:32:11.847Z",
"partner_id": "0190a1b2-c3d4-7e5f-8901-23456789abcd",
"idempotency_key": "evt_0190d8a1-2b3c-7d4e-9f12-7a8b9c0d1e2f",
"data": { }
}Use idempotency_key (or event_id, which it embeds) as your deduplication key — both are stable across retries. data carries the returned transaction's identifier, the R-code and its reason; read the transaction back with GET /transactions/{transactionId} if you need its full current state.
Common return codes:
| Code | Reason | Action |
|---|---|---|
R01 | Insufficient funds | Cresora marks a SUBMITTED or SETTLED debit RETURNED when the first return arrives. Contact support before debiting the account again |
R02 | Account closed | Stop attempting; update payment method |
R10 | Customer advises not authorized | Stop immediately; dispute likely |
R29 | Corporate not authorized | Re-obtain written authorization |
R10 (customer advises not authorized) is a serious signal. Stop all retries immediately and investigate. Continued debiting after an R10 violates NACHA rules.
Triggering returns in the sandbox
Cresora boards sandbox merchants onto the VeriCheck sandbox, not the gateway's loopback simulator, so the amount's cents do not select a return code. There is no documented way to trigger a specific return on demand through the Cresora API today; build your return handling against the transaction.returned event described above.
In production, returns come from the receiving bank on its own schedule — up to 60 days later for R10 — so your handler must treat a return as an asynchronous event.