Skip to content

Shops

A shop is a page that sells several catalog products and bundles together. You choose the items and their order, and Flint keeps each listing in step with your catalog. Use a shop when one link should offer a range of products. To sell one offer from one URL, use a payment link; to collect for one known order, create a checkout session.

Your server creates, updates, and archives shops with checkouts.shops.write, and lists and retrieves them with checkouts.shops.read. Write includes read. These routes take an API key or a partner app install token, and the Dashboard uses them too. Two public reads show a shop and its listings to buyers and take no key, so a page of yours can call them straight from the browser. A shop's url is the address of its hosted page. The hosted shop pages and the Dashboard builder use these routes too. The Shops guide covers them, and building your own cart.

Fields#

FieldNotes
shop_idThe shop's ID, with the prefix shop_.
merchant_idThe merchant the shop belongs to.
name1 to 255 characters, with surrounding whitespace trimmed. Required on create, and it can't be blank.
descriptionUp to 2,048 characters, or null.
imageThe cover image, or null. It takes the same image input as payment links.
statusactive, inactive, or archived. See Status.
inactive_messageUp to 500 characters buyers see while the shop is inactive, or null.
urlThe shop's address. In live mode it uses your healthy custom checkout hostname when you have one.
handleA readable address. It is null for now.
currencyThe currency of the listed items, or null while the shop has no listings. The first listing sets it.
listing_countThe number of listings on the shop, including listings buyers can't currently buy.
delivery_method_idsUp to 25 delivery methods. An empty array follows your checkout settings.
inventory_routing_sourceWhere tracked stock comes from, or null to follow settings.inventory.default_routing_source.
redirects, payments, tip, buyer_fields, tax, legal, custom_text, promotion_configCheckout configuration, with the same schemas as payment links. A section you leave out follows your checkout settings each time a checkout starts.
checkout_session_expires_in_seconds60 to 86,400, or null to follow your checkout settings.
metadataYour key-value data. It isn't copied to orders.
external_reference_idYour own reference, 1 to 255 characters, or null. Filters match it exactly, including case and whitespace.
version, created_at, updated_atversion starts at 1 and goes up by one with every saved change to the shop or its listings.

A shop has no lifecycle actions, so it returns no supported_actions.

Checkout settings#

A shop is the template for the checkouts it starts. The checkout sections, delivery_method_ids, inventory_routing_source, and checkout_session_expires_in_seconds work as they do on payment links. A section or field you leave out follows your checkout settings each time a checkout starts, so a later change to your settings applies to the shop. Changes to the shop itself apply to checkouts that start afterward.

PATCH is sparse and treats the checkout sections as partial objects: send the fields you want to change and the rest stay. Send null for a section to remove every value you set in it. image and inventory_routing_source are replaced as a whole. metadata merges by key, and a null value removes that key.

Listings#

A listing is one catalog product or bundle on the shop. You write listings as the listings array on create and PATCH, and read them from the shop's listings route.

FieldNotes
shop_listing_idThe listing's ID, with the prefix shl_. See Listing IDs.
shop_idThe shop that owns the listing.
typeproduct or bundle.
product_id, bundle_idThe catalog item. product_id is set when type is product, and bundle_id when it is bundle.
resolved_nameThe catalog item's current name.
resolved_price_rangeThe current prices of the variants that can be sold in the shop's currency. Omitted when none can.
is_catalog_item_unavailabletrue when the item is inactive, archived, or has no variant that can be sold in the shop's currency. Buyers don't see it.

The listings input is the complete ordered list, up to 250 entries, and array order is display order. Each entry is {"type": "product", "product_id": "..."} or {"type": "bundle", "bundle_id": "..."}. A product or bundle appears at most once in a shop. Products of type physical, digital, service, and gift_card can be listed. fee products and bundles that contain a gift card can't.

On create, listings is optional. A shop with no listings is valid, and buyers see an empty shop.

On PATCH, an entry that carries shop_listing_id keeps that listing, an entry without one adds a listing, and a listing you leave out is removed. A kept listing can't change its type or catalog ID. Omit listings to leave the list unchanged, and send [] to remove every listing.

A PATCH that sends listings or delivery_method_ids needs the shop's current version as expected_version. Without it, the request fails with 400 INVALID_REQUEST and param expected_version.

Listing IDs#

A listing's ID belongs to its shop and catalog item for life. If you send an entry without shop_listing_id for an item that is already listed, it keeps that listing's ID. If you remove an item and add it again later, it gets back the ID it had. Product and add-to-cart links you pasted into a site keep working through either change. Sending the ID of one item with the catalog ID of another is refused.

Listing checks#

Flint checks each listing when you write it:

