Skip to main content
Webhooks let your server receive automatic HTTP POST notifications when events happen in your TagPay account — such as a wallet credit, a transfer completing, or a new customer being created. Instead of polling the API for state changes, TagPay pushes event data directly to your endpoint.

Webhook modes

TagPay supports two delivery modes. Choose the one that fits your integration:

Legacy mode

All events are delivered to a single callbackURL configured on your merchant account. Simple to set up, but offers no per-event filtering or delivery tracking in the API.

Subscription mode

Subscribe to specific event types with dedicated endpoints. Supports delivery history, replays, and per-subscription testing. Recommended for production integrations.
You can also set the mode to BOTH to deliver events to your callback URL and all active subscriptions simultaneously.

Set your webhook mode

Use PUT /merchant/webhook/settings to switch between modes:
cURL
Valid values for webhookMode are LEGACY, SUBSCRIPTIONS, or BOTH.

Creating a subscription

Use POST /merchant/webhook/subscribe to register a URL that receives events for specific event types.
cURL
Response
Webhook URLs must use HTTPS in production. HTTP endpoints are blocked.

Managing subscriptions


Available event types

To retrieve the authoritative list of supported events from the API:
cURL

Webhook payload structure

All webhook deliveries POST a JSON body in this format:
For wallet events, the data object includes balance information:

Verifying webhook signatures

TagPay signs every webhook delivery so you can confirm it originated from TagPay and has not been tampered with. Two signature headers are sent with each request: Your merchant private key (available from GET /merchant/my-access-keys) is used as the signing secret.

Verify with Node.js

Always return a 200 status code promptly to acknowledge receipt. TagPay considers any non-2xx response a delivery failure and will retry.

Delivery history

View the delivery status of all webhook events for your account:
cURL
To inspect a specific delivery:
cURL

Replaying failed deliveries

If a delivery failed — for example, because your server was temporarily down — you can replay it:
cURL
This creates a new delivery record with a fresh payload signing and sends the original event data to the subscription’s URL.

Testing a webhook endpoint

Before going live, verify your endpoint handles events correctly using POST /merchant/webhook/test/:id, where :id is the subscription ID.
cURL
TagPay sends a test.webhook event to your endpoint and returns the HTTP status code and response time. The test payload looks like:

Retry behavior

When a delivery fails (non-2xx response or connection timeout), TagPay retries automatically with exponential backoff: After 3 failed attempts, the delivery is marked as failed and no further retries are made. Use the replay endpoint to manually retry failed deliveries.
TagPay enforces a rate limit of 100 webhook deliveries per minute per subscription. Deliveries that exceed this limit are not sent and are recorded as rate-limited failures.