Skip to main content
A webhook subscription registers a URL that Mage Loyalty calls whenever one of your selected loyalty events happens. Each subscription has its own signing secret, used to verify that deliveries genuinely came from Mage Loyalty.

Attributes

FieldTypeDescription
urlstringThe HTTPS endpoint that receives webhook deliveries
eventsstring[]The events this subscription is subscribed to. One or more of points.earned, points.redeemed, customer.tier_upgrade, customer.tier_downgrade
is_activebooleanWhether deliveries are currently sent to this subscription
descriptionstring | nullOptional label to help you identify the subscription
secretstringThe signing secret used to verify delivery signatures. Returned only when the subscription is created and when the secret is rotated, never on get, list, or update
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp
The secret is shown once, at creation and on rotation. Store it securely. If you lose it, rotate the secret to get a new one. See Verifying webhook signatures for how the secret is used.

Example

{
  "type": "webhook_subscription",
  "id": "whsub_abc123",
  "attributes": {
    "url": "https://example.com/webhooks/mage",
    "events": ["points.earned", "customer.tier_upgrade"],
    "is_active": true,
    "description": "Production points + tier sync",
    "created_at": "2024-01-01T00:00:00.000Z",
    "updated_at": "2024-01-01T00:00:00.000Z"
  }
}