CheckRefusal
The product or bundle exists in this environment.404 RESOURCE_NOT_FOUND, with param such as listings[3].product_id
The item is active, and a product has at least one active variant that is available for sale.409 ACTION_NOT_ALLOWED, reason unsupported_state
A product isn't a fee product, and a bundle holds no gift card.400 INVALID_REQUEST, detail NOT_ALLOWED
One of its sellable variants, or the bundle, is priced in the shop's currency.400 INVALID_REQUEST, detail NOT_ALLOWED
The item appears once in the request.400 INVALID_REQUEST, detail INVALID_VALUE
An entry's shop_listing_id belongs to this shop and to the catalog ID sent with it.400 INVALID_REQUEST, detail INVALID_VALUE
The request has at most 250 listings.400 INVALID_REQUEST, detail INVALID_VALUE, param listings

After a write, a listing follows your catalog. A variant priced in another currency is left out of what buyers see. A listing with no variant left in the shop's currency reports is_catalog_item_unavailable: true until you reprice or remove it.

For an active shop, Flint also checks checkout configuration. It runs when you create the shop as active, set status to active, or PATCH listings, delivery_method_ids, or inventory_routing_source. Every listed item must be able to check out on its own:

  • Items that need a delivery choice are covered by the shop's delivery_method_ids or settings.checkout.default_delivery_method_ids.
  • Items that track inventory have a routing source, from the shop or settings.inventory.default_routing_source, at a location that allows allocation.

A gap returns 409 ACTION_NOT_ALLOWED with reason configuration_required, or dependency_revoked when a delivery dependency was revoked. The error names the blocking resource, and remediation.next_actions says what to change. A shop with no listings passes these checks. Temporary stock shortages never block a write.

Status#

status on shop
  • active
    Buyers can open the shop. New shops start here unless you create them as inactive.
  • inactive
    The shop is temporarily closed. Buyers see your inactive_message. Open, unpaid checkouts close and refuse new payments. Payments already in progress can finish. Set status back to active to reopen it.
  • archived
    You archived the shop with DELETE. It stays readable, and so do its listings, but you can't change it or reopen it.

Create and PATCH accept active and inactive. Only DELETE archives a shop: PATCH with status: "archived" returns 400 INVALID_REQUEST with detail INVALID_VALUE on status.

Shop limit#

An environment can have up to 20 shops that are active or inactive. Archived shops don't count. Creating a 21st returns 409 LIMIT_REACHED with reason shops and limit 20. Archive a shop you no longer need, then retry.

Create a shop#

POST /v1/shops needs name. It accepts an optional Idempotency-Key; see idempotency for how a retry replays the original shop.

cURL
curl -X POST https://api.withflintpay.com/v1/shops \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: shop-moonrise-001" \
  -d '{
    "name": "Moonrise Bakery",
    "description": "Bread and pastries, baked each morning. Pickup at the shop.",
    "listings": [
      {"type": "product", "product_id": "prod_01K4SOURDOUGH"},
      {"type": "product", "product_id": "prod_01K4CROISSANT"},
      {"type": "bundle", "bundle_id": "bun_01K4BREAKFAST"}
    ],
    "delivery_method_ids": ["dmet_01K4PICKUP"]
  }'
Response
{
  "data": {
    "shop_id": "shop_01K4MOONRISE",
    "name": "Moonrise Bakery",
    "status": "active",
    "url": "https://checkout.withflintpay.com/shop/shop_01K4MOONRISE",
    "handle": null,
    "currency": "USD",
    "listing_count": 3,
    "delivery_method_ids": ["dmet_01K4PICKUP"],
    "version": 1
  }
}

The response is 201 with the shop. It doesn't include the listings; read them from the listings route.

Read a shop#

GET /v1/shops/{shop_id} returns one shop in any status, including archived.

List shops#

GET /v1/shops returns shops newest first, by created_at and then shop_id. It leaves archived shops out unless status names archived.

FilterMatches
statusOne or more of active, inactive, and archived. Repeat the parameter to combine values.
external_reference_idShops whose external reference ID matches exactly, including case and whitespace.
queryText in the name, description, or external reference ID, or the start of a shop ID with its shop_ prefix.
created_after, created_beforeA created_at range. created_after is inclusive and created_before is exclusive.
updated_after, updated_beforeThe same range on updated_at.

page_size is 1 to 100 and defaults to 20. Pass the previous response's next_page_token as page_token to read the next page, with the same filters.

Read listings#

GET /v1/shops/{shop_id}/listings returns the shop's listings in display order. Pages follow the same page_size and page_token rules as the shop list. It includes listings buyers can't currently buy, which report is_catalog_item_unavailable: true. It works on an archived shop, which keeps the listings it had when you archived it.

