Retrieve a subscription
Return a single subscription belonging to your account.
Authorization
ApiKey API key issued to the partner, sent with the Bearer prefix — for example: Authorization: Bearer su_key_9f2c4d1ab3….
Keys minted on the live instance are prefixed su_key_ and keys minted on sandbox su_test_key_. The two instances keep separate key tables and separate hosts, so a sandbox key sent to the live host — or the reverse — answers Invalid API key. rather than falling back to the other environment.
In: header
Path Parameters
UUID of the subscription.
uuidResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/"{ "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627", "status": "pending_checkout", "is_active": true, "client": { "phone": "string", "full_name": "string", "email": "string", "address": "string", "billing": { "business_name": "string", "email": "string", "address": "string", "pan_vat": "string" }, "shipping": { "phone": "string", "full_name": "string", "email": "string", "address": "string" } }, "product": { "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1", "name": "string", "plan_name": "string", "pbp_id": "string", "label": "string", "price": "string", "currency": "string" }, "current_period_start": "2019-08-24T14:15:22Z", "current_period_end": "2019-08-24T14:15:22Z", "next_billing_cycle": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}Update a subscription's next billing cycle POST
Move a subscription's next billing date. The date must be today or later, and one-time purchases cannot be rescheduled. Unlike cancel and resume, the subscription is named in the body rather than the path, so this endpoint never returns 404: an unknown or inactive `subscription_id` comes back as a 400 keyed on that field. `next_billing_cycle` is sent as a plain date and stored as midnight Nepal time, which is why it reads back as a timestamp.
Cancel a subscription POST
Schedule cancellation at the end of the current billing period; the subscription stays usable until then. A subscription already cancelled or pending cancellation is returned unchanged (200), so a retry is safe. One-time purchases cannot be cancelled.