Skip to content

Subscription offers

A subscription offer lets buyers subscribe to products you already sell. It names the products or variants it covers, the cadences a buyer can choose from, an optional discount on every shipment, and the delivery methods subscribers can use. A buyer subscribes by marking a covered line in their cart, so one checkout can mix one-time and subscribed items. This is how you sell subscribe and save on a product page.

An offer doesn't bill anyone. Each signup creates a subscription with terms_type: "subscription_offer", and that subscription keeps the terms it signed up with. Editing, deactivating, or archiving an offer changes only what new signups get.

Plans or offers#

A subscription plan sells one fixed set of items, such as a monthly box or a membership. An offer adds a subscribe option to catalog items that buyers pick themselves.

PlanOffer
SellsIts own line itemsAny variant it covers, at its catalog price
SignupA plan checkout, a payment link, or the APIA subscribed cart line, or the API
CadenceThe plan's interval unless the buyer picks another optionThe buyer always picks an option
Quantityquantity_options multiplies every lineEach line's own quantity
Trial, setup fee, contract termSupported, with no trial on a plan that shipsNone
DiscountA promotion applied at signupA forever promotion, applied without a code
Subscriptions per signupOneOne per cadence in the cart

What an offer covers#

product_ids covers every active variant of each product, including variants you add later. variant_ids covers single variants. Send at least one ID across the two, and up to 100 in each. On PATCH, either array replaces the stored one.

Every target must be an active product or variant whose product has a product_type of physical, digital, or service. Flint checks each one and returns 400 INVALID_REQUEST with one entry in details for each target that fails, on product_ids or variant_ids.

One active offer per variant. A variant can be covered by only one active offer, whether through its own ID or its product's. Creating or activating an offer that overlaps another active offer returns 409 ALREADY_EXISTS, with the other offer in details[].current_resource. Inactive offers can overlap, so you can prepare a replacement while the current offer keeps selling, then deactivate the old one and activate the new one.

Physical variants. A physical variant needs an active delivery profile, and the offer's delivery methods must be able to ship it and price each renewal without the buyer present. subscription_delivery_method_ids lists up to 25 methods. An empty array offers the store's checkout default methods. The checks and errors are the same as for a plan's physical lines, described in physical products and Ship physical products.

Cadence#

billing_interval_options lists 1 to 12 distinct pairs of billing_interval (daily, weekly, monthly, or yearly) and billing_interval_count (1 to 365). An offer has no default cadence: every subscribed order line and every POST /v1/subscriptions names one of the offer's pairs, or the request returns 400 INVALID_REQUEST. A subscription with lines from several offers gets the pairs all of them share as its own billing_interval_options.

Discount#

promotion_id is optional. The promotion must meet three conditions:

  • Forever recurrence. application_method.recurrence.type is forever, so the discount covers every cycle. Any other recurrence returns 400 INVALID_REQUEST with detail code NOT_ALLOWED on promotion_id.
  • Can apply now. The promotion is available, or unavailable only with unavailable_reason: no_active_codes. An offer applies its promotion without a code, so a code promotion with no codes gives a discount that only subscribers get. See promotion availability.
  • Covers the offer. When the promotion targets specific items, it targets every variant the offer covers.

A promotion that fails the last two returns 409 ACTION_NOT_ALLOWED with reason unsupported_state. Flint checks again at each signup: while the promotion can't apply, for example after it reaches max_uses or its schedule ends, the offer takes no new signups.

At signup, Flint attaches the promotion to the new subscription, covering only the lines from offers that carry it. Later edits to the promotion or the offer don't change that subscription. While an active offer uses a promotion, changing the promotion's recurrence away from forever returns 409 RESOURCE_IN_USE, listing the offers. Send "promotion_id": null on PATCH to sell the offer without a discount to new signups.

Status#

Subscription offer statusFinal
  • active moves to inactive on deactivate
  • inactive moves to active on activate
  • active moves to archived on DELETE
  • inactive moves to archived on DELETE