cURL
curl https://api.withflintpay.com/v1/shops/shop_01K4MOONRISE/listings \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": [
    {
      "shop_listing_id": "shl_01K4LISTSOURDOUGH",
      "shop_id": "shop_01K4MOONRISE",
      "type": "product",
      "product_id": "prod_01K4SOURDOUGH",
      "resolved_name": "Sourdough loaf",
      "is_catalog_item_unavailable": false
    }
  ]
}

Public reads#

Two routes return the buyer's view of a shop. They take no API key, and a browser on any origin can call them, so a storefront on your own site can show the shop without a backend. They are read-only: GET /v1/shops/{shop_id}/public returns the shop and a summary of each listing, and GET /v1/shops/{shop_id}/listings/{shop_listing_id}/public returns one listing in full. The shop ID, and for the second route the listing ID, are the only things the caller needs.

cURL
curl https://api.withflintpay.com/v1/shops/shop_01K4MOONRISE/public
JSON
{
  "data": {
    "shop": {
      "shop_id": "shop_01K4MOONRISE",
      "version": 3,
      "name": "Moonrise Bakery",
      "status": "active",
      "url": "https://checkout.withflintpay.com/shop/shop_01K4MOONRISE",
      "currency": "USD"
    },
    "listings": [
      {
        "shop_listing_id": "shl_01K4LISTSOURDOUGH",
        "type": "product",
        "product_id": "prod_01K4SOURDOUGH",
        "name": "Sourdough loaf",
        "price_range": {
          "min_unit_price_money": {"amount": 800, "currency": "USD"},
          "max_unit_price_money": {"amount": 800, "currency": "USD"}
        },
        "compare_at_price_money": null,
        "is_sold_out": false,
        "requires_selection": false,
        "category_handles": []
      }
    ],
    "categories": [],
    "merchant_name": "Moonrise Bakery",
    "show_flint_mark": true,
    "resolution_context": "shrc_v1.example",
    "checkout_start_due_at": "2026-11-25T11:58:00Z",
    "resolution_context_expires_at": "2026-11-25T12:00:00Z"
  }
}

Public shop#

GET /v1/shops/{shop_id}/public returns these fields in data:

FieldNotes
shopshop_id, version, name, description, image, status, inactive_message, url, and currency. currency is null while the shop has no listings.
listingsThe listings buyers can buy, in display order. See Listing summary. Empty when the shop is inactive or archived.
categoriescategory_id, handle, and name for each active category assigned to a listing in listings, sorted by name.
merchant_name, merchant_logo, merchant_icon, merchant_support, checkout_theme, show_flint_markThe merchant's display details, with the same meaning as on the public payment link read.
legalThe policy links checkout shows and whether the buyer must accept the terms.
resolution_context, checkout_start_due_at, resolution_context_expires_atA private value for starting this buyer's checkout from this shop, and its deadlines. Read the shop once for each buyer and don't share or store the context.

An inactive or archived shop still returns 200, with its status and inactive_message and no listings, so your page can tell buyers the shop is closed.

Listing summary#

Each entry in listings has:

FieldNotes
shop_listing_id, type, product_id or bundle_idThe listing and its catalog item.
nameThe product or bundle name.
imageThe item's first image. Omitted when it has none.
price_rangemin_unit_price_money and max_unit_price_money in the shop's currency. The two are equal when there is one price.
compare_at_price_moneyThe compare-at price when the item has one variant that has one. Otherwise null.
is_sold_outtrue when every choice the buyer could make is sold out. This is advisory: Flint checks stock again when the buyer pays.
requires_selectiontrue when the buyer must choose a variant or a required modifier.
category_handlesThe handle of each of the listing's categories that is in categories.

Public listing#

GET /v1/shops/{shop_id}/listings/{shop_listing_id}/public returns the summary fields plus:

FieldNotes
descriptionThe item's description. Omitted when it has none.
imagesEvery image, in display order.
product_optionsThe options its available variants use. For a product.
available_variantsFor a product, each variant that can be sold in the shop's currency, with its variant_id, name, selected_options, unit_price_money, compare_at_price_money, quantity_price_breaks, image, is_sold_out, and available_modifiers.
available_modifiers, bundle_componentsFor a bundle, its modifier groups and its components.

The variant, option, and modifier objects match the ones the public payment link read returns.

What buyers don't see#

The public reads return only what you listed. They leave out stock counts, costs, metadata, external_reference_id, redirect URLs, inactive variants, and anything about products that aren't on the shop. Compared with the merchant read, a public shop has no merchant_id, handle, listing_count, delivery_method_ids, inventory_routing_source, checkout configuration sections, or timestamps. Variant SKUs are left out of bundle components.

Unavailable and other-currency listings#

