Skip to content

Subscription plans

Subscription plans are reusable billing templates: they define what to charge, how often to bill, and any trial or contract terms. A plan's line items can reference your catalog (variants or bundles) or be defined ad hoc with a name and unit price, and the plan can add a setup fee, a trial period, a contract term, and an early termination fee. Flint charges the setup fee when a subscription starts. contract_term_months (1 to 120) and early_termination_fee_money are terms you agree with the buyer: Flint shows them at checkout and records them on each new subscription, but doesn't stop the buyer from canceling early and never charges the fee. early_termination_fee_money requires contract_term_months. See Collect an early termination fee. A plan can also offer several intervals for the buyer to choose from at signup, and one line can let the buyer choose its quantity, such as seats. Every money field on a plan must use the plan's currency.

One plan can be sold through multiple channels: create subscriptions against it directly, or pass its subscription_plan_id to a checkout session (with type: "subscription_plan") or payment link for Flint-hosted signup. To sell subscriptions on any product in a cart instead, use a subscription offer. A plan's status is active, inactive, or archived. Set status to inactive to stop new signups while current subscribers keep renewing, and back to active to sell it again. Archive a plan with DELETE once nothing bills or sells on it; archiving is permanent, and archived plans stay readable. See Stop selling a plan.

Note:

Start with the Subscription billing guide. For selling plans through hosted links, see subscription signup links.

Prepaid delivery cadence#

Set delivery_interval and delivery_interval_count together on create or PATCH. Null means one delivery per billing period. Omit both on PATCH to keep the cadence; send both as null to clear it. Every billing option must be a whole multiple in the same unit family, with 1 to 24 deliveries per period. Days/weeks and months/years are the two families. Prices of lines that ship are per delivery. Existing subscriptions keep their frozen terms. See Prepaid deliveries.

Replace plan line items#

line_items is an owned collection. Create a plan with inline items, then replace the collection with PATCH /v1/subscription-plans/{subscription_plan_id} and the plan's current expected_version.

JSON
{
  "expected_version": 3,
  "line_items": [{
    "type": "custom",
    "subscription_plan_line_item_id": "spli_01J00000000000000000000000",
    "name": "Monthly support",
    "unit_price_money": {"amount": 2500, "currency": "USD"},
    "quantity": 1
  }]
}

Include an existing subscription_plan_line_item_id to retain that item's identity. Omit the ID for a new item; Flint generates it. Members omitted from the array are removed. Duplicate IDs and IDs belonging to another plan are rejected. Omit line_items to keep the collection unchanged. An empty array or null is invalid because a plan needs at least one item.

Each ad hoc item supplies its name and price. Catalog items supply variant_id or bundle_id instead. A retained catalog item with the same source keeps its recorded price, tax, display, and fulfillment snapshot; omitting modifiers retains their recorded choices. Changing the source requires an explicit modifiers array and creates a fresh catalog snapshot. Existing subscriptions keep the line-item snapshots taken when they were created.

Replacement and scalar changes in the same request commit atomically. A missing version fence returns 400; a stale version returns 409 VERSION_CONFLICT with the plan's current version in details[0].current_version. Archived plans cannot be edited. Every item must use the plan currency and a quantity from 1 through 9999. Use the same Idempotency-Key and body to recover a lost response with the original new item IDs.

Buyer line quantity policy#

Each plan line accepts allow_quantity_adjustment, min_quantity, and max_quantity on create and collection replacement through PATCH. allow_quantity_adjustment defaults to false; at most one line per plan may set it to true. Bounds default to 1 and 9,999, must each be within that range, and must enclose the line's quantity. A plan with several lines does not automatically allow buyer adjustment.

JSON
{
  "type": "custom",
  "name": "Seats",
  "unit_price_money": {"amount": 1500, "currency": "USD"},
  "quantity": 2,
  "allow_quantity_adjustment": true,
  "min_quantity": 1,
  "max_quantity": 25
}

