Introduction
Webhooks are a way for Swervpay to provide real-time data to your application. They are HTTP callbacks that receive notification messages for events. When an event occurs, Swervpay sends an HTTP POST request to the webhook’s configured URL. Your endpoint should respond with a2xx status code to indicate that the event has been successfully received.
Creating a Webhook
You can create a webhook from the dashboard.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 tocard.contactless.activation.
Create a subscribed webhook:
- Use HTTPS.
- Return a
2xxresponse. - Be the only enabled webhook subscribed to
card.contactless.activationfor the business.
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 aX-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:- Retry from developer section of the dashboard
- Using webhook Retry API