status on subscription offer
Final values do not change again
  • active
    New signups can use the offer, and covered order lines show it. An offer created without status is active.
  • inactive
    No new signups. You can still edit it, and it can overlap other offers. Setting status back to active runs every coverage, delivery, discount, and overlap check again.
  • archivedFinal
    Set only by DELETE, and permanent. The offer stays readable by ID, and lists leave it out unless status includes archived. PATCH returns 409 ACTION_NOT_ALLOWED with reason archived. Repeating DELETE returns the archived offer.

Subscriptions that started from an offer keep billing and shipping in every status.

Update an offer#

PATCH changes only the fields you send. Arrays replace the stored value whole, and null clears promotion_id or external_reference_id. Changing the targets, cadences, delivery methods, or promotion, or activating the offer, reruns the same checks as a create. Changing name, metadata, or external_reference_id doesn't.

Send the version you read as expected_version, in the body on PATCH and as a query parameter on DELETE. If the offer changed since you read it, Flint returns 409 VERSION_CONFLICT with the current version in details[0].current_version. Without expected_version, a write that collides with another returns 409 CONCURRENT_MODIFICATION; read the offer again and retry.

JSON
{
  "expected_version": 3,
  "promotion_id": null,
  "billing_interval_options": [
    { "billing_interval": "weekly", "billing_interval_count": 2 },
    { "billing_interval": "monthly", "billing_interval_count": 1 }
  ]
}

Show the offer on a product page#

Because a variant has at most one active offer, filtering by variant_id and status=active returns that offer or an empty list. The variant_id filter matches offers that list the variant or its product, and product_id matches offers that cover the product or any of its variants.

cURL
curl "https://api.withflintpay.com/v1/subscription-offers?variant_id=var_01KEZF4H2N8Q6R0TXJ3W5YB7CM&status=active" \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "subscription_offer_id": "soffer_01KEZG2M4T8V6N0QXJ3R5YB7CW",
      "name": "Coffee subscribe and save",
      "status": "active",
      "product_ids": ["prod_01KEZF3D9P7M5K1SVH2Q4XA6BN"],
      "variant_ids": [],
      "billing_interval_options": [
        { "billing_interval": "weekly", "billing_interval_count": 2 },
        { "billing_interval": "weekly", "billing_interval_count": 4 }
      ],
      "promotion_id": "promo_01KEZG0A6C4E2G8J0LNPRTVXZB",
      "subscription_delivery_method_ids": ["dmet_01KEZFZW3Y1A9C7E5G3J1LNQSU"],
      "metadata": {},
      "version": 1,
      "created_at": "2026-10-20T15:04:05Z",
      "updated_at": "2026-10-20T15:04:05Z"
    }
  ],
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Show "One-time" beside the offer's cadences. An order line for a covered variant also carries subscription_offer, with the offer's name, billing_interval_options, and, when it has one, discount as percent_off or amount_off_money, so a cart can show the choice without this lookup.

Sell with an offer#

These calls sell an offer and find its subscribers. The subscription billing guide walks through each one.

  • POST/v1/ordersRequired API key scope: commerce.orders.writeReference for POST /v1/orders

    Mark a variant line with subscription, naming the offer and a cadence, then open checkout for the order. Paying it starts one subscription per cadence.

  • PATCH/v1/orders/{order_id}/line-items/{order_line_item_id}Required API key scope: commerce.orders.writeReference for PATCH /v1/orders/{order_id}/line-items/{order_line_item_id}

    Switch an unpaid line between one-time and subscribed.

  • POST/v1/subscriptionsRequired API key scope: commerce.subscriptions.writeReference for POST /v1/subscriptions

    Create or import an offer subscription without a checkout, with terms.type set to subscription_offer.

  • GET/v1/subscriptionsRequired API key scopes: commerce.subscriptions.read or commerce.subscriptions.writeReference for GET /v1/subscriptions

    Find an offer's subscribers with subscription_offer_id, or every offer subscription with terms_type=subscription_offer.