The policy is copied into new subscription lines and checkout terms. Editing a plan does not change an existing subscription's policy or a checkout's frozen terms. Bounds describe buyer permissions; merchants may set any subscription line quantity from 1 to 9,999. The adjustable line quantity is the seat count. There is no subscription multiplier or quantity_options.

Intervals and quantities#

billing_interval_options lists up to 12 distinct pairs of billing_interval and billing_interval_count. It must include the plan's own pair, which is the default. Send [] to offer only that pair. On PATCH, omission keeps its value and an array replaces it; changing the plan's billing_interval to a pair the stored options don't include needs the new options in the same request. Responses return the effective list with the plan's own pair first. Invalid options return 400 INVALID_REQUEST with INVALID_VALUE on billing_interval_options. These options apply to every plan, not only plans that ship.

Without a delivery cadence, every interval option bills the same line prices once per period: a USD 15.00 line bills USD 15.00 per month on monthly and USD 15.00 per year on yearly, before quantities, discounts, shipping, and tax. With a delivery cadence, the charge covers all deliveries in that period. For a different price per interval, create separate plans and move subscribers with change-plan. If the interval pair is omitted on a plan change, Flint keeps the current pair when the target offers it, otherwise selects the target plan's own default pair.

Creating or updating a plan with more than one option and no lines that ship returns meta.warnings[] with code billing_interval_options_same_price and severity warning.

The buyer chooses an interval and, when the plan has an adjustable line, that line's quantity at signup. Use change-quantity to change existing subscription lines. next_renewal changes merchant-selected quantities immediately without charging; period_end schedules them for the next charged renewal; prorated_now charges an eligible digital line's difference now. Buyers may use period_end or prorated_now within the frozen line bounds. Physical boxes use bundle lines, with the number of boxes as the line quantity.

Variant swaps#

A catalog line can list swap_variant_ids: up to 25 other variants of the same product that a subscriber may switch the line to after signup. [] means no swaps. Only variant lines can list swaps; bundle and ad hoc lines can't (400 INVALID_REQUEST). A subscriber can always swap back to the line's own variant_id. See Change cadence, quantity, and items.

Buyer plan changes#

plan_change_options lists up to 25 plans subscribers may switch to. Each entry requires subscription_plan_id and billing_starts: now starts and bills a new period with credit for unused paid item time; prorated_now keeps the current period and billing date and charges the target plan's items for the rest of the period, less that credit; next_renewal changes the plan immediately and charges its price on the next unpaid renewal; period_end keeps the current plan until the next charged renewal, then applies the target terms frozen at scheduling. You choose the timing for each target. Flint returns 409 ACTION_NOT_ALLOWED if you set prorated_now and either plan requires delivery.

JSON
{
  "expected_version": 3,
  "plan_change_options": [
    {"subscription_plan_id": "plan_01J00000000000000000000000", "billing_starts": "prorated_now"},
    {"subscription_plan_id": "plan_01J00000000000000000000001", "billing_starts": "period_end"}
  ]
}

Responses always include the list, defaulting to [], which turns buyer plan changes off. On PATCH, omission keeps the list; an array replaces it and requires expected_version. Send [] to clear it. null, duplicate targets, the plan itself, and targets in another currency are invalid. Unknown targets return 404 RESOURCE_NOT_FOUND; archived targets return 409 ACTION_NOT_ALLOWED with reason archived. You may save an inactive target, but buyers can choose it only after it becomes active. Archiving a referenced plan is allowed. Environment and sandbox copies remap copied targets and drop targets that weren't copied.

The merchant change-plan endpoint can use any eligible target, regardless of this list. Buyer options are further limited by the subscription's state and delivery requirements. A pending period_end change appears in the required nullable scheduled_plan_change snapshot. Buyers can clear only changes they scheduled themselves, using scheduled_plan_change: null when cancel_plan_change is available. See Schedule or clear a pending change for pauses, skips, archived targets, and edit restrictions.

Discounts#

Physical plans can't have a trial. Discount shipments with a promotion applied at signup: recurrence.type once covers the first shipment, repeating the first period_count charged cycles, and forever every cycle. See Discounts and first-shipment offers.

Gifts#

