Webhooks let you receive real-time HTTP notifications when subscription events happen in your Appstle account. Instead of polling the API, you register an endpoint URL and Appstle sends an HTTP POST request to it whenever an event occurs. Appstle webhooks are powered by Svix, which provides automatic retries with exponential backoff, 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.
Getting started
Configure your endpoint
Log in to your Appstle dashboard, go to Settings → Webhooks, add your webhook endpoint URL, and select which events you want to receive.
Return 2xx quickly
Your endpoint must return a
2xx status code (e.g. 200 OK) to acknowledge receipt. Process the event asynchronously in a background job — slow responses will time out and trigger retries.Verify signatures
Every webhook request includes Svix signature headers. Always verify the signature before processing to ensure the request is authentic. See Signature verification below.
Event types
| Event type | Description | Payload type |
|---|---|---|
subscription.created | New subscription created | Subscription contract |
subscription.updated | Subscription details updated | Subscription contract |
subscription.activated | Subscription activated | Subscription contract |
subscription.paused | Subscription paused | Subscription contract |
subscription.cancelled | Subscription cancelled | Subscription contract |
subscription.next-order-date-changed | Next order date modified | Subscription contract |
subscription.billing-interval-changed | Billing frequency changed | Subscription contract |
subscription.billing-success | Payment processed successfully | Billing attempt |
subscription.billing-failure | Payment failed | Billing attempt |
subscription.billing-skipped | Billing cycle skipped | Billing attempt |
subscription.upcoming-order-notification | Upcoming order reminder sent | Billing attempt |
Payload structure
All webhooks use this envelope:Subscription contract payloads
The following events carry a full subscription contract indata:
subscription.created, subscription.updated, subscription.activated, subscription.paused, subscription.cancelled, subscription.next-order-date-changed, subscription.billing-interval-changed
Complete subscription contract payload example
Complete subscription contract payload example
Subscription contract fields
| Field | Type | Description |
|---|---|---|
id | String | Shopify GraphQL ID of the subscription contract |
status | Enum | ACTIVE, PAUSED, CANCELLED, EXPIRED, or FAILED |
nextBillingDate | Date | ISO 8601 date of next billing (YYYY-MM-DD) |
createdAt | DateTime | ISO 8601 timestamp when subscription was created |
updatedAt | DateTime | ISO 8601 timestamp of last update |
lastPaymentStatus | Enum | SUCCEEDED, FAILED, or null |
billingPolicy.interval | Enum | DAY, WEEK, MONTH, or YEAR |
billingPolicy.intervalCount | Integer | Number of intervals between billings |
billingPolicy.maxCycles | Integer | Maximum billing cycles (null = unlimited) |
billingPolicy.minCycles | Integer | Minimum billing cycles before cancellation is allowed |
lines.nodes | Array | Subscription line items |
customer | Object | Customer details |
customerPaymentMethod | Object | Payment method (credit card, PayPal, or Shop Pay) |
deliveryMethod | Object | Delivery method (shipping, local delivery, or pickup) |
discounts.nodes | Array | Applied discounts |
note | String | Internal subscription note |
customAttributes | Array | Custom key-value attributes |
Billing attempt payloads
The following events carry billing attempt data:subscription.billing-success, subscription.billing-failure, subscription.billing-skipped, subscription.upcoming-order-notification
- billing-success
- billing-failure
- billing-skipped
- upcoming-order-notification
Billing attempt fields
| Field | Type | Description |
|---|---|---|
id | Long | Unique identifier for this billing attempt record |
shop | String | Shopify store domain |
billingAttemptId | String | Shopify GraphQL billing attempt ID |
contractId | Long | Related subscription contract ID (numeric, no gid:// prefix) |
status | Enum | SUCCESS, FAILURE, SKIPPED, or PENDING |
billingDate | DateTime | ISO 8601 scheduled billing date |
attemptTime | DateTime | ISO 8601 actual attempt timestamp |
attemptCount | Integer | Number of billing attempts for this cycle |
graphOrderId | String | Shopify GraphQL order ID (if successful) |
orderId | Long | Shopify numeric order ID (if successful) |
orderName | String | Order name like #1234 (if successful) |
orderAmount | Double | Order total in shop currency |
retryingNeeded | Boolean | Whether automatic retry is scheduled |
billingAttemptResponseMessage | String | Error message if failed/skipped, null if successful |
inventorySkippedAttemptCount | Integer | Count of skips due to inventory issues |
partialLinesSkipped | Enum | Reason for partial line skipping: OUT_OF_STOCK, PRICE_CHANGE, etc. |
Signature verification
Every webhook request is signed by Svix. You must verify the signature before processing to ensure the request is authentic and has not been tampered with. Svix adds three headers to every request:| Header | Description |
|---|---|
svix-id | Unique message ID — use this for idempotency |
svix-timestamp | Unix timestamp when the message was sent |
svix-signature | Cryptographic signature |
Testing webhooks
Using Svix Play
- Go to Settings → Webhooks in your Appstle dashboard.
- Click on your endpoint.
- Use the Send Example feature to send a sample event.
- Verify your endpoint receives and processes the webhook correctly.
Local development
Use ngrok or localtunnel to expose your local server:https://abc123.ngrok.io/webhooks/appstle) as a webhook endpoint in your Appstle dashboard.
Retry schedule
If your endpoint does not return a2xx status code, Svix retries automatically using exponential backoff over 5 attempts across 3 days. Endpoints that fail consistently are automatically disabled to prevent wasted resources.
You can manually retry failed deliveries from the Svix dashboard, and view all delivery attempts in Settings → Webhooks → Message Logs.
Troubleshooting
| Problem | Solution |
|---|---|
| Signature verification fails | Use the exact signing secret from your dashboard. Do not modify the raw request body before verification. |
| Timeouts | Return 200 OK immediately and process the event in a background job. |
| Wrong status codes | Return 2xx for all successful receipts, even if you have business logic errors. |
| CSRF protection blocking webhooks | Exempt your webhook endpoint from CSRF checks in your web framework. |
| Duplicate events | Webhooks may be delivered more than once. Use the svix-id header to make your processing idempotent. |
svix-id of any failing message.