Manage customer subscriptions, renewals, upgrades, downgrades, and subscription lifecycle.
/api/subscriptions
The Subscriptions API provides comprehensive endpoints for managing product subscriptions including creation, renewal, suspension, termination, and plan modifications. Supports bulk operations, domain management, and attestation.
Gets all subscriptions with OData filtering and pagination.
| Parameter | Type |
|---|---|
| $filter | string |
| $orderby | string |
| $skip | integer |
| $top | integer |
{
"value": [
{
"id": "sub_123",
"customerId": "cust_456",
"offerId": "offer_789",
"status": "active",
"quantity": 5,
"startDate": "2026-01-01",
"renewalDate": "2026-07-01",
"createdAt": "2026-06-02T10:30:00Z"
}
],
"count": 50
}
Gets aggregated subscription metrics and statistics.
| Parameter | Type |
|---|---|
| startDate | date |
| endDate | date |
| groupBy | string |
{
"totalSubscriptions": 1000,
"activeSubscriptions": 800,
"suspendedSubscriptions": 150,
"terminatedSubscriptions": 50,
"totalMRR": 50000.00
}
Gets subscription details by ID.
{
"id": "sub_123",
"customerId": "cust_456",
"offerId": "offer_789",
"status": "active",
"quantity": 5,
"startDate": "2026-01-01",
"renewalDate": "2026-07-01",
"createdAt": "2026-06-02T10:30:00Z"
}
Creates new subscription.
{
"customerId": "cust_456",
"offerId": "offer_789",
"quantity": 5,
"startDate": "2026-06-02",
"billingCycle": "monthly",
"autoRenewal": true
}
{
"id": "sub_123",
"status": "active",
"createdAt": "2026-06-02T10:30:00Z"
}
Updates subscription details.
{
"quantity": 10,
"autoRenewal": false
}
{
"id": "sub_123",
"updatedAt": "2026-06-02T11:00:00Z"
}
Deletes subscription (soft/hard delete).
{
"success": true,
"message": "Subscription deleted"
}
Syncs subscription with external system.
{
"success": true,
"message": "Subscription synced"
}
Suspends subscription.
{
"subscriptionId": "sub_123",
"reason": "Payment failed"
}
{
"id": "sub_123",
"status": "suspended"
}
Reactivates suspended subscription.
{
"subscriptionId": "sub_123"
}
{
"id": "sub_123",
"status": "active"
}
Terminates subscription.
{
"subscriptionId": "sub_123",
"reason": "Customer request",
"effectiveDate": "2026-06-15"
}
{
"id": "sub_123",
"status": "terminated",
"terminationDate": "2026-06-15"
}
Upgrades subscription quantity.
{
"subscriptionId": "sub_123",
"newQuantity": 10,
"effectiveDate": "2026-06-02"
}
{
"id": "sub_123",
"quantity": 10
}
Downgrades subscription quantity.
{
"subscriptionId": "sub_123",
"newQuantity": 3,
"effectiveDate": "2026-06-02"
}
{
"id": "sub_123",
"quantity": 3
}
Changes subscription plan/offer.
{
"subscriptionId": "sub_123",
"newOfferId": "offer_999",
"effectiveDate": "2026-07-01"
}
{
"id": "sub_123",
"offerId": "offer_999"
}
Renews subscription for next period.
{
"id": "sub_123",
"renewalDate": "2026-07-01"
}
Generates invoice for subscription renewal.
{
"invoiceId": "inv_123",
"amount": 999.99
}
Renews multiple subscriptions.
{
"subscriptionIds": ["sub_123", "sub_124", "sub_125"]
}
{
"renewed": 3,
"failed": 0
}
Processes all subscriptions due for renewal.
{
"processed": 150,
"failed": 5
}
Gets domains associated with customer subscriptions.
{
"domains": [
{
"domain": "example.com",
"subscriptionId": "sub_123",
"status": "active"
}
]
}
Exports subscriptions to CSV or Excel.
{
"format": "csv",
"filters": {
"status": "active"
}
}
File download (CSV/Excel)