API Documentation
Integrate any SaaS application with the Arionys central billing engine. Verify licenses, check subscriptions, gate features, and initiate dynamic checkouts — all via a single authenticated API.
Authentication
Generate an API Key inside the Admin Dashboard at /admin. Send it with every request using either header scheme:
x-api-key: sb_live_your_saas_product_key_here # Alternatively, Bearer scheme: Authorization: Bearer sb_live_your_saas_product_key_here
Integration Flow
Initiate Checkout Session
- Dynamic API Call: Your backend calls
/api/public/create-checkoutwith price, email, and tracking IDs. - Redirect to Billing: You receive a unique
checkoutUrland redirect your customer. - Complete Purchase: The user pays securely via the Paddle checkout overlay.
Return & Verify
- Return to E-Commerce: Paddle redirects the customer back to your successUrl after payment.
- Verify Securely: Call
/api/public/validate-subscriptionwith your API Key to confirm payment. - Fulfill Order: If
hasActiveSubscription: true, approve the order in your database.
Failures & Revocation
- Checkout Failures: Paddle handles failure messaging inside the modal — overlay stays open until success.
- Recurring Failures: Failed renewals fire a webhook, marking the subscription
past_dueand blocking API access. - Grace & Dunning: An automated email links the customer to
/portalto update payment.
/api/public/validate-subscriptionValidates if a customer has an active subscription to the calling SaaS product using their email address.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The customer email to look up on the billing engine. |
Example cURL
curl -X POST http://localhost:3000/api/public/validate-subscription \
-H "x-api-key: sb_live_analytics_saas_key_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{"email": "customer@example.com"}'Response JSON
{
"hasActiveSubscription": true,
"subscription": {
"paddleSubscriptionId": "sub_mock_subscription_123",
"status": "active",
"currentPeriodStartsAt": "2026-04-26T20:00:00.000Z",
"currentPeriodEndsAt": "2026-06-26T20:00:00.000Z",
"cancelAtPeriodEnd": false,
"plan": {
"name": "Hobby Plan",
"slug": "hobby",
"billingInterval": "monthly",
"features": {
"export_pdf": false,
"api_calls": 1000
}
}
}
}/api/public/verify-licenseValidates a customer's alphanumeric license key — perfect for desktop apps, integrations, or plugins.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| licenseKey | string | Yes | The license key to verify (e.g. LIC-XXXX-XXXX). |
Example cURL
curl -X POST http://localhost:3000/api/public/verify-license \
-H "x-api-key: sb_live_analytics_saas_key_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{"licenseKey": "LIC-ANALYTICS-MOCK-KEY-789"}'Response JSON
{
"isValid": true,
"status": "active",
"expiresAt": "2026-06-26T20:00:00.000Z",
"featuresAllowed": {},
"user": {
"email": "customer@example.com"
},
"subscription": {
"paddleSubscriptionId": "sub_mock_subscription_123",
"status": "active",
"currentPeriodEndsAt": "2026-06-26T20:00:00.000Z"
}
}/api/public/get-feature-accessChecks feature access and can dynamically increment metered usage (e.g. API call counters) on the central engine.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| licenseKey | string | Yes | The customer license key. |
| featureKey | string | No | Specific limit key to inspect (e.g. api_calls). |
| incrementUsage | number | No | Amount to increment the metered usage this billing cycle. |
Example cURL
curl -X POST http://localhost:3000/api/public/get-feature-access \
-H "x-api-key: sb_live_analytics_saas_key_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"licenseKey": "LIC-ANALYTICS-MOCK-KEY-789",
"featureKey": "api_calls",
"incrementUsage": 1
}'Response JSON
{
"isAllowed": true,
"featureValue": 1000,
"type": "metered",
"limit": 1000,
"currentUsage": 1,
"remaining": 999,
"resetAt": "2026-06-26T20:00:00.000Z"
}/api/public/create-checkoutInitiates a dynamic checkout session — your app dictates price, currency, and interval. A hosted checkout link is returned.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The customer email. | |
| amount | number | Yes | Price amount (e.g. 49.99). |
| currency | string | No | Currency code (USD, EUR…). Defaults to USD. |
| title | string | Yes | Product title shown to the customer. |
| interval | string | No | Set to 'month' or 'year' for recurring. Omit for one-time. |
| source | string | No | Origin SaaS domain (e.g. my-saas.com). |
| reference | string | No | Your internal Order ID for tracking. |
| successUrl | string | Yes | URL to redirect the user after a successful purchase. |
Example cURL
curl -X POST http://localhost:3000/api/public/create-checkout \
-H "x-api-key: sb_live_analytics_saas_key_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"email": "customer@example.com",
"amount": 49.99,
"currency": "USD",
"title": "Pro License (1-Time)",
"description": "Unlimited access for life.",
"source": "my-cool-saas.com",
"reference": "order_001",
"successUrl": "https://my-cool-saas.com/thank-you"
}'Response JSON
{
"success": true,
"transactionId": "txn_01abc...",
"checkoutUrl": "http://localhost:3000/checkout/txn_01abc..."
}