gifts_enabled lets checkout buyers name a gift recipient for the subscription they buy. It defaults to false. Each checkout session freezes it when it's created, so changing it doesn't affect sessions already open. With your API key you can set a subscription's gift_recipient whatever the plan says. See Gift subscriptions.

Physical products#

A catalog line whose variant or bundle is physical makes the plan ship every cycle. A catalog item with no kind counts as physical. Each renewal order then carries the subscriber's address, a shipping charge, tax for that address, and a fulfillment. See Ship physical products.

delivery_required is true when at least one line ships. subscription_delivery_method_ids lists the delivery methods subscribers can choose. Empty means the store's checkout default methods. Removing a method changes what new subscribers can choose; current subscribers keep it until it is archived or stops serving their address. delivery_method_subscription_counts reports, for each method that live subscriptions on the plan use, how many are active, paused, or past_due. The canceling and billing_hold counts describe subsets of active.

Create, line item changes, method changes, and trial changes validate the plan's physical lines:

ErrorCause
ACTION_NOT_ALLOWED with details[0].reason: configuration_requiredA physical line has no delivery profile.
ACTION_NOT_ALLOWED with details[0].reason: configuration_requiredA line's delivery profile needs an action before it can be used.
INVALID_REQUEST (NOT_ALLOWED)A line's profile allows only pickup. Subscriptions ship with shipment or local_delivery.
400 INVALID_REQUEST with detail code NOT_ALLOWED for request fields, or 409 ACTION_NOT_ALLOWED with reason configuration_required for stored configurationThe physical lines would ship separately, so one method can't cover a renewal.
INVALID_REQUEST (NOT_ALLOWED)No offered method can price every shipment without the buyer present, or a listed method uses caller_supplied pricing or delivery windows.
INVALID_REQUEST (NOT_ALLOWED)trial_period_days is above 0. Use a promotion for a first-shipment offer instead.

Each error names what failed with fields on its details[0]:

  • variant_id and product_id name a variant line, or the item inside a bundle line that failed.
  • blocking_resources can list the line's variant or bundle, with resource_type product_variant or bundle. A bundle line is always named this way.
  • delivery_method_id names a listed method that fails the check. A method that can't be used at all, such as an archived one, is named by delivery_method_id with no line fields.

The trial and combination checks, and a method that can't serve the lines, apply to the whole plan, so their line fields name the plan's first physical line. An error with none of these fields names the failing input in param only.

Stock source#

inventory_routing_source says where tracked stock for the plan's orders comes from. Its type picks one of three shapes:

typeID fieldStock comes from
fixed_locationlocation_idOne Location.
policyinventory_allocation_policy_idAn allocation policy.
policy_revisioninventory_allocation_policy_revision_idOne immutable revision of an allocation policy.
JSON
{
  "inventory_routing_source": { "type": "fixed_location", "location_id": "loc_01J00000000000000000000000" }
}

A policy source follows the policy's configuration as it is when each order is made. A policy_revision source keeps routing through that revision even after the policy's configuration changes. Take the revision ID from the policy's current_inventory_allocation_policy_revision_id, or list its revisions.

When any line item tracks inventory, an omitted source uses and stores settings.inventory.default_routing_source. If no default is set, Flint uses the active Location in the current environment that has had inventory allocation enabled the longest. The plan resolves that fallback again each time it is used. With no eligible Location and no default, creating such a plan without a source returns INVALID_REQUEST with param inventory_routing_source, and replacing line_items with tracked items on a plan that has no source returns 409 ACTION_NOT_ALLOWED with reason configuration_required on the plan. Neither saves anything. A plan whose lines don't track inventory can omit it, and a source you send anyway is validated and stored.

On PATCH, omit the field to keep the stored source. A new object replaces it as a whole, and the check runs against the plan's line items after any line_items replacement in the same request. The source can't be cleared: null returns 400 INVALID_REQUEST (detail INVALID_VALUE) on create and on update. A field from another type, or any other unknown field, returns 400 INVALID_REQUEST with detail UNKNOWN_FIELD and its full path in param, such as inventory_routing_source.location_id. An unknown type, a missing ID, or a malformed ID returns 400 INVALID_REQUEST on inventory_routing_source.