The public shop read lists only listings buyers can buy now. It drops a listing, without an error, when:

  • the product or bundle is inactive or archived;
  • a product has no active variant priced in the shop's currency, or a bundle isn't priced in it. A product that has some variants in another currency is still listed, with only the variants in the shop's currency;
  • Flint can't build the listing's public view: for example, a bundle holds a gift card, a tracked variant has no inventory item, or Flint can't read the listing's stock.

The merchant listings route still returns these listings, with is_catalog_item_unavailable: true where it applies. A dropped listing returns 404 RESOURCE_NOT_FOUND from the public listing read. A listing that is sold out isn't dropped: it stays with is_sold_out: true.

Caching, rate limits, and CORS#

Both reads send Cache-Control: private, no-store, because each carries a value for one buyer. Don't cache them in a shared cache. A 200 also sends Flint-Mode, Flint-Merchant-Id, and for a test-mode shop Flint-Sandbox-Id.

Each shop allows 1,000 public reads per IP in a rolling minute, shared by both routes. Exceeding it returns 429 RATE_LIMIT_EXCEEDED with Retry-After; see Public shops. When each buyer calls from their own browser, the limit applies per buyer. If your backend calls on behalf of many buyers, they share its IP's budget.

The two routes allow cross-origin GET and OPTIONS requests from any origin. A browser can send Content-Type, Idempotency-Key, and Flint-Version, and can read response headers such as Retry-After, Flint-Mode, and X-Request-Id.

Public read errors#

These reads return the shop errors below that apply to a read, plus the common errors every route can. They never return an authentication or scope error.

StatusCodeWhen
400INVALID_REQUESTshop_id or shop_listing_id is malformed. param names it, with detail INVALID_VALUE.
404RESOURCE_NOT_FOUNDThe shop doesn't exist, or its sandbox was closed. For the listing read, also when the listing isn't on the shop, isn't sellable (see above), or the shop is inactive or archived. param is shop_id or shop_listing_id.
429RATE_LIMIT_EXCEEDEDMore than 1,000 public reads from one IP for this shop in a minute. Wait Retry-After seconds.
500INTERNAL_ERRORFlint couldn't read the shop or the merchant. Retry.
503SERVICE_UNAVAILABLEShops are unavailable. Retry.

Start checkout from a cart#

Call POST /v1/shops/{shop_id}/resolve with the resolution_context from the public shop read and 1 to 50 cart lines. This route accepts cross-origin POST and OPTIONS from any origin and needs no API key. Each line sends shop_listing_id, an optional quantity from 1 to 9,999 (default 1), and variant_id when the product has several variants for sale. Omit variant_id for bundles. You can repeat a listing to order separate lines with different modifiers.

Omit modifiers to use the group's defaults. Send an array, including an empty array, to select exactly what it contains. Each entry has type: "catalog" with modifier_id and optional quantity, or type: "text" with text: {"modifier_group_id": "...", "value": "..."}. Flint prices the selected items from the catalog. Quantity breaks apply to the base unit price. Flint multiplies per-item modifier prices by the line quantity and adds per-line modifiers once. Flint checks stock again when the buyer starts payment.

You can also send client_reference, copied to the session and order, and prefill: {"email": "..."} to fill in the buyer's email. The buyer can change the email in checkout.

JSON
{
  "resolution_context": "shrc_v1.example",
  "line_items": [
    {"shop_listing_id": "shl_01ARZ3NDEKTSV4RRFFQ69G5FAV", "quantity": 2}
  ]
}

The 201 response carries checkout_session_id, order_id, shop_id, type: "shop", status: "open", expires_at, and a hosted checkout url. Open the URL in the buyer's browser, keeping the #checkout_token=… fragment. It carries private launch authority. The response uses Cache-Control: private, no-store. If the buyer leaves checkout, they return to the shop's cart unless you set a cancel URL.

Send an Idempotency-Key and reuse it with the same context and cart after a lost response. An exact retry with an unexpired context and an open session returns the same session and order and sends Idempotency-Replayed: true. Use a new key when you change the cart. Read the shop again before starting a fresh checkout at or after checkout_start_due_at.

Flint checks the request, the context, and shop availability before checking the cart. It checks the cart in the order below and returns the first problem class it finds. Each failing line in that class has a detail with its own param. Once you address that class, a retry can return the next one.

OrderStatus and codeWhat to fix
1400 INVALID_REQUESTA quantity is out of range, a variant choice is missing or invalid, or a modifier choice fails its group's rules.
2404 RESOURCE_NOT_FOUNDThe listing is missing from this shop.
3409 ACTION_NOT_ALLOWEDThe listing or a selected variant or modifier is no longer sold. A confirmed inactive or archived status gives reason unsupported_state and current_status. Other cases, including a currency mismatch or missing inventory routing, give reason not_offered.
4409 INVENTORY_INSUFFICIENTThe listing is sold out. The detail reports available_quantity: 0.

