Last updated
These docs are intended for a developer audience.Dismiss

Create a KYC document gatherer link with the API

This topic describes how to integrate with the Rebilly Know Your Customer (KYC) product.

Prerequisites

  • This feature requires a subscription to the Rebilly KYC add-on.
  • You must create a customer in Rebilly before gathering their KYC documentation. Use the GetCustomer API to look up a customer or upsert a customer using the PutCustomer API. The KYC process compares customer data against data in documents to verify a match.

Gathering docs

Your AppCustomerRebillyalt[is rejected][is good]loop[For each document...]alt[status is fulfilled due to credit filesuccess][status is not fulfilled]Press to "KYC"create a "KYC Request"status fulfilledresponse with KYC gatherer linkredirect to KYC gathererProvide file (KYC document)File token referenceAnalyze document by reference tokenDocument rejected, correction suggestion (...)All goodRedirectYour AppCustomerRebilly
  1. Create a PostKycRequest.

    The following is a sample request body.

    {
      "documents": [
        {
          "type": "identity-proof",
          "faceProofRequired": true
        }
      ],
      "redirectUrl": "http://example.com",
      "customerId": "abc123"
    }
    

    The following is a sample response body.

    {
      "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
      "documents": [
        {
          "type": "identity-proof",
          "maxAttempts": 3,
          "faceProofRequired": true
        }
      ],
      "status": "pending",
      "redirectUrl": "http://example.com",
      "expirationTime": "2022-08-24T14:15:22Z",
      "createdTime": "2022-08-24T14:15:22Z",
      "updatedTime": "2022-08-24T14:15:22Z",
      "customerId": "abc123",
      "reason": "",
      "matchLevel": 2,
      "_links": [
        {
          "rel": "self",
          "href": "https://example.rebilly.com"
        },
        {
          "rel": "kycGatherer",
          "href": "https://verification.comply.services/?token=123"
        }
      ]
    }
    

    If the response status is fulfilled the process is complete, which might happen with an instant process such as a credit file lookup. The response includes a related link kycGatherer resource in the _links collection. Use the corresponding href value in the next step.

  2. Redirect the customer to the href value of that kycGatherer link. When the customer completes the process, they return to the redirectUrl with an info query parameter appended to the URL.

Webhooks

Use webhooks to stay updated about the status of KYC documents. Subscribe to these events:

kyc-webhooks-setup

Learn more about webhooks