extract) and verifies a profile (verify), two of the things Sahl does for lenders and banks. Bank connections and scoring are in the console. This is the real flow. For a longer example see the walkthrough, and to try the calls without code see Test in the sandbox.
Before you start
- Get the KYC calls enabled on your workspace. The
kyc:*scopes are allowlisted: Sahl switches them on per workspace, they are not self-serve. Request sandbox access. (The KYB, statements, webhook and document request scopes need no allowlisting.) - In the console open Developers (the API keys tab opens first), then New key. Tick
kyc:extractandkyc:verify. Copy the secret once. Keep it on your server.
SAHL_API_KEY. All samples use https://app.sahlfinancial.com/api, environment=sandbox and fake data. Use Sahl’s CIN specimen: download it with curl -s https://app.sahlfinancial.com/api/v1/sandbox/specimens/cin_recto -H "Authorization: Bearer $SAHL_API_KEY" -o cin-specimen.png. The Sandbox reads specimen documents only.
1. Read a document
Send 1 to 5 files (JPEG, PNG, WebP, TIFF or PDF, up to 30 MB each). Add areference (your id for the client) to file the result on a case.
fields, documents, field_count, checks, reader_unavailable and policy. With a reference it also has case_id and document_ids. See Read documents.
2. Verify the profile
Send thedocuments entries back as they came, with the fields you hold.
3. Read the verdict
passed is true when no critical check failed. critical_failures and flags list what needs a person. A file with no photo ID among its documents fails with required:photo_id, so send the entries from step 1. /v1/kyc/assess takes the same body and adds a risk assessment.
Because of the reference, the case, its documents and the verdict are filed on your workspace, where your staff see them under Cases and Documents.
Other calls
Once this works, the same key (with the right scope) reads a company’s KYB file (KYB Morocco), a bank statement (Bank statements), and asks an applicant for documents (Document requests). Register a webhook endpoint with Webhook endpoints.Next
Verify a profile
Every check, what it returns, how to read passed and flags.
Errors
Every status and code, with the fix.