An expired or stale context returns 409 VERSION_CONFLICT on resolution_context. Read the public shop again to get a fresh context. An inactive or archived shop returns 409 ACTION_NOT_ALLOWED with resource_type: "shop", current_status, and the shop's message when one was set. A replay of an ended checkout returns 409 ACTION_NOT_ALLOWED with resource_type: "checkout_session" and reason not_offered. A merchant who cannot take payments returns 409 MERCHANT_NOT_READY.

Each shop allows 1,000 starts per IP per minute and each context allows 20 per minute. On a 429 RATE_LIMIT_EXCEEDED, wait for the number of seconds in Retry-After.

If resolve returns 409 CONCURRENT_MODIFICATION, retry with the same context, cart, and idempotency key.

Update a shop#

PATCH /v1/shops/{shop_id} changes only the fields you send, and it accepts an optional Idempotency-Key. A change that sends listings or delivery_method_ids needs expected_version; other changes can send it to guard against a concurrent edit.

If the shop changed since you read it, the request returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and nothing changes. Read the shop again and retry with that version.

This request replaces the list, keeping the sourdough listing by ID, dropping the croissant, and adding a new product:

cURL
curl -X PATCH https://api.withflintpay.com/v1/shops/shop_01K4MOONRISE \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "expected_version": 1,
    "listings": [
      {"type": "product", "product_id": "prod_01K4SOURDOUGH", "shop_listing_id": "shl_01K4LISTSOURDOUGH"},
      {"type": "product", "product_id": "prod_01K4BAGUETTE"}
    ]
  }'

Setting status to inactive closes the shop's open, unpaid checkouts, and payments already in progress can finish. The request has no separate field to confirm this, because closing the shop is the purpose of the call. An archived shop can't be changed: PATCH returns 409 ACTION_NOT_ALLOWED with reason unsupported_state.

Archive a shop#

DELETE /v1/shops/{shop_id} archives the shop and returns it with status: "archived". The shop stays readable and keeps its listings. Archiving closes open, unpaid checkouts, lets payments in progress finish, and can't be undone. To close a shop you may reopen, set status to inactive instead.

Send the shop's version as the optional expected_version query parameter to archive only if it hasn't changed. A stale expected_version returns 409 VERSION_CONFLICT, even when the shop is already archived. With no expected_version, or one that matches, archiving an archived shop returns it unchanged and sends no event. Like status: "inactive", archiving states its effect here and takes no confirmation field. DELETE also accepts an Idempotency-Key.

cURL
curl -X DELETE "https://api.withflintpay.com/v1/shops/shop_01K4MOONRISE?expected_version=2" \
  -H "Authorization: Bearer YOUR_API_KEY"

Archiving sends shop.archived and no shop.updated, and it frees one of your 20 shops.

  • shop.created
    You created a shop
  • shop.updated
    A saved change advanced the shop's version, including a change to its listings and activating or deactivating it
  • shop.archived
    You archived a shop with DELETE. Archiving a shop that is already archived sends nothing

Each event's data.object is the shop as GET /v1/shops/{shop_id} returns it, with the version and listing_count from the change that sent it. A listing change shows up as a new version and listing_count; read the listings route for the list itself. Partner apps need checkouts.shops.read to subscribe.

Errors#

Shop routes also return the common errors every authenticated route can, such as AUTHENTICATION_REQUIRED, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED, and the idempotency errors on writes. These are the ones specific to shops:

  • HTTP 400
    A field is missing or invalid, and param names it. Details include REQUIRED for a PATCH of listings or delivery_method_ids without expected_version, INVALID_VALUE for a listing that repeats an item or sends a shop_listing_id that doesn't match its catalog item, for more than 250 listings or any other value over a limit, and for status: "archived" on a PATCH, and NOT_ALLOWED for a fee product, a bundle that holds a gift card, a listing with no price in the shop's currency, or a delivery method that needs caller-supplied rates, which a shop's hosted checkout can't price. Other invalid inputs include a blank name, an invalid page_token, and invalid checkout settings or images.
  • HTTP 404
    The shop doesn't exist in this environment, or a listed product or bundle doesn't. param names it, such as shop_id or listings[3].product_id.
  • HTTP 409
    Reason unsupported_state: you tried to change an archived shop, or to list an inactive item or a product with no variant available for sale. Reason configuration_required: a listed item needs a delivery method or an inventory routing source with a location that allows allocation before the shop can be active, and remediation.next_actions says what to set. Reason dependency_revoked: a delivery method, rate callback, or location the shop uses was revoked.
  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    expected_version is stale. Read the shop and retry with its version from details[0].current_version.
  • HTTP 409
    The environment already has 20 shops that are active or inactive. The reason is shops and limit is 20. Archive one, then retry.
  • HTTP 409
    A payment option you set in payments isn't available for this merchant or checkout.
