Managing Subscriptions through API
Subscriptions through API provide developers with detailed guide on how to handle subscription-related operations using API endpoints. This includes updating, retrieving, & cancelling subscriptions.
GET /subscriptions/list (List All Subscriptions)
{
"status": "<string>",
"data": {
"subscriptions": [
{
"id": "<string>",
"currentPeriodEnd": "2023-11-07T05:31:56Z",
"currentPeriodStart": "2023-11-07T05:31:56Z",
"cancelAtPeriodEnd": true,
"createdAt": "2023-11-07T05:31:56Z",
"status": "active",
"interval": "day",
"canceledAt": "2023-11-07T05:31:56Z",
"cancellationDetails": {
"comment": "<string>",
"feedback": "<string>",
"reason": "<string>"
},
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"createdAt": "2023-11-07T05:31:56Z",
"details": {
"avatar": "<string>"
},
"settings": {
"newsletter": true
},
"username": "<string>"
},
"cart": {
"id": "<string>",
"status": "ACTIVE",
"itemsInCart": 0,
"totalValue": 0,
"subtotal": 0,
"totalValueWithTax": 0,
"totalTax": 0,
"createdAt": "2023-11-07T05:31:56Z"
}
}
],
"count": 0
}
}GET /subscriptions/{subscriptionId} (Get Subscription by ID)
PATCH /subscriptions/{subscriptionId}/cancel (Cancel Subscription)
Last updated