Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Guides Recipients Verify an external account

Verify an external account

Check a bank account's holder name with the bank, or whether a US routing number can receive wires or RTP, before you save the payee.

4 min read

This page shows how to ask the bank who holds an account number before you add an external account. Show the name to your user so they can confirm it is the right person before any money moves. For a US payee paid by wire or RTP, it also shows how to check the routing number for that rail.

Example. Your user types her brother's 10-digit Nigerian account number and picks his bank. Verify returns CHINEDU OKECHUKWU EZE with verification_source provider. She confirms it is him, and you save the payee.

The account check covers bank account numbers only. The bank looks up one pair: account_number with its institution_id. An iban gets a format (mod-97) check only. The API accepts a phone or clabe but does not check it. Gravv checks mobile wallet names when you save the payee instead.

Verify a bank account

Call POST /v1/external-accounts/verify with the account number and the bank's institution_id from Retrieve supported institutions. This endpoint needs no Idempotency-Key:

Verify a bank account request
curl --request POST \
--url https://api.gravv.xyz/v1/external-accounts/verify \
--header 'Api-Key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "0123456789",
"institution_id": "2ce313c8-de20-48dd-bfc6-949b8fd5ad84"
}
'
Verify a bank account response
{
"data": {
"verified": true,
"account_holder_name": "CHINEDU OKECHUKWU EZE",
"verification_source": "provider"
},
"error": null
}

Trust the name only when verification_source is provider, which means the bank looked the account up. verified: true with verification_source local means the API checked only the format.

Check an IBAN's format

Check an IBAN request
curl --request POST \
--url https://api.gravv.xyz/v1/external-accounts/verify \
--header 'Api-Key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"iban": "DE89370400440532013000"
}
'
Check an IBAN response
{
"data": {
"verified": true,
"verification_source": "local"
},
"error": null
}

This check confirms that the IBAN is well formed. It does not confirm that the account exists or who holds it.

When an account does not verify

verified is false and message says why:

Unverified account response
{
"data": {
"verified": false,
"message": "IBAN checksum invalid (mod 97 = 28, expected 1)"
},
"error": null
}

A 400 means you sent no identifier (at least one account identifier required: account_number, iban, phone, or clabe) or the institution_id is not valid. Without an institution_id, the API does not limit the account number lookup to one bank.

Check a US routing number for wire or RTP

A US bank can have one routing number for ACH and another for wires, and not every bank can receive instant payments. Before you save an ach_wire payee with payment_rail wire or rtp, check its routing number for that rail with GET /v1/external-accounts/routing-numbers/{routing_number}/wire or GET /v1/external-accounts/routing-numbers/{routing_number}/rtp. Gravv runs the same check when you save or correct the payee. These calls need no Idempotency-Key. If your API key is scoped, it needs payee:verify.

Check a routing number for wire request
curl --request GET \
--url https://api.gravv.xyz/v1/external-accounts/routing-numbers/021000021/wire \
--header 'Api-Key: <API_KEY>'
Check a routing number for wire response
{
"data": {
"routing_number": "021000021",
"rail": "wire",
"valid": true,
"bank_name": "JPMORGAN CHASE BANK"
},
"error": null
}
Check a routing number for RTP request
curl --request GET \
--url https://api.gravv.xyz/v1/external-accounts/routing-numbers/123456780/rtp \
--header 'Api-Key: <API_KEY>'
Check a routing number for RTP response
{
"data": {
"routing_number": "123456780",
"rail": "rtp",
"valid": false
},
"error": null
}
•
valid: false is a 200, not an error. If you save the payee on that rail anyway, the API returns 400 with ERROR_CODE_INVALID_WIRE_ROUTING_NUMBER or ERROR_CODE_INVALID_RTP_ROUTING_NUMBER.
•
For wire, ask the payee for the bank's wire routing number, or save the payee for ach.
•
For rtp, save the payee for ach or wire. A bank can take some instant payments and still answer false here.
•
bank_name is the bank the routing number belongs to, when Gravv knows it. It can be present when valid is false.
ResponseWhyFix
400 routing number must be exactly 9 digits: invalid input / routing number checksum invalid: invalid input (ERROR_CODE_INVALID_FORMAT)The number is not a valid ABA routing number. No bank was askedUse the bank's real 9-digit routing number
503 routing number verification is unavailable; please retry (ERROR_CODE_SERVICE_UNAVAILABLE)Gravv could not run the checkRetry with backoff. A payee saved meanwhile is accepted without the check, and its setup can fail
504 The payees service is temporarily unavailable. Please try again later.The check timed outRetry with backoff

Testing in sandbox

In sandbox, every Nigerian account number verifies, with the name SIM ACCOUNT HOLDER and verification_source provider.

Sandbox answers routing number checks without asking a bank:

Routing numberwirertp
123456780valid: falsevalid: false
011000015valid: truevalid: false
Any other valid routing numbervalid: truevalid: true

A valid answer in sandbox has bank_name SANDBOX BANK. Saving a payee in sandbox gets the same answers, so use these numbers to test your fallback to another rail.

Was this page helpful? Yes No