Payment linksSell one offer from one URL, with the checkout settings shops share.Catalog setupCreate the products and bundles a shop lists.

The Shop object#

A hosted catalog configured by a merchant.

Returned by GET /v1/shops/{shop_id} and carried by the endpoints below.

Attributes

buyer_fieldsobject

Buyer information requested at checkout. Omitted when the shop has no override.

checkout_session_expires_in_secondsinteger or nullRequired

Checkout lifetime in seconds. Null when checkout settings apply.

created_atstringRequired

RFC3339 timestamp.

currencystring or nullRequired

Listing currency. Null when the shop is empty. Uses ISO 4217 currency codes.

custom_textobject

Merchant text shown in checkout. Omitted when the shop has no override.

delivery_method_idsarray of stringRequired

An empty array follows checkout settings.

descriptionstring or nullRequired

Shop description. Null when unset.

external_reference_idstring or nullRequired

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

handlestring or nullRequired

Readable address. Null when a handle has not been assigned.

imageobject or nullRequired

Cover image. Null when unset.

inactive_messagestring or nullRequired

Inactive message. Null when unset.

inventory_routing_sourceobject or nullRequired

Explicit inventory routing. Null when checkout settings apply.

legalobject

Legal policies shown to buyers. Omitted when the shop has no override.

listing_countintegerRequired

The number of listings on the shop, including unavailable entries.

merchant_idstringRequired

ID of the merchant this resource belongs to.

metadatamap of stringRequired

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

namestringRequired

The title buyers see on the shop.

paymentsobject

Payment options for the shop. Omitted when the shop has no override.

promotion_configobject

Promotion settings for shop checkouts. Omitted when the shop has no override.

redirectsobjectRequired

Redirects configured for checkouts started from the shop.

shop_idstringRequired

Shop ID.

statusenumRequired

Availability or retirement status.

  • active
  • inactive
  • archived
taxobject

Tax settings for shop checkouts. Omitted when the shop has no override.

tipobject

Tipping options for the shop. Omitted when the shop has no override.

updated_atstringRequired

RFC3339 timestamp.

urlstringRequired

The hosted shop address. Live shops use the merchant's healthy custom checkout hostname when available.

versionintegerRequired

Persisted version of this resource's owned state. Expanded resources and external observations can change independently.

JSON
{
  "checkout_session_expires_in_seconds": null,
  "created_at": "2026-11-24T12:00:00Z",
  "currency": null,
  "delivery_method_ids": [],
  "description": null,
  "external_reference_id": null,
  "handle": null,
  "image": null,
  "inactive_message": null,
  "inventory_routing_source": null,
  "listing_count": 0,
  "merchant_id": "mer_01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "metadata": {},
  "name": "Moonrise Bakery",
  "redirects": {},
  "shop_id": "shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "status": "active",
  "updated_at": "2026-11-24T12:00:00Z",
  "url": "https://checkout.withflintpay.com/shop/shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "version": 1
}

List shops#

GET/v1/shops

Requires scope checkouts.shops.read or checkouts.shops.write

Rate limit: read

Lists shops in the selected environment. Default order: created_at descending, then shop_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

Match the external reference ID exactly.

querystring

Search across shop ID, name, description, and external reference ID. 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 shop_01.

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

List shops.

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

List shops.

