KYB webhooks
Receive KYB status updates and reconcile the current case.
KYB events use the same Svix headers, raw-body verification, delivery ID, and retry behavior described in Webhooks.
Events
kyb.case.in_progress
IN_PROGRESS
The applicant started the case
kyb.case.in_review
IN_REVIEW
The applicant submitted the case for review
kyb.case.completed
COMPLETED
Review completed under the configured process
kyb.case.rejected
REJECTED
Review rejected the case
There is no public kyb.case.created event. Persist the POST /kyb/case response as the creation record. NOT_STARTED does not emit a status event.
Representative payloads
In review
{
"refId": "business-7f3d",
"status": "IN_REVIEW",
"previousStatus": "IN_PROGRESS"
}Completed
Rejected
Fields other than refId and status depend on the transition. Tolerate additive fields.
Payload type
Node.js handler
Register the route before global JSON middleware. Deduplicate on svix-id, not refId.
Processing example
For COMPLETED and REJECTED, retrieve GET /kyb/case/{refId}/details before applying your business decision.
Idempotency and ordering
Store every
svix-idwith a unique constraint.Expect duplicate and out-of-order deliveries.
Do not overwrite a newer local state with an older event.
Use the current case resource as the final authority.
Return
2xxafter durable storage and before slow business processing.
Testing
Use a fictional Sandbox case to verify:
A valid event returns
204.A changed body or invalid signature returns
400.Replaying the same delivery does not repeat a business action.
An out-of-order event does not move the case backwards.
A terminal event triggers case-detail retrieval.
Troubleshooting
Signature verification fails
Raw body, matching environment secret, and all three Svix headers
Event is delivered repeatedly
Endpoint response status and processing time
Case cannot be correlated
The original refId persisted from case creation
Payload lacks optional fields
Branch only on documented required fields and retrieve the case
Local and webhook statuses differ
Retrieve current case details and prefer the latest server state
Last updated