Errors#

  • HTTP 400
    A target can't be subscribed, billing_interval_options is invalid, the promotion doesn't recur forever, or a listed delivery method can't price renewals. param names the field.
  • HTTP 404
    The offer or the promotion doesn't exist in this environment.
  • HTTP 409
    Another active offer covers one of the variants. details[].current_resource names it. Narrow the targets or deactivate the other offer.
  • HTTP 409
    Reason archived: the offer is archived. Reason unsupported_state: the promotion can't apply now or doesn't cover every variant. Reason configuration_required: a physical variant needs an active delivery profile.
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    expected_version is stale. Read the offer and retry with its version.
Subscribe-and-save offersCreate an offer, sell it in a mixed cart, and import offer subscribers.Entitlements for offer subscriptionsDecide what an offer subscriber gets from terms_type and each line's offer.PromotionsBuild the forever discount an offer applies to every shipment.

The Subscription offer object#

Recurring terms offered on catalog products or variants. Updates affect new signups; existing subscriptions keep their paid signup terms.

Returned by GET /v1/subscription-offers/{subscription_offer_id} and carried by the endpoints below.

Attributes

billing_interval_optionsarray of objectRequired
created_atstringRequired

RFC3339 timestamp.

external_reference_idstring

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

metadatamap of stringRequired

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

namestringRequired
product_idsarray of stringRequired

Products whose active variants the offer covers, including variants added later. At most 100. Send at least one product or variant. Each product must be active and physical, digital, or a service. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

promotion_idstring or nullRequired

An active promotion with forever recurrence. On PATCH, null removes the discount for new signups; omission keeps it.

statusenumRequired

Whether new signups can use the offer. Existing subscriptions keep their signup terms whatever the offer's status.

  • active
  • inactive
  • archived
subscription_delivery_method_idsarray of stringRequired

Delivery methods offered at signup. An empty array uses the store's checkout defaults. Existing subscriptions keep their selected method.

subscription_offer_idstringRequired

Unique identifier for this subscription offer, prefixed `soffer_`.

updated_atstringRequired

RFC3339 timestamp.

variant_idsarray of stringRequired

Individual variants the offer covers. At most 100. Send at least one product or variant. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

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_options": [
    {
      "billing_interval": "monthly",
      "billing_interval_count": 1
    }
  ],
  "created_at": "2026-08-02T00:00:00Z",
  "metadata": {},
  "name": "Monthly coffee",
  "product_ids": [
    "prod_01KEZF7C00027JTCXQ7TQF86X8"
  ],
  "promotion_id": null,
  "status": "active",
  "subscription_delivery_method_ids": [],
  "subscription_offer_id": "soffer_01KEZF7C00KAA9Y1X1KM70YFAA",
  "updated_at": "2026-08-02T00:00:00Z",
  "variant_ids": [],
  "version": 1
}

List subscription offers#

GET/v1/subscription-offers

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

Rate limit: read

List subscription offers. Offer changes affect new signups only. Existing subscriptions keep their terms. Default order: created_at descending, then subscription_offer_id descending.

Query parameters

page_sizeinteger

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

page_tokenstring

Opaque next_page_token from the previous response. 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 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
product_idstring

Offers that cover this product, directly or through any of its variants.

variant_idstring

Offers that cover this variant, directly or through its product. With `status=active`, at most one offer matches.

querystring

Case-insensitive search over name, subscription_offer_id, and external_reference_id.

external_reference_idstring

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

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.

sort_byenum

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

  • created_at
  • updated_at
  • name
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc

Response · 200

Subscription offer result.

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-offers \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Subscription offer result.

