Subscriptions

Read an organisation's subscription, cancel it at the end of the paid period, and undo that cancellation.

To buy a subscription, see Checkout Sessions. An organisation holds at most one live subscription.

Read the subscription

curl -H "x-api-key: $KEY" -H "accept: application/json" \
  "$BASE/organizations/$ORG/subscription"
{
  "meta": {},
  "links": { "self": "/organizations/<org>/subscription" },
  "data": {
    "plan_key": "starter",
    "status": "active",
    "current_period_end": "2027-09-04T00:00:00.000Z",
    "cancel_at_period_end": false,
    "included_units": 8
  }
}

data is null when the organisation has no live subscription. That is not an error.

FieldMeaning
plan_keyThe plan: starter, growth or pro, or a negotiated plan key.
statuspending, incomplete, trialing, active, past_due or unpaid.
current_period_endWhen the paid period ends. null while pending.
cancel_at_period_endtrue when the subscription stops at current_period_end.
included_unitsSupplier locations the plan credits per year. null for a negotiated plan.

Cancel at the period end

curl -X DELETE -H "x-api-key: $KEY" -H "accept: application/json" \
  "$BASE/organizations/$ORG/subscription"

The response has the same shape as GET, with cancel_at_period_end: true.

  • Stripe does not bill the renewal.
  • The subscription stays active until current_period_end.
  • The organisation keeps its plan allowance until current_period_end.
  • The call never cancels immediately.

Show the payer "Active until current_period_end" when cancel_at_period_end is true.

A cancelled subscription keeps its slot until current_period_end, so the organisation cannot buy a different plan before then. A checkout with a plan returns 409 CHECKOUT_SUBSCRIPTION_EXISTS. To change plan now, undo the cancellation and contact support: plan switching is not available yet.

Undo a cancellation

curl -X POST -H "x-api-key: $KEY" -H "accept: application/json" \
  "$BASE/organizations/$ORG/subscription/resume"

The response has cancel_at_period_end: false. The subscription then renews as normal.

Undo also clears an end date that staff set in the Stripe dashboard.

Undo the cancellation before current_period_end. After that date the subscription is canceled, and this call returns 404. Buy a new plan instead.

What does not change

Cancel and undo do not change:

  • the credit balance,
  • the credit ledger,
  • the plan allowance.

Undo does not add credits. Cancel does not remove credits.

When the period ends

Stripe ends the subscription at current_period_end. After that:

  • GET /organizations/:id/subscription returns data: null.
  • The plan allowance stops.
  • Credits in the balance stay.

Repeat calls

Both calls are safe to repeat. A second cancel, or an undo on a subscription that already renews, returns 200 with the current state.

Both responses show the new state at once. You do not need a second GET.

Errors

These apply to DELETE /organizations/:id/subscription and POST /organizations/:id/subscription/resume.

StatusCodeMeaning
400BAD_REQUESTThe id is not a UUID.
401The API key is missing or not valid.
403The key does not hold billing:write.
404NOT_FOUNDThe organisation is not in this key's scope.
404SUBSCRIPTION_NOT_FOUNDThe organisation has no live subscription.
409SUBSCRIPTION_NOT_CANCELLABLEThe subscription is pending or incomplete, it has no Stripe subscription yet, or it is a negotiated plan. Or Stripe applied the change, but reports a status this endpoint does not show, for example paused. details.status names the status.
502CHECKOUT_GATEWAY_REJECTEDStripe refused the request. Do not retry.
503CHECKOUT_UPSTREAM_ERRORfm-api could not reach Stripe, or Stripe rate-limited the call. Retry. Nothing changed.
503CHECKOUT_NOT_CONFIGUREDThis deployment has no Stripe gateway.

A pending subscription has a checkout in progress. An incomplete subscription has a first payment that did not succeed, and Stripe expires it after 23 hours.

Required scopes

CallScope
GET /organizations/:id/subscriptionbilling:read
DELETE /organizations/:id/subscriptionbilling:write
POST /organizations/:id/subscription/resumebilling:write

A parent organisation's key can act on its child organisations.