Appstle Loyalty webhooks deliver real-time HTTP POST notifications to your endpoint whenever a loyalty event occurs. The webhook infrastructure is powered by Svix, which provides automatic retries, cryptographic signature verification, and detailed delivery logs.Documentation Index
Fetch the complete documentation index at: https://appstleinc-aeca3e0a.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Webhooks are available on paid plans. Contact support@appstle.com to enable webhook access on your account.
Setting up an endpoint
Add an endpoint
Click Add Endpoint and enter your publicly accessible HTTPS URL. Your endpoint must be reachable from the internet — localhost URLs will not work.
How delivery works
Each webhook is an HTTP POST request with a JSON body. Svix handles delivery with:- Automatic retries with exponential backoff (5 attempts over 3 days on failure)
- Unique message IDs for idempotency
- Signed request headers for verification
- Delivery logs and manual replay from Settings → Webhooks → Message Logs
Event types
| Event type | Description |
|---|---|
loyalty.sign-up | Customer joined the loyalty program |
loyalty.earned | Customer earned points for any activity |
loyalty.redeemed | Customer redeemed points for a reward |
loyalty.credits-earned | Customer earned store credits |
loyalty.vip-tier-achieved | Customer reached a new VIP tier |
loyalty.birthday-trigger | Customer’s birthday reward was issued |
loyalty.referral-reward | Referring customer received a referral reward |
loyalty.referred-reward | Newly referred customer received their welcome reward |
Payload structure
All events follow the same envelope:Common payload fields
Every event’sdata object includes these fields:
| Field | Type | Description |
|---|---|---|
customerId | Number | Shopify customer ID |
customerEmail | String | Customer’s email address |
note | String | Optional description of the event |
points | Number | Points involved (earned or redeemed amount) |
earnRuleId | Number | Earn rule ID that triggered points (loyalty.earned only) |
redeemRuleId | Number | Redemption rule ID used (loyalty.redeemed only) |
webhookEventType | String | Internal event type name |
customerLoyaltyDetails | Object | Full loyalty profile snapshot at the time of the event |
customerLoyaltyDetails fields
| Field | Type | Description |
|---|---|---|
availablePoints | Number | Current redeemable points balance |
pendingPoints | Number | Points awaiting approval |
creditedPoints | Number | Total lifetime points earned |
spentAmount | Number | Total amount spent by this customer |
storeCreditBalance | Number | Current store credit balance |
currentVipTier | String | Customer’s current VIP tier name (empty if none) |
vipTierExpiredAt | DateTime | When the VIP tier expires (if applicable) |
referralLink | String | Customer’s unique referral URL |
referredCompleted | Number | Number of completed referrals |
dob | Date | Date of birth in ISO 8601 format (if set) |
rewards | Array | Active and past reward objects |
rewardedForFacebook | Boolean | Facebook follow reward earned |
rewardedForTwitter | Boolean | X/Twitter follow reward earned |
rewardedForInstagram | Boolean | Instagram follow reward earned |
rewardedForYoutube | Boolean | YouTube subscribe reward earned |
rewardedForTiktok | Boolean | TikTok follow reward earned |
rewardedForNewsLetter | Boolean | Newsletter signup reward earned |
rewardedForSms | Boolean | SMS signup reward earned |
rewardedForCreatingAccount | Boolean | Account creation reward earned |
rewardedForSharingOnFacebook | Boolean | Facebook share reward earned |
rewardedForSharingOnX | Boolean | X/Twitter share reward earned |
Webhook payloads include additional fields (such as
storeCreditBalance, vipTierExpiredAt, rewardedForSharingOnFacebook, and rewardedForSharingOnX) that are not available in the Shopify Flow GraphQL schema. Flow receives a subset of these fields.rewards array contains:
| Field | Type | Description |
|---|---|---|
description | String | Reward description |
discountCode | String | Generated Shopify discount code |
status | String | UNUSED, USED, or REFUNDED |
pointTransactionId | Number | Point transaction ID |
pointRedeemRuleId | Number | Redemption rule ID used |
orderId | String | Shopify order GID where reward was used |
orderName | String | Order name (e.g., #1002) |
createAt | DateTime | When the reward was created |
usedAt | DateTime | When the reward was used (if applicable) |
expireDate | DateTime | When the reward expires |
variantId | String | Shopify variant GID (for free product rewards) |
Example payloads
loyalty.sign-up — Customer joined the program
loyalty.sign-up — Customer joined the program
loyalty.earned — Customer earned points
loyalty.earned — Customer earned points
loyalty.redeemed — Customer redeemed points for a reward
loyalty.redeemed — Customer redeemed points for a reward
loyalty.vip-tier-achieved — Customer reached a new tier
loyalty.vip-tier-achieved — Customer reached a new tier
Signature verification
Every webhook request is signed by Svix. Always verify the signature before processing. Svix includes three headers on every request:| Header | Description |
|---|---|
svix-id | Unique message ID — use as an idempotency key |
svix-timestamp | Unix timestamp of delivery |
svix-signature | HMAC-SHA256 signature |
Idempotency
Webhooks may be delivered more than once due to network conditions or retries. Use thesvix-id header as an idempotency key to safely deduplicate events in your handler.
Retry schedule
If your endpoint returns a non-2xx response or times out, Svix retries with exponential backoff across 5 attempts over 3 days. View delivery attempts and replay individual events from Settings → Webhooks → Message Logs.
Local development
Use a tunneling tool such as ngrok to expose your local server during development:Troubleshooting
| Issue | Solution |
|---|---|
| Signature verification fails | Use the raw request body before JSON parsing. Confirm you are using the correct secret from the dashboard. |
| Not receiving events | Confirm webhooks are enabled under Settings and your account plan includes webhook access. |
| Endpoint timing out | Return 200 OK immediately and process events in a background job or queue. |
| Duplicate events | Use the svix-id header as an idempotency key and skip already-processed IDs. |