Skip to main content

Introduction

Webhooks are HTTP callbacks that deliver Swervpay event notifications to your application. When an event occurs, Swervpay sends an HTTP POST request to the configured URL. Your endpoint should verify the delivery, enqueue or process it idempotently, and respond with a 2xx status code promptly. You can subscribe to card, collection, customer, payout, wallet, and bill events. See the resource-specific pages for payload examples and event behavior.

Creating a Webhook

You can create a webhook from the dashboard or with the create webhook API. Use the edit webhook API to change its URL, description, or subscribed events.

Contactless activation subscriptions

Contactless activation codes are confidential and are not sent to a webhook by default. To receive them, explicitly subscribe one enabled HTTPS webhook to card.contactless.activation. Create a subscribed webhook:
Or update an existing webhook:
The endpoint must:
  • Use HTTPS.
  • Return a 2xx response.
  • Be the only enabled webhook subscribed to card.contactless.activation for the business.
When no unique eligible subscription can be resolved, or delivery fails, Swervpay sends the activation code using the standard Swervpay email instead.
Supplying events when editing replaces the webhook’s stored event list. Include every event that should remain explicitly registered. Omitting events preserves the existing list.

Authentication

All webhook requests include a X-SWERV-SECRET header for verification. It should match the secret generated when creating the webhook. The confidential card.contactless.activation event uses an HMAC signature instead of X-SWERV-SECRET. See the card webhook documentation for its headers and verification procedure.

Retry

If a webhook fails, you have two main options to retry the failed delivery: