Skip to main content
POST
billing.subscription.get

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string

Optional. A retry with the same key returns the stored result.

Maximum string length: 255
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
subscriptionId
string
required

The subscription, as returned by billing.subscriptions.list.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$

Response

The result

subscriptionId
string
required

The subscription's id.

status
enum<string>
required

Subscription state. Never "active" unless the billing account said so; anything unrecognized is "unknown".

Available options:
active,
trialing,
past_due,
paused,
canceled,
expired,
pending,
failed,
unknown
customerId
string

The customer it belongs to.

recurringAmount
object

Charge per billing period, before tax.

interval
enum<string>

Billing period unit.

Available options:
day,
week,
month,
year
intervalCount
number

Number of intervals between charges.

quantity
number

Units subscribed to.

cancelAtPeriodEnd
boolean

True when the subscription ends at the end of the current period.

currentPeriodEnd
string

End of the current paid period, ISO 8601.

nextBillingAt
string

Next charge time, ISO 8601.

canceledAt
string

When it was canceled, ISO 8601.

createdAt
string

When it was created, ISO 8601.