Responses include inventory_routing_source when the plan has one and omit it otherwise. A policy_revision source in a response also carries inventory_allocation_policy_id, the policy that revision belongs to, so you can read the revision with GET /v1/inventory-allocation-policies/{inventory_allocation_policy_id}/revisions/{inventory_allocation_policy_revision_id}. Requests don't accept that field: build a replacement source from its type and the one ID that type takes, instead of sending a stored source back whole. New subscriptions copy the plan's source when they're created, and new payment links for the plan copy it unless they send their own. Subscriptions and payment links that already exist keep the source they copied.

The Subscription plan object#

The recurring price and billing terms offered to customers.

Returned by GET /v1/subscription-plans/{subscription_plan_id} and carried by the endpoints below.

Attributes

billing_intervalenumRequired

Unit of the plan's default billing period. Read with `billing_interval_count`: monthly with a count of 3 bills every three months. A new subscription starts on the pair the buyer chose from `billing_interval_options`, or on this one when they chose none.

  • daily
  • weekly
  • monthly
  • yearly
billing_interval_countintegerRequired

Number of `billing_interval` units between charges on the plan's default pair.

billing_interval_optionsarray of objectRequired

Offered billing interval and count pairs, including the plan's default pair. Prices of lines that ship are per delivery. Each option charges for all deliveries in its period. Use separate plans or promotions for different prices per interval.

contract_term_monthsinteger

A commitment period you agree with the buyer, 1 to 120 months. Flint shows it at checkout and records it on each new subscription (contract_start_at, contract_end_at). Flint does not stop the buyer from canceling earlier.

created_atstringRequired

RFC3339 timestamp.

currencystringRequired

ISO 4217 currency code.

delivery_intervalenum or nullRequired

Delivery cadence. Null when no separate delivery cadence is set; one delivery is made per billing period. Every billing option must be a whole multiple in the same unit family (days/weeks or months/years), with 1 to 24 deliveries per period. Existing subscriptions keep their frozen cadence.

  • daily
  • weekly
  • monthly
  • yearly
  • null
delivery_interval_countinteger or nullRequired

Number of delivery intervals between deliveries. Null when no separate delivery cadence is set.

delivery_method_subscription_countsarray of objectRequired

How many of this plan's subscriptions use each delivery method, by status. Counts only subscriptions that are active, paused, or past due and have a delivery method.

delivery_requiredbooleanRequired

Whether any line on the plan needs delivery, so each renewal ships or delivers items. Flint works it out from the lines and sets it; you can't send it.

descriptionstring

Description of the plan. Omitted when none is set.

early_termination_fee_moneyobject

A fee you agree the buyer owes for canceling before the contract term ends. Flint shows it at checkout and records it on each new subscription, but never charges it. To collect it, charge the buyer yourself, for example with an order on their saved payment method. Requires contract_term_months.

end_afterobject or nullRequired

Default automatic end for new subscriptions. Counts charged billing cycles, from 1 to 1200. Send null for no automatic end. Existing subscriptions keep their recorded condition. Null when no default automatic end is set.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

gifts_enabledbooleanRequired

Whether checkout buyers can name a gift recipient. Checkout sessions freeze it when they are created. Defaults to false. You can set gift_recipient on a subscription through the API either way.

imagesarray of objectRequired

Images of the plan in display order. The first image is the plan's primary image.

inventory_routing_sourceobject

Where tracked demand from this plan is routed. New subscriptions and payment links for the plan copy it. Absent when the plan has no stored source, including when its demand uses the implicit single-Location fallback.

line_itemsarray of one of

The lines a subscription on this plan bills each period, in the order you set them. Flint copied each catalog line's details from the catalog when it added the line.

merchant_idstringRequired

ID of the merchant this resource belongs to.

metadatamap of string

Stored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.

namestringRequired

Name of the plan. Buyers see it at checkout and on their subscription.

