Guides
Subscriptions
Create recurring payment plans and manage subscription lifecycles.
Subscriptions allow you to charge customers on a recurring basis. RoxPay supports both standalone subscriptions and "subscription on completion" (create a subscription after a one-time payment succeeds).
Creating a Subscription
POST /api/v4/subscriptions
curl -X POST https://app.roxpay.eu/api/v4/subscriptions \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"PlanName": "Premium Monthly",
"Amount": 2999,
"Currency": "EUR",
"Interval": "monthly",
"StartDate": "2026-08-01"
}'
Subscription on Completion
Attach a subscription to a payment link so that when the first payment settles, a recurring subscription is automatically created:
{
"Purpose": "Premium Plan - First month",
"Amount": 2999,
"Providers": ["RoxDirect"],
"AutoCapture": true,
"AllowTokenization": true,
"SuccessRedirectUrl": "https://yourshop.com/success",
"FailureRedirectUrl": "https://yourshop.com/failure",
"CancelRedirectUrl": "https://yourshop.com/cancel",
"SubscriptionOnCompletion": {
"PlanName": "Premium Monthly",
"Amount": 2999,
"Interval": "monthly"
}
}
Constraints for Subscription on Completion
| Rule | Detail |
|---|---|
| Provider | RoxDirect only |
| AutoCapture | Must be true |
| AllowTokenization | Must be true (card must be saved for future charges) |
Managing Subscriptions
# List subscriptions
curl -X GET https://app.roxpay.eu/api/v4/subscriptions \
-H "Authorization: Bearer YOUR_TOKEN"
# Get subscription plan
curl -X GET https://app.roxpay.eu/api/v4/subscriptions/SUBSCRIPTION_UUID/plan \
-H "Authorization: Bearer YOUR_TOKEN"
# Update subscription status (pause, cancel, resume)
curl -X PUT https://app.roxpay.eu/api/v4/subscriptions/update/SUBSCRIPTION_ID \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "Status": "cancelled" }'
Subscription Statuses
Check available statuses:
curl -X GET https://app.roxpay.eu/api/v4/info/subscriptions-statuses \
-H "Authorization: Bearer YOUR_TOKEN"