e-KYC API Reference
Base URL: https://api.ttpost.tt/v1/kyc
Authentication
All requests must include your API key in the Authorization header.
cURL
curl https://api.ttpost.tt/v1/kyc/... \ -H "Authorization: Bearer sk_test_kyc_..."
Quickstart
Create a verification session and redirect your user.
cURL
curl -X POST https://api.ttpost.tt/v1/kyc/verify \
-H "Authorization: Bearer sk_test_kyc_..." \
-H "Content-Type: application/json" \
-d '{"redirect_url":"https://yourapp.com/callback","reference":"u_123"}'
JavaScript
const res = await fetch('https://api.ttpost.tt/v1/kyc/verify', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_test_kyc_...',
'Content-Type': 'application/json',
},
body: JSON.stringify({
redirect_url: 'https://yourapp.com/callback',
reference: 'u_123',
}),
});
const { session_url } = await res.json();
window.location.href = session_url;
Endpoints
POST
/verify
Create a new verification session. Returns a hosted URL to redirect the user to.
| Parameter | Type | Description |
|---|---|---|
redirect_url | string | Where to POST the result webhook |
reference | string | Your internal user/transaction ID |
locale | string | Optional. en (default) |
GET
/status/{id}
Retrieve the current status of a verification session.
cURL
curl https://api.ttpost.tt/v1/kyc/status/ses_abc123 \ -H "Authorization: Bearer sk_test_kyc_..."
POST
/callback
TTPOST POSTs this payload to your redirect_url when verification completes.
{
"event": "kyc.verified",
"session_id": "ses_abc123",
"reference": "u_123",
"result": "verified",
"timestamp": "2026-08-26T14:22:00Z",
"signature": "sha256=..."
}
Webhooks
Verify the X-TTPOST-Signature header to confirm authenticity. Compute HMAC-SHA256 over the raw request body using your webhook secret.
Events: kyc.verified · kyc.failed · kyc.expired
Retry policy: 3 attempts with exponential backoff (1s, 10s, 100s).
Error codes
| Code | Meaning |
|---|---|
401 | Invalid or missing API key |
422 | Missing required parameter |
429 | Rate limit exceeded |
503 | Service temporarily unavailable |
SDKs
JS
JavaScript / Node
npm i @ttpost/kyc
🐍
Python
pip install ttpost-kyc
PHP
PHP
composer require ttpost/kyc