Verify a customer in sandbox
Verify a sandbox customer through the hosted page or the API, and get their KYC to completed a few minutes later.
Use this recipe to verify a sandbox customer, so you can open accounts and cards for them.
Who it is for. A neobank that is building its onboarding screens and needs verified sandbox customers to open accounts and cards.
Status. Available. Sandbox completes every review that finishes, whatever images you send, so you cannot test a rejection or a resubmission.
Money example
No money moves here, but verification decides what money can move. You create Amara in sandbox, and she finishes the hosted check with a test ID and selfie. About 3 minutes later her basic verification is completed, so you can open an account or a card for her.
Before you start
A sandbox key. The customer fields follow the same rules as in live. Send a phone number in a real format, and ISO country and state codes. See Verify a person on a hosted page.
Find out what is required
GET /v1/customers/{customer_id} shows each level's status in kyc[]. Start only when basic is not_started or failed. Read status, not verified_at. Gravv sets verified_at on every row when it creates the customer.
Steps
1. Create the customer and start the hosted check
Follow Verify a person on a hosted page with your sandbox key. The web_url in the response opens the verification partner's test page.
2. See what happens today
The review finishes within about 3 minutes of submitting. Sandbox then sets the basic row to completed, whatever the review found, and sends customer.kyc.status.completed. If the row still reads pending once kyc/status shows reviewStatus completed, call kyc/status again: each call brings a finished review into the customer record.
3. Build on the verified customer
Read the customer with GET /v1/customers/{customer_id} and check that basic is completed. Then use the customer for accounts and cards. Sandbox never fails a review, so test the rejected screen with a recorded customer.kyc.status.failed payload.
What can go wrong
| Response | Why | Fix |
|---|---|---|
The row stays pending, and kyc/status shows reviewStatus completed | The finished review has not reached the customer record yet | Call kyc/status again a few seconds later |
The row stays pending, and kyc/status shows reviewStatus pending | The customer did not submit the hosted steps | Finish the hosted page. If needed, start again once the link's 1 hour has passed |
CUSTOMER_KYC_INCOMPLETE on POST /v2/accounts | The customer is not verified yet | Finish step 2 first |
409 KYC_IN_PROGRESS: … on a second server-to-server start | The review of the first start is still running | Wait the few minutes the review takes. Do not retry in a loop |
413 the uploaded file is too large — the maximum is 5MB on a small file | Sandbox refuses files from about 600 KB | Send JPEG or PDF files under 500 KB |
400 ASSOCIATED_PERSONS_INCOMPLETE: business <business_id> can't be verified until every associated person's KYC is completed. Associated person "<name>" (customer_id <person_id>) is waiting for review: … | A person linked to the business is not verified yet | Verify each person first, then start the business |
Webhooks you will receive
You receive customer.created, then customer.kyc.status.pending about 9 seconds after a hosted start, then customer.kyc.status.completed once the review finishes.
Testing in sandbox
This page is the sandbox guide for verification. Gravv charges a verification fee to your sandbox billing as in live, on its own fee_charge row.