Skip to main content

Webhooks

Webhooks notify your server in real-time when transaction events occur — completions, failures, refunds, and more.

Setting Up Webhooks

Via Dashboard

  1. Go to Settings > Webhooks in the Partner Dashboard
  2. Click Add Endpoint
  3. Enter your endpoint URL
  4. Select the events you want to receive
  5. Save and note the signing secret

Via API

Webhook Payload

All webhooks follow this structure:

Verifying Signatures

All webhooks include an HMAC signature in the X-Webhook-Signature header. Always verify this signature.

Node.js

Python

Transaction Events

Partner Metadata in Webhooks

Every webhook payload includes a metadata object on the order. If you passed partnerMetadata when creating a checkout intent, or metadata when creating a session, it appears under metadata.partnerMetadata:
System keys (provider, providerOrderId, email, paymentMethodId) are reserved and cannot be overwritten by partner data. Your data is always safely namespaced under partnerMetadata.

How metadata flows

Extracting your data from a webhook

Handling Events

Retry Policy

Failed webhook deliveries are retried with exponential backoff: After 7 failed attempts, the webhook is moved to the dead-letter queue.

Dead-Letter Queue

Failed webhooks are stored in the dead-letter queue for manual review:

Best Practices

1. Respond Quickly

Return a 2xx response as soon as possible. Process the event asynchronously:

2. Handle Duplicates

Webhooks may be delivered more than once. Use idempotency:

3. Verify Signatures

Always verify the webhook signature before processing.

4. Use HTTPS

Webhook endpoints must use HTTPS in production.

5. Log Everything

Log webhook events for debugging: