Read why KYC failed, then send the person back to the hosted page or replace the rejected document, without creating a new customer.
6 min read
This recipe reads why KYC failed, then sends the person back to the hosted page or replaces the rejected document, without creating a new customer.
Who it is for. This recipe is for the remittance app from Verify a person with documents you upload, after Kofi's verification came back failed because his selfie was blurred.
Status. Available. You cannot test it in sandbox today, because sandbox never records a rejection.
Money example
1.
Kofi is rejected, so he stays on the lowest limits, with a cap of 500.00 USD a day.
2.
His 800.00 USD rent payout would pause on the daily limit.
3.
He resubmits a clear selfie and is approved. His limit becomes 50,000.00 USD a day, and the 800.00 USD goes through.
Know whether he was verified the first time on the hosted page or with documents you uploaded.
Find out what is required
1.
The reason. Read failure_reason in the customer.kyc.status.failed webhook, or remark on the basic row. It holds the reviewer's comment, the reasons as sentences, or only Verification failed.
2.
The detail. Read rejectLabels and reviewRejectType in the review status that GET /v1/customers/{customer_id}/kyc/status returns.
Wait for customer.kyc.status.completed or customer.kyc.status.failed, as you did the first time.
If the customer record was wrong
If a name, date of birth or address on the customer was wrong, fix it first with PUT /v1/customers/{customer_id}. Only the fields you send change, and you cannot blank a field. Editing the record does not reset KYC.
What can go wrong
Response
Why
Fix
The start returns the old, expired link
You reused the first key, so Gravv replayed the stored response
Use a new key
409 KYC_ALREADY_COMPLETED: … on start-s2s or upload-document
He was approved already, for example by an earlier retry. Once KYC is completed, his documents can't be replaced
You don't need to do anything
409 KYC_IN_PROGRESS: … on start-s2s
The review of an earlier start is still running, so Gravv refuses a second submission and does not bill it
Wait for its webhook, or poll GET /v1/customers/{customer_id}/kyc/status
400 DOCUMENT_REJECTED: … on start-s2s
The review refused the new file. The message names its type, its document_id and the reason
Upload a corrected file with the same idDocType and idDocSubType, then start again with a new key
400 SUBMISSION_INCOMPLETE: … on start-s2s
The review refused the submission, for example because a document it needs is missing. KYC stays unsubmitted
Upload what the message asks for, then start again with a new key
The same rejection again
You sent the same file again, or replaced a different side or type
Read rejectLabels, then replace that exact type and sub-type
failed again with reviewRejectTypeFINAL
The reviewer made a final decision
Contact support. Do not keep resubmitting, because Gravv bills each server-to-server start
PUT 400 only company emails are allowed when changing an individual's email
The company-email rule applies to individuals on update too, a known issue
Change only the fields that were wrong. Contact support if the customer needs a free-mail address
PUT 400 failed to update customer: email already exists
The email belongs to another customer
Use another email
Webhooks you will receive
You receive customer.kyc.status.pending on the restart, then customer.kyc.status.completed or customer.kyc.status.failed with failure_reason. See Customer and KYC events.
Testing in sandbox
You cannot test this recipe end to end in sandbox. Sandbox completes every finished review, so it never produces a failed row or a failed webhook. You can test the calls. A start from pending with a new key returns a new link.