KYC API: how it works
A KYC API adds identity verification to your product without building camera screens, document checks or face matching yourself. This is the whole lifecycle, with the calls.
A KYC API is a service your backend calls to verify a user's identity. You create a verification, send the user to a hosted capture flow for their document and selfie, and get back a result: verified or not, ideally as a signed token you can check yourself, plus the identity record for your files.
The lifecycle
- Create a verification from your backend with your secret key. You pass your own user reference and where to send the user back.
- Redirect the user to the hosted flow. On a computer, a good flow hands over to the phone by QR code, because phone cameras take better document photos.
- The user verifies: consent, document country and type, document photos, selfie.
- Get the result: the user returns to your app with the result, and you confirm it from your backend.
- Keep the evidence your record keeping requires.
With Softeo
Create a verification and redirect to its verify_url:
curl -X POST https://softeolabs.com/v1/verifications \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{"return_url":"https://yourapp.com/kyc/done","ref":"user_123","state":"a1b2c3"}'
When the user returns with a token, verify it against the public keys:
import { createRemoteJWKSet, jwtVerify } from 'jose';
const jwks = createRemoteJWKSet(new URL('https://softeolabs.com/.well-known/jwks.json'));
const { payload } = await jwtVerify(token, jwks, {
issuer: 'https://softeolabs.com',
audience: process.env.SOFTEO_CLIENT_ID,
});
if (payload.kyc_verified) allow(user);
Then fetch the record for your files:
curl https://softeolabs.com/v1/verifications/VERIFICATION_ID/evidence \
-H "Authorization: Bearer sk_test_..."
The full reference is in the docs.
Webhooks or a signed token
Many KYC APIs deliver the result by webhook: an endpoint you host, secure, and keep up, that the provider calls later. It works, but it is one more moving part, and a missed webhook leaves a user stuck. Softeo returns the result with the user, as a signed token, and by API whenever you ask. There is no webhook to set up. Signed KYC attestations explains how the token is checked.
What to look for in a KYC API
- Completion rate: how many real users get through. Ask how the flow deals with blurry, dark and glare-hit photos.
- What you pay for: per attempt, or per passed check. Failed and abandoned checks add up.
- Data held: who stores the documents and selfies, where, and for how long. See privacy-preserving KYC.
- How you get the result: webhook only, or also a signed token and a polling API.
- Sandbox: can you test every outcome, not only the happy path?
- Coverage: the countries and document types your users have.
- What it does not do: screening, monitoring and case management may need another tool.
Questions
How long does it take to integrate a KYC API?
With a hosted flow the basic path is small: one call to create a verification, a redirect, and a token check on return. The Softeo quickstart is four steps against the sandbox.
Do I need to build camera screens?
Not with a hosted flow. The user takes the photos on the provider's screens, on their phone.
Can I call a KYC API from my frontend?
Create verifications from your backend only: the API key is a secret. The user's browser only ever sees the verification link and, on return, the signed token.