plan_change_optionsarray of objectRequired

Plans subscribers may switch to, in display order, with the billing timing for each target. Empty means plan changes are off. Omission on PATCH keeps the options; an array replaces them and requires expected_version. Send [] to clear. Null is invalid.

setup_fee_moneyobject

One-time fee charged with the first payment of a new subscription, except one that continues an imported paid period. Omitted when the plan has no setup fee.

statusenumRequired

Active plans accept new signups. Inactive plans refuse new signups with ACTION_NOT_ALLOWED while existing subscriptions keep renewing. Archived plans are read-only and their status is set only by DELETE /v1/subscription-plans/{subscription_plan_id}.

  • active
  • inactive
  • archived
subscription_delivery_method_idsarray of stringRequired

IDs of the delivery methods a subscriber can choose for this plan's lines that ship. When empty, the delivery methods in your checkout settings apply.

subscription_plan_idstringRequired

Unique identifier for this subscription plan, prefixed `plan_`.

trial_period_daysinteger

Days of free trial before the first recurring charge. Omitted or 0 when the plan has no trial.

updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "billing_interval": "monthly",
  "billing_interval_count": 1,
  "billing_interval_options": [
    {
      "billing_interval": "monthly",
      "billing_interval_count": 1
    }
  ],
  "created_at": "2026-03-17T14:30:00Z",
  "currency": "USD",
  "delivery_interval": null,
  "delivery_interval_count": null,
  "delivery_method_subscription_counts": [],
  "delivery_required": false,
  "end_after": null,
  "gifts_enabled": false,
  "images": [],
  "line_items": [
    {
      "allow_quantity_adjustment": false,
      "name": "Membership",
      "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
      "quantity": 1,
      "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
      "swap_variant_ids": [],
      "swap_variants": [],
      "type": "variant",
      "unit_price_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
    }
  ],
  "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
  "metadata": {
    "segment": "gold"
  },
  "name": "Monthly Membership",
  "plan_change_options": [],
  "status": "active",
  "subscription_delivery_method_ids": [],
  "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
  "updated_at": "2026-03-17T14:30:00Z",
  "version": 1
}

List subscription plans#

GET/v1/subscription-plans

Requires scope commerce.subscription_plans.read or commerce.subscription_plans.write

Rate limit: read

Returns a paginated list of subscription plans for the authenticated merchant. Default order: created_at descending, then subscription_plan_id descending.

Query parameters

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.

statusarray of enum

Filter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.

  • active
  • inactive
  • archived
external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

querystring

Search across subscription plan ID, external reference ID, name, and description. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as plan_01.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by subscription_plan_id.

  • name
  • created_at
  • updated_at
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

A page of subscription plans.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/subscription-plans \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

A page of subscription plans.

