Paytrie Developer Documentation
Integrations

Sumsub Reusable KYC

Import existing KYC verification from Sumsub

View as Markdown

If your users have already completed KYC verification through Sumsub with your platform, you can import their verification data to Paytrie. This eliminates the need for users to complete identity verification again.

Overview

Sumsub's Reusable KYC feature allows identity verification data to be shared between platforms. As a "Donor" platform, you generate a share token for a user's verification data, which Paytrie then imports as the "Recipient" platform.

Prerequisites

  • Your platform must be integrated with Sumsub
  • The user must have completed KYC verification on your platform
  • You must have API access to generate Sumsub share tokens
  • The user must already exist in Paytrie under your API key — create them first using generateApiLink with the same API key you'll use for the import
  • The Sumsub applicant must be enrolled and verified in the id-and-liveness verification level

Integration flow

Create API user in Paytrie

Register the user in Paytrie first using generateApiLink so the import can map the Sumsub applicant to an existing Paytrie user.

Generate share token

Use the Sumsub API to generate a share token for the user's verification data from an applicant verified in the id-and-liveness level.

Submit to Paytrie

Send the share token to the Paytrie import endpoint.

User verified

If successful, the user is automatically verified on Paytrie without additional KYC.

Quick start

1. Create the user in Paytrie

Create the Paytrie user first:

curl -X POST "https://api.paytrie.com/generateApiLink" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "phone": "4165551234",
    "dob": "1990-01-15",
    "address1": "123 Main Street",
    "address2": "Suite 100",
    "city": "Toronto",
    "province": "on",
    "postal": "M5V1A1",
    "occupation": "Software Engineer",
    "pep": false,
    "tpd": false
  }'

API Reference: Generate API Link

View complete request parameters and response schema

2. Generate a share token (Sumsub API)

Use the Sumsub API to generate a share token for a specific applicant that is verified in your Sumsub id-and-liveness level:

curl -X POST "https://api.sumsub.com/resources/applicants/{applicantId}/shareToken" \
  -H "X-App-Token: your-sumsub-token" \
  -H "X-App-Access-Sig: your-signature" \
  -H "X-App-Access-Ts: timestamp"

See the Sumsub documentation for complete details.

3. Import to Paytrie

Submit the share token to import the user's verification. If you don't set applicantIdentifiers.email for the applicant on Sumsub, you must include the user's email in the request body.

curl -X POST "https://api.paytrie.com/sumsubImportUser" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "share_token": "_act-sb-jwt-eyJHGCi........tN0.",
    "email": "john.doe@example.com"
  }'

When is email required? Sumsub only carries the user's email on the share token when your applicant was created with applicantIdentifiers.email set. If your integration doesn't set that field, the share token won't include an email, and Paytrie has no way to find the matching user without one in the request body.

API Reference: Import Sumsub User

View complete request parameters and response schema

Common errors

ErrorDescriptionSolution
Token expiredThe share token has expiredGenerate a new share token
Token invalidThe share token is malformedVerify the token format
Applicant not foundThe applicant doesn't exist in SumsubVerify the applicant ID
Verification incompleteThe user hasn't completed verificationEnsure KYC is complete before generating token
Share token not suitable for levelThe share token comes from a different Sumsub levelEnroll and verify applicants in id-and-liveness, then generate a new token
Email is required: the Sumsub share token does not carry an email...Your Sumsub applicant doesn't have applicantIdentifiers.email set, and you didn't include email in the requestPass the user's email in the request body (the same email you used in generateApiLink)
Email in request does not match the email on the Sumsub applicant.The email you sent and the email Sumsub has on the applicant differSend the email that matches the applicant on Sumsub, or call generateApiLink with the email Sumsub holds before importing
Unable to import: please complete registration on Paytrie before importing KYC.No Paytrie user exists for that email under your API keyMake sure you registered the user with generateApiLink first, using the same email and the same API key you're using for the import

Additional resources

On this page