What are Webhooks?
Webhooks are HTTP callbacks that notify your server when events happen in Shoppex — a paid order, a new subscription, a dispute. Instead of polling the API, your server receives events in real time.This page covers normal Shoppex event webhooks.
dynamic_webhook for DYNAMIC products is a separate fulfillment callback contract. See Dynamic Product Delivery.Setting Up Webhooks
Configure webhook endpoints in the Dashboard:Webhook Payload
All webhooks follow this structure:Dashboard test deliveries use the same
event / data / created_at envelope as live deliveries.
The payload values are synthetic examples, but Shoppex signs the raw JSON body the same way as a real delivery.Top-level webhook
created_at is a Unix timestamp.
Nested timestamps inside data can be ISO 8601 strings.Headers
Each webhook request includes these headers:| Header | Description |
|---|---|
Content-Type | application/json |
User-Agent | Shoppex-Webhook/1.0 |
X-Shoppex-Event | Event type (e.g., order:paid) |
X-Shoppex-Signature | HMAC-SHA512 signature |
X-Shoppex-Delivery | Unique delivery ID for deduplication |
Signature Verification
Always verify webhook signatures to ensure authenticity. Shoppex uses HMAC-SHA512:Testing Webhooks
Use the dashboard to send test events:Test
order:* deliveries include the main live fields you usually integrate against, for example gateway, total, total_display, currency, exchange_rate, crypto_gateway, apm_method, customer_email, and product context.Retry Policy
If your endpoint returns an error (non-2xx status) or times out, Shoppex retries automatically:| Delivery | Delay |
|---|---|
| Initial attempt | Immediate |
| Retry 1 | 2 minutes |
| Retry 2 | 4 minutes |
| Retry 3 | 8 minutes |
| Retry 4 | 16 minutes |
Best Practices
Return 200 quickly
Return 200 quickly
Process webhooks asynchronously. Return
200 OK immediately and handle the event in a background job.Handle duplicates
Handle duplicates
Webhooks may be delivered more than once. Use the
X-Shoppex-Delivery header to deduplicate.Verify signatures
Verify signatures
Always verify webhook signatures in production to prevent spoofing.
Use HTTPS
Use HTTPS
Always use HTTPS endpoints in production for security.
Next Steps
Webhook Events
Full list of event types and payload examples
Dynamic Delivery
Deliver digital products in real-time