Testing document upload
How can you simulate uploading a customer's verification documents in the sandbox.
Overview
Bond gives you the ability to test uploading documents that may be required by the KYC process.
Testing document upload
Note
You must use the
333-33-2222
SSN as the trigger for forcing the KYC to request document uploads. For details see KYC trigger guide.
-
Use the `POST /customers/{customer_id}/verification-kyc' operation and provide the body parameters as shown in the table below.
Parameter Type Description program_id
requiredstring Program UUID, for example 72585109-8222-4221-b15b-48e87ffed790
.ssn
requiredstring Use only 333-33-2222
.phone
requiredstring Numeric or numeric/dashes, for example 555-111-2222
.phone_country_code
requiredstring Numeric, between 1 and 3 digits, for example 325
.email
requiredstring Valid email address, for example [email protected]
ip
requiredstring Valid IPV4 dot-separated address, for example 192.168.1.139
. -
You receive the response shown below :
{ "event": "kyc.verification.failure", "customer_id": "726a5c6b-41ac-498c-a2ff-5e2db9bebabf", "occurred_at": "2021-10-14T11:10:59.817419+00:00", "reasons": { "ofac": "passed", "bureau": "failed", "mobile": "passed", "ip": "passed", "email": "passed" } }
You also receive a webhook event (shown below) from the API that requests two documents:
{ 'government_id': { 'type': 'drivers_license', 'country': 'US', 'back_image': { 'file_name': 'license_back.png', 'image': '<base64-encoded string>' }, 'front_image': { 'file_name': 'license_front.jpeg', 'image': '<base64-encoded string>' } }, 'proof_of_address': { 'type': 'utility_bill', 'file_name': 'utility_bill.jpeg', 'image': '<base64-encoded string>' } }
-
You can upload the documents by either:
- Using the hosted flow upload links.
- Using the document upload API
- After uploading the first document a
kyc.verification.document_required
webhook event is
sent that indicates that the second document is missing. - After uploading the second document a
kyc.verification.under_review
webhook event is sent and KYC is left in thefailed
state.
-
If you wan to set the KYC overall status to
passed
, use thePOST /simulate/kyc-pass
as detailed in Setting KYC status to passed.
Updated about 2 years ago