Skip to main content
GET
Error

Authorizations

Authorization
string
header
required

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.

Headers

X-Organization-Id
string

The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.

Path Parameters

id
string<uuid>
required

The subscription's id here, not the gateway's id for it.

Query Parameters

environment
enum<string>
default:live

Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.

Available options:
live,
test

Response

The subscription, with its lines and the gateway's capabilities.

What one of your customers is paying, mirrored from the gateway.

That word decides how to read every field below. The gateway is the source of truth about money; this is a local copy kept so an entitlement can be answered without a network call, joined to the rest of your data, and read while the gateway is unreachable. provider_synced_at is when the copy was last confirmed — null means never, which is what a checkout that was started and not completed looks like.

id
string<uuid>
customer_id
string<uuid>

Who is billed. A subscription always hangs off a customer, including when that customer is a team of one.

plan_id
string<uuid>

What they are subscribed to, as opposed to how it is billed — which is items. Entitlements are computed from the plan's features, so this always has exactly one answer.

status
enum<string>

In our vocabulary, never a gateway's spelling, so this does not change when you change gateway.

incomplete is created and not yet paid — no access. past_due is paid before and a payment has failed; whether that keeps access is a grace-period decision and not this field's. unknown means the adapter did not recognise what the gateway said: it is a reason to look, never a reason to charge anybody or to cut them off, and it deliberately does not read as active or as canceled.

Available options:
incomplete,
trialing,
active,
past_due,
paused,
canceled,
unknown
current_period_start
string<date-time> | null

The period paid for. Null together with the end, never one alone: an incomplete subscription has no period, and a made-up one is a date an entitlement expires on that nothing happens at.

current_period_end
string<date-time> | null
cancel_at_period_end
boolean

A cancellation that has been scheduled and has not happened. The subscription is still active until current_period_end, which is why this is its own field rather than a status.

canceled_at
string<date-time> | null

When it actually stopped. Null while it has not.

trial_ends_at
string<date-time> | null

Null when there is no trial — which is a different fact from a trial that ended, and only one of them should make a screen say a trial expired.

provider
enum<string>

Which gateway holds this subscription. Exactly one: that is who is charging the card.

Available options:
stripe
provider_account_id
string

The merchant account, as the gateway names it. Empty until a health check has asked who the keys belong to.

provider_subscription_id
string

The gateway's own id. Empty for a checkout that was started and never completed — a row that exists here and nowhere else, and the one state in which no act on this subscription is possible.

provider_synced_at
string<date-time> | null

When this copy was last re-read from the gateway, as opposed to when the row was last written. Null means never confirmed. A mirror that cannot say how stale it is would be claiming to be the source.

created_at
string<date-time>
updated_at
string<date-time>
items
object[]

The lines. Present on a single subscription, absent from the list.

capabilities
object

What a gateway can do beyond the minimum every gateway can do. Every flag defaults to false, so a provider that declares nothing is treated as the weakest one — silence is never a claim. Read it to stop offering an act that would be refused.

Every flag below is always present. The object is emitted whole or not at all: absent means this server has no adapter loaded for the gateway, and it never means "some flags were left out". A reader must therefore distinguish false from missing rather than testing for falsiness — a key that is not here is not a gateway that cannot do something, it is a question nobody asked.

mirror_refreshed
boolean

Present only on the answer to an act. true means the gateway was re-read afterwards and everything above is what it said. false means the act happened and the copy above is not (or not entirely) the gateway's answer — either the re-read did not get through, or it did and part of it could not be written down. mirror_stale_reason says which. Treat it as a reason to read again, never as a sign the act failed.

mirror_stale_reason
enum<string> | null

Present whenever mirror_refreshed is, and null when it is true — an absent field would leave you inferring that nothing is wrong.

provider_reread_failed — the gateway was not reachable after it accepted the act. Nothing above was updated; read again.

price_not_mapped_to_provider — the gateway named a price that is not mapped onto any price in this catalogue for this environment, so plan_id was left as it was while everything else was applied. This one matters: entitlements are computed from the plan, so until you map the price (see unmapped_provider_price_id) the customer keeps the plan they were on. Prices created in the gateway's own dashboard are the usual cause.

subscription_has_extra_lines — the gateway holds more priced lines than one, so which of them names the plan is not decidable and both plan_id and items were left as they were.

Available options:
provider_reread_failed,
price_not_mapped_to_provider,
subscription_has_extra_lines,
null
unmapped_provider_price_id
string | null

The gateway's own price id to map, when mirror_stale_reason is price_not_mapped_to_provider. Null otherwise.