JSON
{
  "data": [
    {
      "billing_interval_options": [
        {
          "billing_interval": "monthly",
          "billing_interval_count": 1
        }
      ],
      "created_at": "2026-08-02T00:00:00Z",
      "metadata": {},
      "name": "Monthly coffee",
      "product_ids": [
        "prod_01KEZF7C00027JTCXQ7TQF86X8"
      ],
      "promotion_id": null,
      "status": "active",
      "subscription_delivery_method_ids": [],
      "subscription_offer_id": "soffer_01KEZF7C00KAA9Y1X1KM70YFAA",
      "updated_at": "2026-08-02T00:00:00Z",
      "variant_ids": [],
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Create subscription offer#

POST/v1/subscription-offersIdempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Create subscription offer. Offer changes affect new signups only. Existing subscriptions keep their terms.

Request body

billing_interval_optionsarray of objectRequired
external_reference_idstring

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

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
product_idsarray of string

Products whose active variants the offer covers, including variants added later. At most 100. Send at least one product or variant. Each product must be active and physical, digital, or a service. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

promotion_idstring or null

An active promotion with forever recurrence. On PATCH, null removes the discount for new signups; omission keeps it.

statusenum

Use active or inactive. Archive the offer with DELETE.

  • active
  • inactive
subscription_delivery_method_idsarray of string

Delivery methods offered at signup. An empty array uses the store's checkout defaults. Existing subscriptions keep their selected method.

variant_idsarray of string

Individual variants the offer covers. At most 100. Send at least one product or variant. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

Response · 201

Subscription offer result.

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-offers \
  -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_options": [
      {
        "billing_interval": "monthly",
        "billing_interval_count": 1
      }
    ],
    "name": "Monthly coffee",
    "product_ids": [
      "prod_01KEZF7C00027JTCXQ7TQF86X8"
    ],
    "status": "active"
  }'

Get subscription offer#

GET/v1/subscription-offers/{subscription_offer_id}

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

Rate limit: read

Get subscription offer. Offer changes affect new signups only. Existing subscriptions keep their terms.

Path parameters

subscription_offer_idstringRequired

Subscription offer ID.

Response · 200

Subscription offer result.

Same response as Create subscription offer.

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

Subscription offer result.

JSON
{
  "data": {
    "billing_interval_options": [
      {
        "billing_interval": "monthly",
        "billing_interval_count": 1
      }
    ],
    "created_at": "2026-08-02T00:00:00Z",
    "metadata": {},
    "name": "Monthly coffee",
    "product_ids": [
      "prod_01KEZF7C00027JTCXQ7TQF86X8"
    ],
    "promotion_id": null,
    "status": "active",
    "subscription_delivery_method_ids": [],
    "subscription_offer_id": "soffer_01KEZF7C00KAA9Y1X1KM70YFAA",
    "updated_at": "2026-08-02T00:00:00Z",
    "variant_ids": [],
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Update subscription offer#

PATCH/v1/subscription-offers/{subscription_offer_id}Idempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Update subscription offer. Offer changes affect new signups only. Existing subscriptions keep their terms.

Path parameters

subscription_offer_idstringRequired

Subscription offer ID.

Request body

billing_interval_optionsarray of object
expected_versioninteger

The version read before editing. A mismatch returns VERSION_CONFLICT.

external_reference_idstring or null

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

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.

namestring
product_idsarray of string

Products whose active variants the offer covers, including variants added later. At most 100. Send at least one product or variant. Each product must be active and physical, digital, or a service. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

promotion_idstring or null

An active promotion with forever recurrence. On PATCH, null removes the discount for new signups; omission keeps it.

statusenum

Use active or inactive. Archive the offer with DELETE.

  • active
  • inactive
subscription_delivery_method_idsarray of string

Delivery methods offered at signup. An empty array uses the store's checkout defaults. Existing subscriptions keep their selected method.

variant_idsarray of string

Individual variants the offer covers. At most 100. Send at least one product or variant. A variant can be in only one active offer; an overlap returns `409 ALREADY_EXISTS` naming the other offer.

Response · 200

Subscription offer result.

Same response as Create subscription offer.

curl -X PATCH https://api.withflintpay.com/v1/subscription-offers/soffer_01KEZF7C00KAA9Y1X1KM70YFAA \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1,
    "name": "Monthly coffee club"
  }'

Archive subscription offer#

DELETE/v1/subscription-offers/{subscription_offer_id}Idempotent

Requires scope commerce.subscription_plans.write

Rate limit: write

Archive subscription offer. Offer changes affect new signups only. Existing subscriptions keep their terms.

Path parameters

subscription_offer_idstringRequired

Subscription offer ID.

Query parameters

expected_versioninteger

Resource version last read by the caller. Refuses the deletion if the offer has changed.

Response · 200

Subscription offer result.

Same response as Create subscription offer.

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

Was this helpful?