v1

latestOpenAPI 3.1.02026-07-24104338.0 KB
Plans

Archive a subscription plan

Archived plans can't be subscribed to, but existing subscriptions on the plan continue billing unchanged. Archiving is one-way and idempotent.

post/api/v3/subscriptions/plans/{planId}/archive

Path parameters

planIdstring uuid required

Response

Plan archived.

idstring uuid required
namestring required
type'FIXED' | 'VARIABLE' required

How a plan's billed amount is determined. FIXED — the plan carries a fixed price; every subscription bills it. VARIABLE — the plan carries only an asset; the amount is set per subscription at creation.

assetstring required

The plan's billing asset. Always present (equals price.asset for FIXED plans).

billingInterval'MONTHLY' | 'ANNUAL' required

How often the subscription is billed.

termCyclesinteger nullable

Number of billing cycles in the plan's term; null means it renews indefinitely.

gracePeriodstring required

ISO-8601 calendar period. Examples: P7D (7 days), P1M (1 month), P1Y (1 year). Sub-day precision is not supported.

status'ACTIVE' | 'ARCHIVED' required

ACTIVE — open for new subscriptions. ARCHIVED — closed to new subscriptions; existing subscriptions keep billing.

createdAtinteger required

Unix epoch seconds.

updatedAtinteger required

Unix epoch seconds.

Example response

{
  "asset": "USD",
  "price": {
    "amount": "29.00",
    "asset": "USD"
  },
  "gracePeriod": "P3D",
  "createdAt": 1748513400,
  "updatedAt": 1748513400
}