Open an account
Open a v2 account with one POST /v2/accounts, and read the errors it can return.
API version: v2.
POST /v2/accounts opens an account at the option you chose, with the data its requirements form asks for. There is no draft, submit or process step. The one call starts the bank's review.
A money example. Ada's account for her 1,200.00 USD invoice is a wallet-backed USD account on polygon. You send one request with her details, her passport and a utility bill. The response has status pending. A few minutes or days later the bank approves the account, and her client can pay.
Before you start
basic KYC is completed. The API checks this first. Until it passes, the API reports no other error.max_accounts_per_customer at that option. The limit counts the customer's pending and active accounts there in the same currency and the same account_type. To count them, use GET /v2/accounts?customer_id=….account_type is one the option lists. Only your business's own customer can hold card or default.Send the request
Save account_id. The response has no application_id, so read it from GET /v2/accounts/{id}.
What to send
token_wallets), send network from the option's token_options. Instead of network, you can send the wallet_id of one of your wallets on one of those networks. Never send both.network nor wallet_id.category: sub_account for a customer's account, main only for your business's own account. These are the only two you can open. If you leave it out, it is main for your business's own customer and sub_account for any other customer.account_type from the option's account_types: operating (the default), regular, card or default. A default account also needs category main.customer_type. In data.root, send citizenship_country for a person or incorporation_country for a business.parties. Everything about the applicant goes in data.root.data.parties[]. Name each person from the customer record by id, and add the facts the record lacks (ownership, control, signer, documents). If you leave parties out, the API declares every associated person without those facts, and the request fails validation on them.number, issued_date, expiration_date and issuing_country. content is raw base64, not a data: URI.Idempotency-Key. Documents of about 770 KB or more make a body that large. A retry of such a request runs again instead of returning the first response. After a timeout, list the customer's accounts before you send it again.Errors
Every 400 lists all the problems it found in details, keyed by field. Fix them all, then send the request again with a new Idempotency-Key. Gravv stores a 4xx response under its key for 24 hours and replays it if you reuse the key.
| Response | Why | Fix |
|---|---|---|
400 the customer for the customer_id supplied has not completed KYC; … (CUSTOMER_KYC_INCOMPLETE) | basic KYC is not completed | Finish KYC, then send again with a new key |
400 no customer record exists for the customer_id supplied; … (CUSTOMER_NOT_FOUND) | Wrong id, or an id from the other environment | Use the id from POST /v1/customers in the same environment |
400 Date of Birth is required (and 1 other field; see details) | Missing fields, each named in details | Fill every key in details |
400 network is required for account options that support wallet integration | Wallet-backed option without network or wallet_id | Send network |
400 network is only accepted for account options that support wallet integration | network sent to a fiat-only option | Remove it |
400 this account does not provide a token wallet on bitcoin; … (SELECTION_CONFLICT) | The option does not offer that network | Use one of its token_options |
400 Network must be sent as a top-level request field; data.root.network is no longer accepted | network inside data.root | Move it to the top level |
400 invalid request payload: unknown field "blockchain_network" | An old field name | Send network |
400 invalid request payload: unknown field "provider_override" | v2 has no provider_override or bank field | Pin a bank with bank_code |
400 missing idempotency key in request headers | No Idempotency-Key header | Send one |
400 wallet_id and network are mutually exclusive; send only one | Both sent | Send one |
400 bank_code=<code> does not open accounts for customers resident in XX. … (COUNTRY_NOT_SERVED) | The option does not serve that country | Choose another option |
400 bank_code=<code> does not offer currency=GBP; … (CURRENCY_NOT_SUPPORTED) | The option does not offer that currency | Choose another option |
400 bank_code=<code> does not offer account_type=<type>; it offers … (ACCOUNT_TYPE_NOT_SUPPORTED) | The pinned bank_code does not offer that type, such as yield | Send one of the types it lists |
400 CATEGORY_NOT_SUPPORTED, CUSTOMER_TYPE_NOT_SUPPORTED or SUBDIVISION_NOT_SERVED on bank_code | The pinned bank_code does not serve that category, customer type or state | Choose another option |
400 bank_code=<code> is not a bank we offer accounts at; … (UNKNOWN_BANK), or BANK_NOT_AVAILABLE | The bank_code does not exist, or is not open to your business | Copy bank_code from capabilities |
400 no account option is available for the requested combination (…) (UNSUPPORTED_COMBINATION) | Without bank_code, no option fits what you sent, such as account_type yield | Send a combination that capabilities lists |
400 ACCOUNT_TYPE_RESERVED_FOR_TENANT on account_type | card or default for a customer other than your business | Use operating or regular |
400 DEFAULT_REQUIRES_MAIN_CATEGORY on category | default without category main. Send main even though it is the default for your own customer | Send category main |
400 Category "virtual" is not supported; valid values: main, sub_account | Only main and sub_account can be opened | Send one of them |
400 details.documents: required: requires document proof_of_address | A required document is missing | Add it to data.documents |
400 document content too large: maximum size is 2MB; … | A file over 2 MB | Compress it |
400 unsupported file type "image/heic"; allowed types are JPEG, PNG, and PDF | Wrong format | Convert it |
400 content must be base64 (standard or URL-safe) | A data: prefix or bad base64 | Send raw base64 |
400 details.gender: invalid_enum: … expected one of: female, male | These forms do not accept other | Ask the customer, or choose another option |
400 state "LND" is not an ISO-3166-2 subdivision; … | A bare state code | Send the full code, such as GB-LND or US-CA |
400 parties are not accepted for an individual customer; … | parties on an individual | Remove parties |
400 customer_type=business does not match this customer's registered profile, which is individual. … | Wrong customer_type | Send the customer's type |
400 this customer already has an existing reference at the resolved bank; root-level fields are no longer accepted for it … | The bank already knows this customer | Send no data.root |
409 this customer already holds the maximum number of USD accounts permitted for this account type (5) | The per-customer limit, counted per currency and account_type | Reuse an account, or ask support to raise the limit |
409 CARD_ACCOUNT_ALREADY_EXISTS | The customer already has a card account | Use it. A deleted, frozen, failed, rejected or closed card account frees the slot |
409 DEFAULT_ACCOUNT_ALREADY_EXISTS | Your business already has a default account | Use it. A frozen default account still holds the slot |
409 MAIN_ACCOUNT_ALREADY_EXISTS on category | Your business already has a main default account | Send category sub_account |
409 WALLET_ALREADY_ASSIGNED on wallet_id | That wallet already backs another account | Use another wallet, or send network |
409 customer already has an application in progress for this bank | An earlier application at this bank is open | Fix that application |
409 this account provider is currently disabled for this account | The option is switched off for your business or this customer | Choose another option, or contact support |
422 idempotency_key_reused | The same key with a different body | Use a new key for each different request |
503 the customer record could not be verified right now; … (CUSTOMER_RECORD_UNAVAILABLE) | Gravv could not read the customer record | Retry with the same key |
503 Service temporarily unavailable. …, 500, 504 | A temporary fault | Retry with the same key. Gravv does not open a second account |
The machine codes, such as CARD_ACCOUNT_ALREADY_EXISTS, are in details, under the field they concern. The codes on bank_code appear only when you send bank_code. Without it, the same problems return UNSUPPORTED_COMBINATION.
Accounts opened under your business's own bank customer
Gravv can set up your business so that, at a given bank, every customer's account opens beneath your business's own customer at that bank. It is off unless Gravv turns it on for you. When it is on:
customer_id of your main account.applications.accounts.completed.| Response | Why | Fix |
|---|---|---|
400 TENANT_ACCOUNT_REQUIRED on customer_id: this tenant opens accounts for its customers under its own account at this bank, and that account does not exist yet: … | Your business's own account at that bank does not exist yet | Open it first |
409 TENANT_ACCOUNT_IN_PROGRESS on customer_id: the tenant's own account at this bank is still being opened; try again once it completes | Your own account there is still opening. The error carries its application_id | Retry once it completes |
Webhooks
Gravv sends applications.accounts.pending, then possibly applications.accounts.blocked, then applications.accounts.completed or applications.accounts.failed. Gravv never sends account.activated for a v2 account you open. See Track activation.