How it works
1
Set a webhook URL
Set
webhookUrl when you create the session. The response returns a whsec_ secret for verifying signatures.2
Verify the signature
Check
X-Signature-256 against the raw request body. Reject requests with a missing or invalid signature.3
Fulfill once
Match the paid session to your order, verify the amount, and fulfill it only once.
Events
Each event includes the session ID, amount, currency, payment transaction hash, payer address, payment time, and the metadata you set on the session. The event name and session ID are also sent in the
X-Webhook-Event and X-Session-Id headers.
Verify the signature
verify-webhook.ts
payload, the X-Signature-256 header as signature, and your whsec_ secret as secret.
Next steps
Integration example
Create a session with a webhook URL.
Payment Router
Verify external wallet payments on-chain.