JSON
{
  "data": [
    {
      "billing_interval": "monthly",
      "billing_interval_count": 1,
      "billing_interval_options": [
        {
          "billing_interval": "monthly",
          "billing_interval_count": 1
        }
      ],
      "created_at": "2026-03-17T14:30:00Z",
      "currency": "USD",
      "delivery_interval": null,
      "delivery_interval_count": null,
      "delivery_method_subscription_counts": [],
      "delivery_required": false,
      "end_after": null,
      "gifts_enabled": false,
      "images": [],
      "line_items": [
        {
          "allow_quantity_adjustment": false,
          "name": "Membership",
          "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
          "quantity": 1,
          "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
          "swap_variant_ids": [],
          "swap_variants": [],
          "type": "variant",
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
        }
      ],
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "metadata": {
        "segment": "gold"
      },
      "name": "Monthly Membership",
      "plan_change_options": [],
      "status": "active",
      "subscription_delivery_method_ids": [],
      "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6Y0F5BFYNFR1W2D54VKDX"
}

Create subscription plan#

POST/v1/subscription-plansIdempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Creates a subscription plan: the recurring price and terms customers sign up to. Send `name`, `currency`, the billing interval, and at least one line item from your catalog. An active plan accepts new signups; an inactive plan refuses them with `ACTION_NOT_ALLOWED` while existing subscriptions keep renewing. A free trial isn't allowed on a plan with lines that ship.

Request body

billing_intervalenumRequired

Unit of the plan's default billing period. Read with `billing_interval_count`: monthly with a count of 3 bills every three months. Add other choices with `billing_interval_options`.

  • daily
  • weekly
  • monthly
  • yearly
billing_interval_countintegerRequired

Number of `billing_interval` units between charges on the plan's default pair, up to 365.

billing_interval_optionsarray of object

Offered billing interval and count pairs, including the plan's default pair. Prices of lines that ship are per delivery. Each option charges for all deliveries in its period. Use separate plans or promotions for different prices per interval.

contract_term_monthsinteger

A commitment period you agree with the buyer, 1 to 120 months. Flint shows it at checkout and records it on each new subscription (contract_start_at, contract_end_at). Flint does not stop the buyer from canceling earlier.

currencystringRequired

ISO 4217 currency code.

delivery_intervalenum or null

Delivery cadence, set together with delivery_interval_count. Null when no separate delivery cadence is set; one delivery is made per billing period. Each billing option must be a whole multiple in the same unit family (days/weeks or months/years), with 1 to 24 deliveries per period. Existing subscriptions keep their frozen cadence. Omit both fields on PATCH to keep the cadence; send both as null to clear it.

  • daily
  • weekly
  • monthly
  • yearly
  • null
delivery_interval_countinteger or null

Positive number of delivery intervals between deliveries. Set or clear together with delivery_interval. Null when no separate delivery cadence is set; one delivery is made per billing period.

descriptionstring

Description of the plan, up to 2,048 characters. Omit for none.

early_termination_fee_moneyobject

A fee you agree the buyer owes for canceling before the contract term ends. Flint shows it at checkout and records it on each new subscription, but never charges it. To collect it, charge the buyer yourself, for example with an order on their saved payment method. Requires contract_term_months.

end_afterobject or null

Default automatic end for new subscriptions. Counts charged billing cycles, from 1 to 1200. Send null for no automatic end. Existing subscriptions keep their recorded condition. Null when no default automatic end is set.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

gifts_enabledboolean

Whether checkout buyers can name a gift recipient. Checkout sessions freeze it when they are created. Defaults to false. You can set gift_recipient on a subscription through the API either way.

imagesarray of one of

The complete desired gallery in display order. The first image is primary. Send [] to clear the gallery.

inventory_routing_sourceone of

Where tracked demand from this plan is routed: a fixed Location, an allocation policy, or an immutable policy revision. When omitted for tracked demand, Flint stores settings.inventory.default_routing_source if set. Otherwise, Flint uses the active Location in the current environment that has had inventory allocation enabled the longest. The plan resolves that fallback again each time it is used. If no Location is eligible, send a routing source or configure the merchant default. New subscriptions and payment links for the plan copy an explicit or stored default source, unless the payment link sends its own.

line_itemsarray of one ofRequired

The lines a subscription on this plan bills each period. At least one. Each line sells a catalog variant, a catalog bundle, or a custom item you price yourself.

metadatamap of string

Caller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.

namestringRequired

Name of the plan. Buyers see it at checkout and on their subscription. Required, and can't be empty. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

plan_change_optionsarray of object

Plans subscribers may switch to, in display order, with the billing timing for each target. Empty means plan changes are off. Omission on PATCH keeps the options; an array replaces them and requires expected_version. Send [] to clear. Null is invalid.

setup_fee_moneyobject

One-time fee charged with the first payment of a new subscription, except one that continues an imported paid period. Must be above zero and in the plan's currency. Omit for no setup fee.

statusenum

Active plans accept new signups. Inactive plans refuse new signups with ACTION_NOT_ALLOWED while existing subscriptions keep renewing. Archived plans are read-only and their status is set only by DELETE /v1/subscription-plans/{subscription_plan_id}.

  • active
  • inactive
subscription_delivery_method_idsarray of string

IDs of the delivery methods a subscriber can choose for this plan's lines that ship. Omit to use the delivery methods in your checkout settings.

trial_period_daysinteger

Days of free trial before the first charge, from 0 to 365; 0 means no trial. Not allowed on plans with lines that ship.

Response · 201

The created subscription plan.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl -X POST https://api.withflintpay.com/v1/subscription-plans \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "billing_interval": "monthly",
    "billing_interval_count": 1,
    "currency": "USD",
    "line_items": [
      {
        "quantity": 1,
        "type": "variant",
        "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
      }
    ],
    "metadata": {
      "segment": "gold"
    },
    "name": "Monthly Membership"
  }'

Get subscription plan#

GET/v1/subscription-plans/{subscription_plan_id}

Requires scope commerce.subscription_plans.read or commerce.subscription_plans.write

Rate limit: read

Returns a single subscription plan by ID.

Path parameters

subscription_plan_idstringRequired

Flint subscription plan ID. Must be a valid ID with prefix plan_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

The requested subscription plan.

Same response as Create subscription plan.

curl https://api.withflintpay.com/v1/subscription-plans/plan_01KEZF7C004CY5ZR33XST2AASV \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

The requested subscription plan.

JSON
{
  "data": {
    "billing_interval": "monthly",
    "billing_interval_count": 1,
    "billing_interval_options": [
      {
        "billing_interval": "monthly",
        "billing_interval_count": 1
      }
    ],
    "created_at": "2026-03-17T14:30:00Z",
    "currency": "USD",
    "delivery_interval": null,
    "delivery_interval_count": null,
    "delivery_method_subscription_counts": [],
    "delivery_required": false,
    "end_after": null,
    "gifts_enabled": false,
    "images": [],
    "line_items": [
      {
        "allow_quantity_adjustment": false,
        "name": "Membership",
        "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
        "quantity": 1,
        "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
        "swap_variant_ids": [],
        "swap_variants": [],
        "type": "variant",
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
      }
    ],
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "metadata": {
      "segment": "gold"
    },
    "name": "Monthly Membership",
    "plan_change_options": [],
    "status": "active",
    "subscription_delivery_method_ids": [],
    "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6D3SHRH9725P5F6AC5YEG"
}

Update subscription plan#

PATCH/v1/subscription-plans/{subscription_plan_id}Idempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Applies a sparse update to mutable subscription plan fields. Setting status to inactive returns RESOURCE_IN_USE while active payment links use the plan. Open checkout sessions do not block this change; buyers in those sessions are refused with ACTION_NOT_ALLOWED when they pay. Send line_items with expected_version to replace the plan's line items; omit line_items to keep them.

Path parameters

subscription_plan_idstringRequired

Flint subscription plan ID. Must be a valid ID with prefix plan_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

billing_intervalenum

New unit of the plan's default billing period. Omit to keep it. A plan with its own `billing_interval_options` must list the new default pair among them, so send options that include it unless they already do. Existing subscriptions keep the interval they already bill on.

  • daily
  • weekly
  • monthly
  • yearly
billing_interval_countinteger

New number of `billing_interval` units between charges on the plan's default pair, up to 365. Omit to keep it. The same rule about `billing_interval_options` applies.

billing_interval_optionsarray of object

Omission leaves the choices unchanged. Send [] to reset to the plan's default billing interval and count. Null is invalid. Prices of lines that ship are per delivery. Each option charges for all deliveries in its period. Use separate plans or promotions for different prices per interval.

contract_term_monthsinteger

A commitment period you agree with the buyer, 1 to 120 months. Flint shows it at checkout and records it on each new subscription (contract_start_at, contract_end_at). Flint does not stop the buyer from canceling earlier.

delivery_intervalenum or null

Delivery cadence, set together with delivery_interval_count. Null when no separate delivery cadence is set; one delivery is made per billing period. Each billing option must be a whole multiple in the same unit family (days/weeks or months/years), with 1 to 24 deliveries per period. Existing subscriptions keep their frozen cadence. Omit both fields on PATCH to keep the cadence; send both as null to clear it.

  • daily
  • weekly
  • monthly
  • yearly
  • null
delivery_interval_countinteger or null

Positive number of delivery intervals between deliveries. Set or clear together with delivery_interval. Null when no separate delivery cadence is set; one delivery is made per billing period.

descriptionstring or null

Omission leaves this field unchanged. Null clears it.

early_termination_fee_moneyobject

A fee you agree the buyer owes for canceling before the contract term ends. Flint shows it at checkout and records it on each new subscription, but never charges it. To collect it, charge the buyer yourself, for example with an order on their saved payment method. Requires contract_term_months.

end_afterobject or null

Default automatic end for new subscriptions. Counts charged billing cycles, from 1 to 1200. Send null for no automatic end. Existing subscriptions keep their recorded condition. Null when no default automatic end is set.

expected_versioninteger

Resource version last read by the caller. Required when replacing an owned collection. Required when any of these fields is present: images, line_items, plan_change_options.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Omission leaves this field unchanged. Null clears it.

gifts_enabledboolean

Whether checkout buyers can name a gift recipient. Checkout sessions that are already open keep the setting they were created with.

imagesarray of one of

The complete desired gallery in display order. The first image is primary. Send [] to clear the gallery.

inventory_routing_sourceone of

Replaces the plan's routing source. Subscriptions and payment links that already exist keep the source they copied. It can't be cleared.

line_itemsarray of one of

Replaces all owned plan line items atomically. Requires expected_version. Omission leaves items unchanged; an empty array or null is invalid. Include subscription_plan_line_item_id to retain an item; omit it for a new server-generated ID. Omitted members are removed. Existing subscriptions keep their snapshots. Retained catalog items with the same source keep their catalog snapshot; omitted modifiers keep their recorded choices.

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API. This operation also limits the metadata object you send, before merging: at most 50 keys, counting null deletions, each key 1 to 256 Unicode code points, and at most 32768 UTF-8 bytes of keys plus values.

namestring

New name of the plan. Omit to keep it. Can't be empty. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

plan_change_optionsarray of object

Plans subscribers may switch to, in display order, with the billing timing for each target. Empty means plan changes are off. Omission on PATCH keeps the options; an array replaces them and requires expected_version. Send [] to clear. Null is invalid.

setup_fee_moneyobject

New one-time fee charged with the first payment of a new subscription, except one that continues an imported paid period. Must be above zero and in the plan's currency. Omit to keep it; send `null` to remove it.

statusenum

Active plans accept new signups. Inactive plans refuse new signups with ACTION_NOT_ALLOWED while existing subscriptions keep renewing. Archived plans are read-only and their status is set only by DELETE /v1/subscription-plans/{subscription_plan_id}.

  • active
  • inactive
subscription_delivery_method_idsarray of string

Omission leaves the delivery methods unchanged. Send [] to remove all delivery methods. Null is invalid.

trial_period_daysinteger

Days of free trial before the first charge, from 0 to 365; 0 means no trial. Send 0 to remove the trial. Not allowed on plans with lines that ship.

Response · 200

The updated subscription plan.

Same response as Create subscription plan.

curl -X PATCH https://api.withflintpay.com/v1/subscription-plans/plan_01KEZF7C004CY5ZR33XST2AASV \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "description": "Updated recurring membership plan",
    "metadata": {
      "segment": "vip"
    }
  }'

Archive a subscription plan#

DELETE/v1/subscription-plans/{subscription_plan_id}Idempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Permanently archives a subscription plan from active or inactive status. Returns RESOURCE_IN_USE while active subscriptions, active payment links, or open checkout sessions reference the plan. To stop selling a plan while keeping its subscribers, set status to inactive.

Path parameters

subscription_plan_idstringRequired

Flint subscription plan ID. Must be a valid ID with prefix plan_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Query parameters

expected_versioninteger

Optional subscription plan version last read by the caller.

Response · 200

The archived subscription plan.

Same response as Create subscription plan.

curl -X DELETE https://api.withflintpay.com/v1/subscription-plans/plan_01KEZF7C004CY5ZR33XST2AASV \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Was this helpful?