POST requests whenever something happens in your loyalty program — a customer earns points, redeems a reward, or moves between VIP tiers.
Instead of polling the API, you register an endpoint URL and choose which events you care about. Mage Loyalty sends a signed JSON payload to your URL within seconds of the event occurring.
Requirements
- A Growth plan or above
- A publicly accessible HTTPS endpoint that can receive
POSTrequests
How it works
Create a webhook subscription
In the Mage Loyalty dashboard, go to Settings > Webhooks and create a new subscription. Provide your endpoint URL and select the events you want to receive.
Store your signing secret
When you create a subscription, a signing secret is displayed once. Copy and store it securely — you’ll need it to verify that incoming requests are genuinely from Mage Loyalty.
Receive and verify
When an event fires, Mage Loyalty sends a
POST request to your endpoint. Your server should verify the signature and then process the payload.Payload format
Every webhook request has the same top-level structure:| Field | Type | Description |
|---|---|---|
event | string | The event type (e.g. points.earned) |
shop | string | Your Shopify store identifier |
timestamp | string | ISO 8601 timestamp of when the event occurred |
data | object | Event-specific payload — varies by event type |
Request headers
Every webhook request includes these headers:| Header | Example | Description |
|---|---|---|
X-Webhook-Signature | sha256=a1b2c3... | HMAC-SHA256 signature for verification |
X-Webhook-Timestamp | 2026-02-18T12:00:00.000Z | Timestamp used in the signing string |
X-Webhook-Event | points.earned | The event type |
Content-Type | application/json | Always JSON |
User-Agent | MageLoyalty-Webhook/1.0 | Identifies the sender |
Retries
If your endpoint returns a non-2xx status code or the connection fails, the delivery is retried up to 3 times with exponential backoff.Testing
You can send a test webhook from the dashboard by clicking Test next to any subscription. Test events use the event typetest and contain a simple message payload.
Available events
| Event | Description |
|---|---|
points.earned | A customer earned points |
points.redeemed | A customer redeemed points for a reward |
customer.tier_upgrade | A customer moved up to a higher VIP tier |
customer.tier_downgrade | A customer moved down to a lower VIP tier |