Verify a bank account

Validate bank account information before processing payments

An ACH verify checks a customer's bank account before you charge it. Run one before the first charge, or before you save an account for recurring payments. How the connection checks the account, and whether it requires a verify before a sale, depends on the connection. See the connection's guide, linked from Supported connections.

A verify with ?tokenize=true also saves the account as a multi-use bank account token, so you can charge it later without the account details. The following diagram shows that flow:

sequenceDiagram
    participant P as Your platform
    participant Z as Preczn
    participant C as Connection
    P->>Z: POST /v1/transactions?tokenize=true (verify, account details)
    Z->>C: Verify
    C-->>Z: Result
    Z-->>P: Response with status and payment.token
    Note over P: Store the token with the customer
    P->>Z: Later: POST /v1/transactions (sale, payment.token)

Before you start, make sure you have a merchant with a connection that accepts ACH. See the ACH column in Supported connections.


Verify a bank account

To verify a bank account and save it as a token, complete the following steps:

  1. Send POST /v1/transactions?tokenize=true with type set to verify and the account in payment.bankAccount. A personal account needs firstName and lastName. A corporate account needs accountBusinessName, or both names. The following request uses the approved test bank account from Test data.

    {
      "type": "verify",
      "merchantId": "mid_test_{merchantId}",
      "firstName": "{firstName}",
      "lastName": "{lastName}",
      "payment": {
        "bankAccount": {
          "type": "personalChecking",
          "account": "123456789",
          "routing": "987654321",
          "bankCountry": "USA"
        }
      }
    }
    {
      "id": "txn_test_{transactionId}",
      "type": "verify",
      "merchantId": "mid_test_{merchantId}",
      "authorization": {
        "status": "A",
        "processorCode": "{processorCode}",
        "processorMessage": "{processorMessage}"
      },
      "payment": {
        "token": "tkn_test_{tokenId}"
      }
    }

    This response is abbreviated. For every field, see Process Transaction.

  2. Check authorization.status in the response, and act on it:

    • A: The account passed. Store payment.token with the customer's record, and discard the account and routing numbers.
    • D: The account failed. Read processorCode and processorMessage for the reason, and ask the customer for another account.
    • P: The result arrives later. See Pending transactions.
    • E: The verify didn't complete. Read authorization.errors.

    Branch on authorization.status, not on processorCode or processorMessage, which differ by connection.

If the request returns 400, look up the message in ACH errors.

Verify a saved token

To verify an account that you already saved as a bank account token, send POST /v1/transactions with payment.token instead of payment.bankAccount:

{
  "type": "verify",
  "merchantId": "mid_test_{merchantId}",
  "payment": {
    "token": "tkn_test_{tokenId}"
  }
}

The verify uses the account holder's name stored on the token. When you send firstName, lastName, accountBusinessName, or achMandate, the verify uses your value and Preczn stores it on the token. See Overwriting existing data.


Next

Charge the verified account. See Charge a bank account.


Did this page help you?