POST to your webhook URL each time a verification changes status. Your handler checks the signature, stores the event, and responds with 200 OK.
Setup
Set the webhook URL and generate the webhook secret in the Backoffice (Production, Sandbox). Each environment has its own URL and secret.- The URL must use
https. It cannot contain credentials or point tolocalhostor a private IP address. For local development, expose your handler through a public HTTPS tunnel. - pawaPass generates the secret. You cannot choose your own.
- Set the URL before you create verifications. Events created while no URL is set are retried for a week and then dropped.
Events
Thetype field says which event it is.
VERIFICATION.STATUS_CHANGE
Sent each time the status changes: to STARTED, USER_DATA_COLLECTED, REVIEW, APPROVED, DECLINED or EXPIRED.
No webhook is sent when you create a verification. The create response is your record of CREATED. A re-review can move an APPROVED or DECLINED verification back to REVIEW, which sends this event again. See Verification lifecycle.
VERIFICATION.IDENTITY_DOCUMENT_CHANGE
Sent when a pawaPass agent corrects the document data of an approved verification, for example a typo in a name. data.identityDocument holds the corrected data.
Verify the signature
Each request has anX-SIGNATURE header: the HMAC-SHA256 of the raw request body, keyed with your webhook secret and written as lowercase hex.
Compute the HMAC over the bytes you received, before you parse the JSON. Parsing and serializing the body again changes the bytes and the signature no longer matches. Reject a request with a missing or wrong signature.
notificationId you process and ignore one you have already seen: that handles retries and replays alike.
Respond and retry
- Respond with any
2xxstatus within 30 seconds. A different status, or no response in time, counts as a failure. Store the event and process it afterwards, so a slow step does not cause a retry. - A failed event is retried, with up to 55 attempts in total over about a week. The delay starts at 1 second, doubles each time up to 4 hours, and varies by up to 25% either way. After the last attempt the event is dropped.
- Events are not ordered. Each one is retried on its own schedule, so a failed
STARTEDcan arrive after theAPPROVEDthat followed it. Comparedata.updatedAtwith what you stored and ignore older events. datais a snapshot from the moment of the event. A retry sends the same snapshot, signed with the secret that is current at the time of the attempt.- Route each event by its
type. New types can be added, so ignore atypeyou do not handle and still respond with200 OK.
APPROVED, DECLINED or EXPIRED.
Rotate the secret
Only one webhook secret is active at a time, and a new one takes effect as soon as you generate it. To rotate without failed deliveries:- Change your handler to accept a signature made with either the current secret or a second one.
- Generate the new secret in the Backoffice and add it to your handler as the second secret.
- Once deliveries pass with the new secret, remove the old one.
Payload
Every event has the same envelope.data is the verification as it was when the event happened. The webhook payload reference lists every field.
Fields with conditions
Findings
findings lists the facts behind the verification’s final decision. When a reviewer decided, it is the reviewer’s list. For an automatic decision, it is the system’s list.
Only APPROVED and DECLINED verifications carry findings. The list is empty for every other status and for a decision with nothing to report. It can also be empty on verifications decided before the field existed.
An APPROVED verification can carry findings too. For example, UNDERAGE on an approval means a reviewer approved a holder below the market’s minimum age. Apply whatever limits your own rules set for such users.
A webhook created before the field existed, and delivered later on a retry, has no findings. Treat a missing findings as an empty list.
A verification a reviewer declined after the system flagged a screenshot:
Finding categories
A code can move to another category in a later release. The API returns the code’s current category, also for a verification decided earlier. A webhook carries the category the code had when the event happened.Finding codes
New codes and categories can be added at any time. Handle values you do not know, and branch oncategory and sensitive where you can.
Age estimation values
faceScan.ageEstimation is null when no estimate was stored, or one of:
