Setting up your webhook
- Go to the Webhooks tab in your Bitwage Business Account settings.
- Create and manage webhooks.
- Configure your endpoint URL and note the signing secret.
Webhook events
Webhook format
All webhooks are sent as POST requests with a JSON body:User KYC status update
Sent when a user’s KYC verification status changes.User payment status update
Sent when a user’s payment status changes. Includes the full payment object with allocation outputs. For merchant claim payments,data.claim_id contains the claim ID. For
non-claim payments, this field can be null.
claim_id. For
claim-linked payrolls, the related claim appears as invoice_id on each
payment item and in the payroll-level invoice_ids list.
Validating webhook signatures
It is strongly recommended to verify webhook signatures in production. Webhooks include anx-bitwage-signature HTTP header containing a SHA256
HMAC signature of the payload.
Verification steps
- Get the raw request body as a UTF-8 string.
- Compute the HMAC-SHA256 using your signing secret.
- Compare the computed signature with the
x-bitwage-signatureheader.
Python example
Best practices
- Return a 200 status promptly to acknowledge receipt. Process the event asynchronously if needed.
- Handle duplicates by checking for duplicate event IDs. Bitwage may retry delivery if your endpoint doesn’t respond with a 200.
- Verify signatures to ensure webhooks are genuinely from Bitwage.