Skip to main content
Webhooks are outbound HTTP notifications Paylead sends when something happens in the platform: a Reward is created, validated, or paid out. They let the Program Manager react in real time without polling the API. Two principles to remember:
  1. The Webhook is a trigger, not a source of truth. Always re-fetch the underlying object via the API before acting on it.
  2. Ordering is not guaranteed. Events for the same object may arrive out of order. Trust the status returned by the API, not the sequence of events.

Payload structure

Every Webhook is a POST request with a JSON body containing four fields.

Event catalog

Paylead emits two parallel event families for Rewards: consumer-facing events and technical events. They are independent, each tracking a different perspective on the same lifecycle.
Use consumer-facing events to drive Consumer animation: push notifications, in-app Reward status updates, and any display visible to the Consumer. Technical events are for back-office processing (accounting, payout pipelines).
Track what the Consumer experiences in the bank app. These events fire when the Consumer’s view of a Reward changes, independently of Paylead’s internal processing.
Sent on every change to the internal processing status of a Cashback or Gift. Use these for back-office operations.
Sent when an Offer changes or approaches its limits. consumer_id and user_id are null for these events.
Sent when Paylead executes a payout batch for the Program. consumer_id and user_id are null for these events.
Do not subscribe to these events for new integrations.
  • Affiliation events (affiliation_*): Paylead no longer offers Affiliation.
  • scrapping_error: the bank synchronization failure event is deprecated.

Setting up your endpoint

Each event type is configured independently in Shift: you assign one HTTPS endpoint per event. The same endpoint URL can receive multiple event types.
Acknowledge with 200 before doing any heavy work. Push the event into your own queue and process asynchronously. Slow endpoints get retried and pile up in Paylead’s queue.

Securing your endpoint

Paylead offers three mechanisms to authenticate incoming Webhooks. They are all optional and can be combined on the same Program. Configure them per endpoint in Shift.

HMAC SHA-256

Paylead signs the raw request body with a shared secret (minimum 32 characters) using HMAC-SHA256. The signature travels in a dedicated header.
  • Signature header: X-paylead-signature-256, a hex digest (not base64).
  • Timestamp header (optional): X-paylead-timestamp, included in the signed string to protect against replay attacks.
  • Verification: recompute the HMAC with the same secret over the raw body and compare it against the header.
Sign and verify against the raw request body, not the parsed JSON. Re-serializing the body changes the bytes and breaks the signature.

Basic Auth

Paylead adds a standard Authorization: Basic <base64(username:password)> header to every request. Use this when your endpoint already handles HTTP Basic authentication.

Custom header

Paylead injects an arbitrary header with a static name and value defined at configuration time. Use this to pass a proprietary token your system expects, for example X-Api-Key: <value>.
On request, Paylead can also set up a mutual TLS (mTLS) flow for the Webhook calls it makes to your endpoint.

Reliability

A robust Webhook integration handles delivery failures and ordering surprises.

Retry policy

Paylead retries any delivery that returns a non-2xx response or times out. The current policy is 5 attempts maximum with an exponential backoff of 2^n minutes between attempts, where n is the attempt number. After the final attempt fails, the event is marked as failed. Failed events surface in Shift for manual replay.
This retry schedule is the current default and may evolve. Build your handler so it tolerates a stricter or looser cadence: what matters is that you ack quickly and re-fetch the object via the API.

Ordering

Ordering is not guaranteed. Paylead does not promise that reward_validated arrives after reward_created at your endpoint.Building business logic that assumes “reward_created always comes first” will eventually break.

Re-fetch before acting

Webhooks reflect state at the moment of dispatch. Between dispatch and your handler running, the underlying object may have moved on. Always issue an API call to read the current state before triggering money movement or notifications.
Test in sandbox first. The sandbox environment replays the full Webhook flow against your endpoint with synthetic transactions. Use it to verify signature validation and your retry behaviour before exposing a production endpoint. Sandbox is also the only safe place to deliberately return 500 responses and watch how Paylead retries.

Common pitfalls

What’s next

Versioning

The mandatory X-Api-Version header and the version policy.

Rate limits

Per-token request limits and backoff strategy.