JSON
{
  "data": [
    {
      "checkout_session_expires_in_seconds": null,
      "created_at": "2026-11-24T12:00:00Z",
      "currency": null,
      "delivery_method_ids": [],
      "description": null,
      "external_reference_id": null,
      "handle": null,
      "image": null,
      "inactive_message": null,
      "inventory_routing_source": null,
      "listing_count": 0,
      "merchant_id": "mer_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "metadata": {},
      "name": "Moonrise Bakery",
      "redirects": {},
      "shop_id": "shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "active",
      "updated_at": "2026-11-24T12:00:00Z",
      "url": "https://checkout.withflintpay.com/shop/shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "cGFnZV8y",
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Create shop#

POST/v1/shopsIdempotent

Requires scope checkouts.shops.write

Rate limit: write

Creates a shop for the selected environment.

Request body

buyer_fieldsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout buyer fields. Send null to remove every value you set in this section.

checkout_session_expires_in_secondsinteger or null

Checkout lifetime in seconds. Send null to clear it.

custom_textobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout text. Send null to remove every value you set in this section.

delivery_method_idsarray of string

The complete selection. Send an empty array to follow checkout settings.

descriptionstring or null

Shop description. Send null to clear it.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Send null to clear it.

imageone of or null

Replaced as a whole: send every field you want to keep. Cover image. Send null to remove every value you set in this section.

inactive_messagestring or null

Inactive message. Send null to clear it.

inventory_routing_sourceone of or null

Replaced as a whole: send every field you want to keep. Inventory routing. Send null to remove every value you set in this section.

legalobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout legal configuration. Send null to remove every value you set in this section.

listingsarray of one of

The complete ordered collection of owned listings.

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

Shop name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

paymentsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout payment configuration. Send null to remove every value you set in this section.

promotion_configobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout promotion configuration. Send null to remove every value you set in this section.

redirectsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout redirects. Send null to remove every value you set in this section.

statusenum

Initial shop availability.

  • active
  • inactive
taxobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout tax configuration. Send null to remove every value you set in this section.

tipobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout tipping configuration. Send null to remove every value you set in this section.

Response · 201

Create shop.

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/shops \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "name": "Moonrise Bakery"
  }'

Get shop#

GET/v1/shops/{shop_id}

Requires scope checkouts.shops.read or checkouts.shops.write

Rate limit: read

Returns a shop by ID.

Path parameters

shop_idstringRequired

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

Response · 200

Get shop.

Same response as Create shop.

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

Get shop.

JSON
{
  "data": {
    "checkout_session_expires_in_seconds": null,
    "created_at": "2026-11-24T12:00:00Z",
    "currency": null,
    "delivery_method_ids": [],
    "description": null,
    "external_reference_id": null,
    "handle": null,
    "image": null,
    "inactive_message": null,
    "inventory_routing_source": null,
    "listing_count": 0,
    "merchant_id": "mer_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "metadata": {},
    "name": "Moonrise Bakery",
    "redirects": {},
    "shop_id": "shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "status": "active",
    "updated_at": "2026-11-24T12:00:00Z",
    "url": "https://checkout.withflintpay.com/shop/shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Update shop#

PATCH/v1/shops/{shop_id}Idempotent

Requires scope checkouts.shops.write

Rate limit: write

Updates a shop. Setting status to inactive closes open, unpaid checkouts. Payments already in progress can finish.

Path parameters

shop_idstringRequired

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

Request body

buyer_fieldsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout buyer fields. Send null to remove every value you set in this section.

checkout_session_expires_in_secondsinteger or null

Checkout lifetime in seconds. Send null to clear it.

custom_textobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout text. Send null to remove every value you set in this section.

delivery_method_idsarray of string

The complete selection. Send an empty array to follow checkout settings.

descriptionstring or null

Shop description. Send null to clear it.

expected_versioninteger

Required when any of these fields is present: listings, delivery_method_ids.

external_reference_idstring or null

Caller-owned identifier for this resource in an external system. Send null to clear it.

imageone of or null

Replaced as a whole: send every field you want to keep. Cover image. Send null to remove every value you set in this section.

inactive_messagestring or null

Inactive message. Send null to clear it.

inventory_routing_sourceone of or null

Replaced as a whole: send every field you want to keep. Inventory routing. Send null to remove every value you set in this section.

legalobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout legal configuration. Send null to remove every value you set in this section.

listingsarray of one of

The complete ordered collection of owned listings.

metadatamap of string or null

Merged by key. Send null for a key to remove it, or null for the map to clear caller-owned metadata.

namestring

Shop name. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

paymentsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout payment configuration. Send null to remove every value you set in this section.

promotion_configobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout promotion configuration. Send null to remove every value you set in this section.

redirectsobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout redirects. Send null to remove every value you set in this section.

statusenum

Setting inactive closes open, unpaid checkouts. Payments in progress can finish.

  • active
  • inactive
taxobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout tax configuration. Send null to remove every value you set in this section.

tipobject or null

Patch object: fields you send are applied, fields you omit are unchanged. Checkout tipping configuration. Send null to remove every value you set in this section.

Response · 200

Update shop.

Same response as Create shop.

curl -X PATCH https://api.withflintpay.com/v1/shops/shop_01KEZF7C005VQBPV4FZHDZPAHE \
  -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,
    "listings": [
      {
        "product_id": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "type": "product"
      }
    ]
  }'

Archive shop#

DELETE/v1/shops/{shop_id}Idempotent

Requires scope checkouts.shops.write

Rate limit: write

Archives the shop and leaves it readable. Archiving closes open, unpaid checkouts. Payments already in progress can finish.

Path parameters

shop_idstringRequired

Flint shop ID. Must be a valid ID with prefix shop_. 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

Shop version last read by the caller.

Response · 200

Archive shop.

Same response as Create shop.

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

List shop listings#

GET/v1/shops/{shop_id}/listings

Requires scope checkouts.shops.read or checkouts.shops.write

Rate limit: read

Returns the shop's owned listings in display order. Default order: display position (ascending); this key uniquely orders the results.

Path parameters

shop_idstringRequired

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

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.

Response · 200

List shop listings.

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

List shop listings.

JSON
{
  "data": [
    {
      "is_catalog_item_unavailable": false,
      "product_id": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "resolved_name": "Sourdough loaf",
      "resolved_price_range": {
        "max_unit_price_money": {
          "amount": 800,
          "currency": "USD"
        },
        "min_unit_price_money": {
          "amount": 800,
          "currency": "USD"
        }
      },
      "shop_id": "shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "shop_listing_id": "shl_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "type": "product"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "cGFnZV8y",
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Get public shop listing#

GET/v1/shops/{shop_id}/listings/{shop_listing_id}/public

No API key required

Rate limit: per IP

Get public shop listing without an API key.

Path parameters

shop_idstringRequired

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

shop_listing_idstringRequired

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

Response · 200

Get public shop listing.

  • Cache-Control: Prevents storage of this private response.
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 https://api.withflintpay.com/v1/shops/shop_01KEZF7C005VQBPV4FZHDZPAHE/listings/shl_01KEZF7C005YZXRPWEH31ZXGKA/public \
  -H "Flint-Version: 2026-09-07"

Get public shop listing.

JSON
{
  "data": {
    "available_variants": [
      {
        "compare_at_price_money": null,
        "is_sold_out": false,
        "name": "Sourdough loaf",
        "product_id": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "quantity_price_breaks": [],
        "selected_options": [],
        "unit_price_money": {
          "amount": 800,
          "currency": "USD"
        },
        "variant_id": "var_01ARZ3NDEKTSV4RRFFQ69G5FAV"
      }
    ],
    "category_handles": [],
    "compare_at_price_money": null,
    "images": [],
    "is_sold_out": false,
    "name": "Sourdough loaf",
    "price_range": {
      "max_unit_price_money": {
        "amount": 800,
        "currency": "USD"
      },
      "min_unit_price_money": {
        "amount": 800,
        "currency": "USD"
      }
    },
    "product_id": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "product_options": [],
    "requires_selection": false,
    "shop_listing_id": "shl_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "type": "product"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Get public shop#

GET/v1/shops/{shop_id}/public

No API key required

Rate limit: per IP

Get public shop without an API key.

Path parameters

shop_idstringRequired

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

Response · 200

Get public shop.

  • Cache-Control: Prevents storage of this private response.
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 https://api.withflintpay.com/v1/shops/shop_01KEZF7C005VQBPV4FZHDZPAHE/public \
  -H "Flint-Version: 2026-09-07"

Get public shop.

JSON
{
  "data": {
    "categories": [],
    "checkout_start_due_at": "2026-11-25T11:58:00Z",
    "listings": [
      {
        "category_handles": [],
        "compare_at_price_money": null,
        "is_sold_out": false,
        "name": "Sourdough loaf",
        "price_range": {
          "max_unit_price_money": {
            "amount": 800,
            "currency": "USD"
          },
          "min_unit_price_money": {
            "amount": 800,
            "currency": "USD"
          }
        },
        "product_id": "prod_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "requires_selection": false,
        "shop_listing_id": "shl_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "type": "product"
      }
    ],
    "merchant_name": "Moonrise Bakery",
    "resolution_context": "shrc_v1.example",
    "resolution_context_expires_at": "2026-11-25T12:00:00Z",
    "shop": {
      "currency": "USD",
      "name": "Moonrise Bakery",
      "shop_id": "shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "active",
      "url": "https://checkout.withflintpay.com/shop/shop_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "version": 1
    },
    "show_flint_mark": true
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Resolve shop#

POST/v1/shops/{shop_id}/resolveIdempotent

No API key required

Rate limit: per IP

Creates a hosted checkout session and its order from a cart. Reuse the same resolution context and idempotency key to retry the same cart.

Path parameters

shop_idstringRequired

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

Request body

client_referencestring

Buyer or cart reference copied to the order and checkout session.

line_itemsarray of objectRequired

Cart lines in order. Lines may repeat a listing.

prefillobject

Buyer-editable email prefill.

resolution_contextstringRequired

Private resolution context from the public shop read.

Response · 201

The hosted checkout launch and its order ID.

  • Cache-Control: Prevents storage of this private response.
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/shops/shop_01KEZF7C005VQBPV4FZHDZPAHE/resolve \
  -H "Flint-Version: 2026-09-07" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "quantity": 2,
        "shop_listing_id": "shl_01ARZ3NDEKTSV4RRFFQ69G5FAV"
      }
    ],
    "resolution_context": "shrc_v1.example"
  }'

Was this helpful?