This guide is about the subscription flow itself.
For Developer API endpoints and webhook event names, use the API reference and webhook docs.
Creating a subscription product
1
Create a product
Go to Products → Create Product and select Subscription as the product type.
2
Configure billing
Set the billing interval:
- Daily — charged every day
- Weekly — charged every 7 days
- Monthly — charged on the same day each month
- Yearly — charged annually
3
Set a trial period (optional)
Offer a free trial before the first charge:
- 7-day trial
- 14-day trial
- 30-day trial
- Custom duration
Handling failed payments
When a renewal payment fails, Shoppex follows four steps:- Retries automatically — 3 attempts over 7 days
- Notifies the customer — sends an email with a payment update link
- Marks as
past_due— the subscription continues during the grace period - Cancels — after all retries fail
Customer portal
Give customers control over their subscriptions through the Shoppex billing portal. Each customer receives a unique portal link in their confirmation emails where they can:- View billing history
- Update payment method
- Cancel subscription
- Download invoices
Webhooks
Subscribe to these events for subscription updates:
Shoppex supports more subscription webhook events than the short table above, including
subscription:updated, subscription:renewed, subscription:upcoming, and trial events.
See the Webhooks Guide for setup instructions.
Prorating
When customers upgrade or downgrade:- Upgrade: Shoppex charges the difference immediately
- Downgrade: Shoppex applies a credit to the next invoice
Shoppex calculates proration based on the days remaining in the current billing period.
Headless / Developer API checkout
Dashboard checkout and payment links already use Shoppex subscription products. For a custom frontend or backend-driven flow, start checkout withPOST /dev/v1/orders, not POST /dev/v1/payments.
subscription:created and subscription:renewed.
Custom fields such as
plan_type: monthly do not create subscriptions by themselves. Shoppex does not read them. They are plain metadata on the invoice. Recurring billing requires a real SUBSCRIPTION catalog product and the orders checkout path.Managing subscriptions through the API
The Dev API exposes full subscription management. Here are the most common operations:Webhooks
Get notified about subscription lifecycle events
Invoices
Understand the invoices generated by subscriptions