Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Recipes Sandbox Verify a customer in sandbox

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.

3 min read

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

cURLNodePython
curl --request GET \
--url https://api.gravv.xyz/v1/customers/3f6b2a1e-8c4d-4e7f-9a2b-5c1d0e9f8a71/kyc/status \
--header 'Api-Key: <API_KEY>'

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

ResponseWhyFix
The row stays pending, and kyc/status shows reviewStatus completedThe finished review has not reached the customer record yetCall kyc/status again a few seconds later
The row stays pending, and kyc/status shows reviewStatus pendingThe customer did not submit the hosted stepsFinish the hosted page. If needed, start again once the link's 1 hour has passed
CUSTOMER_KYC_INCOMPLETE on POST /v2/accountsThe customer is not verified yetFinish step 2 first
409 KYC_IN_PROGRESS: … on a second server-to-server startThe review of the first start is still runningWait 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 fileSandbox refuses files from about 600 KBSend 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 yetVerify 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.

Reference

Was this page helpful? Yes No