Orders

Orders are the central commerce resource in Flint. Every sale flows through an order: it holds line items, discounts, charges, tax, a requested tip, and the full pricing and settlement state for the transaction. Other resources attach to orders rather than replacing them: payments, refunds, invoices, checkout sessions, and subscriptions all read from and write back to an order.

Line items come from your catalog (a variant_id or bundle_id, with price and display resolved automatically) or are ad hoc (you provide the name and unit price). Adding inventory_demands makes an ad hoc line item tracked. An order stays open while you build it, then settles through payment: pay it in full, or close it explicitly when no balance remains. pricing_amounts reflects what the order should collect; settlement_amounts reflects what has been paid, refunded, and is still outstanding.

Set delivery_destination when a shipment or local delivery order does not use Flint's delivery selection flow. You can replace the whole destination while the order is open and unpaid, or set delivery_destination to null before removing its last delivery obligation. A checkout delivery selection controls the field while that selection is active, and payment sets frozen_at. Correct a later delivery problem on fulfillment.recipient; that changes where the fulfillment runs without rewriting what the buyer committed to.

Use PATCH /v1/orders/{order_id} for scalar order changes. The same request can update metadata, delivery_destination, tax, and requested_tip. Set requested_tip to a fixed amount_money or a percent; set it to null to clear the current request. Set delivery_destination to null to clear it. Metadata values merge by key, and a null value removes that key.

Remove one line item or charge with its DELETE route. Remove several discounts in one request with POST /v1/orders/{order_id}/discounts/remove. Use POST /v1/orders/{order_id}/discounts/reprice after an eligibility input changes and you want Flint to recalculate the applied discounts.

If any line item resolves to a variant with inventory_tracking: "tracked", the order needs an inventory_routing_source before it can hold stock: either a fixed Location or an allocation policy. Flint holds the routed quantity when payment begins, commits it when payment succeeds, and consumes it when fulfillment hands the goods off. inventory_reservation_id points at the claim. If payment succeeds but the stock cannot be committed, inventory_exception_status reads paid_inventory_failed and the order waits for POST /v1/orders/{order_id}/inventory-exception/resolve, unless your settings tell Flint to refund automatically instead. See the Inventory guide for the whole path.

For the model behind this design, see the Orders-first guide. To collect payment against an order, use checkout sessions for hosted payment, invoices for receivables, or payments for direct integration.

Endpoints

The Order object#

Every field on an order, as returned by retrieve and carried by the endpoints below.

Attributes
active_payment_attemptobject
applied_discountsarray of object
authorization_amountsobject
buyer_emailstring
buyer_notestring
chargesarray of object
checkout_session_idsarray of string
closed_reasonstring

Internal reason supplied when the order was closed. This is not shown to the buyer.

created_atstring

RFC3339 timestamp.

customerobject or null
customer_idstring
delivery_destinationobject

The shipment or local-delivery destination committed for this order. Payment freezes this value; fulfillment recipient changes do not replace it.

external_reference_idstring

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

fulfillment_statusenum
not_fulfilledpartially_fulfilledfulfilledcancelednot_applicableclosed
fulfillmentsarray of object
internal_notestring
inventory_exception_statusenum
paid_inventory_failedresolved
inventory_reservation_idstring

The reservation holding stock for this order, when one exists.

inventory_routing_sourceobject

Where this order's tracked demand is routed. Required before an order containing tracked variants can hold stock.

line_itemsarray of objectrequired
merchant_idstring
metadatamap of string
order_idstringrequired
order_numberstring
originenum
virtual_terminalpayment_linkcheckoutapisubscription
payment_collectionobject
payment_intent_idsarray of string
payment_intentsarray of object
payment_statusenumrequired
unpaidpartially_paidpaid
plan_idstring
pricing_amountsobjectrequired
refund_idsarray of string
refund_statusenumrequired
nonepartially_refundedrefunded
requested_tipobject
settlement_amountsobjectrequired
setup_collectionobject
statusenumrequired
openclosed
subscriptionobject or null
subscription_idstring
subscription_planobject or null
taxobjectrequired
tipsarray of object
updated_atstring

RFC3339 timestamp.

JSON
{
  "created_at": "2026-03-17T14:30:00Z",
  "customer_id": "cus_123",
  "line_items": [
    {
      "base_subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "inventory_snapshot": null,
      "metadata": {
        "ticket_type": "ga"
      },
      "modifier_total_money": {
        "amount": 0,
        "currency": "USD"
      },
      "name": "General Admission",
      "order_line_item_id": "li_123",
      "quantity": 2,
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_quantity": 0,
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "unit_price_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "version": 1
    }
  ],
  "merchant_id": "mer_123",
  "metadata": {
    "event_id": "evt_123"
  },
  "order_id": "ord_123",
  "order_number": "1001",
  "origin": "api",
  "payment_status": "unpaid",
  "pricing_amounts": {
    "charge_money": {
      "amount": 0,
      "currency": "USD"
    },
    "discount_money": {
      "amount": 0,
      "currency": "USD"
    },
    "requested_tip_money": {
      "amount": 0,
      "currency": "USD"
    },
    "subtotal_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "tax_money": {
      "amount": 0,
      "currency": "USD"
    },
    "total_money": {
      "amount": 5000,
      "currency": "USD"
    }
  },
  "refund_status": "none",
  "settlement_amounts": {
    "balance_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "credit_money": {
      "amount": 0,
      "currency": "USD"
    },
    "net_collected_money": {
      "amount": 0,
      "currency": "USD"
    },
    "outstanding_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "paid_money": {
      "amount": 0,
      "currency": "USD"
    },
    "refunded_money": {
      "amount": 0,
      "currency": "USD"
    },
    "settled_tip_money": {
      "amount": 0,
      "currency": "USD"
    }
  },
  "status": "open",
  "tax": {
    "enabled": false,
    "mode": "automatic",
    "status": "not_required",
    "taxability_reason": "tax_disabled"
  },
  "updated_at": "2026-03-17T14:30:00Z"
}

List orders#

GET/v1/ordersRequires scope: commerce.orders.read or commerce.orders.write

Returns a paginated list of orders for the authenticated merchant.

Query parameters
page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

customer_idstring

Filter by customer ID.

statusenum

Filter by workflow status.

openclosed
payment_statusenum

Filter by settled collection status.

unpaidpartially_paidpaid
refund_statusenum

Filter by refund progress.

nonepartially_refundedrefunded
fulfillment_statusarray of enum

Filter by aggregate order fulfillment status. Repeat the parameter to OR multiple statuses.

not_fulfilledpartially_fulfilledfulfilledcanceled
order_numberstring

Filter by merchant-visible order number.

external_reference_idstring

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

originenum

Filter by order origin.

virtual_terminalpayment_linkcheckoutapisubscription
querystring

Search across order number, external_reference_id, fulfillment external_reference_id, notes, and line item names.

subscription_idstring

Filter by subscription ID.

return_idstring

Filter by the Return that created a replacement order.

return_resolution_idstring

Filter by the ReturnResolution that created a replacement order.

min_amountinteger

Inclusive lower bound on the order total in minor units. Requires currency.

max_amountinteger

Inclusive upper bound on the order total in minor units. Requires currency.

currencystring

ISO 4217 currency for min_amount and max_amount.

sort_byenum

Sort field.

created_atupdated_atoutstanding_moneytotal
sort_directionenum

Sort direction.

ascdesc
created_afterstring

RFC3339 lower bound for created_at.

created_beforestring

RFC3339 upper bound for created_at.

updated_afterstring

RFC3339 lower bound for updated_at.

updated_beforestring

RFC3339 upper bound for updated_at.

Response · 200
dataarray of objectrequired
metaobject
next_page_tokenstring
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDED
Bash
curl https://api.withflintpay.com/v1/orders \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_123",
      "line_items": [
        {
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "inventory_snapshot": null,
          "metadata": {
            "ticket_type": "ga"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "name": "General Admission",
          "order_line_item_id": "li_123",
          "quantity": 2,
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "version": 1
        }
      ],
      "merchant_id": "mer_123",
      "metadata": {
        "event_id": "evt_123"
      },
      "order_id": "ord_123",
      "order_number": "1001",
      "origin": "api",
      "payment_status": "unpaid",
      "pricing_amounts": {
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "refund_status": "none",
      "settlement_amounts": {
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "status": "open",
      "tax": {
        "enabled": false,
        "mode": "automatic",
        "status": "not_required",
        "taxability_reason": "tax_disabled"
      },
      "updated_at": "2026-03-17T14:30:00Z"
    }
  ],
  "next_page_token": "Zm9yd2FyZC1vbmx5LW9wYXF1ZS1jdXJzb3I",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Create order#

POST/v1/ordersIdempotentRequires scope: commerce.orders.write

Creates an order for the authenticated merchant. For USD orders, an effective requested tip may be up to the larger of $1,000 or 100% of the post-discount merchandise subtotal.

Request body
buyer_notestring
customer_idstring
delivery_destinationobject

Shipment or local-delivery destination for an order created without a delivery selection.

discountsarray of one of
external_reference_idstring

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

internal_notestring
inventory_routing_sourceobject
line_itemsarray of one ofrequired
metadatamap of string
requested_tipone of

Optional requested tip. Its effective amount must satisfy the CreateOrderTip limit.

taxone of
Response · 201
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDAUTOMATIC_TAX_COMPONENTS_FORBIDDENAUTOMATIC_TAX_EXEMPTION_UNSUPPORTEDAUTOMATIC_TAX_MULTIPLE_DESTINATIONSAUTOMATIC_TAX_MULTIPLE_ORIGINSAUTOMATIC_TAX_POST_TAX_DISCOUNT_UNSUPPORTEDBUNDLE_NOT_SELLABLECATALOG_INVENTORY_RELATIONSHIP_INVALIDCATALOG_LINE_ITEM_CURRENCY_CHANGEDCATALOG_LINE_ITEM_FIELDS_READ_ONLYCATALOG_LINE_ITEM_SOURCE_CHANGEDCHECKOUT_TAX_CALCULATION_LIMIT_REACHEDCREATE_ORDER_LINE_ITEM_DISCOUNT_UNSUPPORTEDCURRENCY_MISMATCHDELIVERY_DESTINATION_ADDRESS_INCOMPLETEDELIVERY_DESTINATION_ADDRESS_REQUIREDDELIVERY_DESTINATION_COUNTRY_INVALIDDELIVERY_DESTINATION_FIELD_TOO_LONGDELIVERY_DESTINATION_NOT_APPLICABLEDISCOUNT_AMOUNT_INVALIDDUPLICATE_ORDER_CHARGE_IDDUPLICATE_TAX_COMPONENTEXTERNAL_IMAGE_NOT_ALLOWEDEXTERNAL_TAX_COMPONENTS_REQUIREDFIELD_REQUIREDFLAT_TAX_PRICE_MODE_INVALIDFLAT_TAX_SCOPE_INVALIDFULFILLMENT_BUNDLE_UNSUPPORTEDFULFILLMENT_CONFIGURATION_ACTION_REQUIREDFULFILLMENT_PROFILE_REVISION_UNUSABLEFULFILLMENT_REQUIREMENT_REQUIREDIDEMPOTENCY_CLEAR_FAILEDIDEMPOTENCY_KEY_IN_PROGRESSIDEMPOTENCY_KEY_REUSEDIDEMPOTENCY_LOAD_FAILEDIDEMPOTENCY_PERSIST_FAILEDIDEMPOTENCY_RECORD_INVALIDIDEMPOTENCY_RECOVERY_REQUIREDIMAGE_ASSET_NOT_ATTACHABLEIMAGE_ASSET_NOT_FOUNDIMAGE_URL_INVALIDIMAGE_URL_MUST_BE_CANONICALINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_CURRENCYINVALID_DISCOUNTINVALID_DISCOUNT_CLASSINVALID_DISCOUNT_SCOPEINVALID_FIELD_TYPEINVALID_FLAT_TAXINVALID_FULFILLMENT_REQUIREMENTINVALID_IDINVALID_IDEMPOTENCY_KEYINVALID_IMAGE_ALTINVALID_LINE_ITEMSINVALID_METADATA_KEYINVALID_REQUESTINVALID_TAX_CALCULATION_TYPEINVALID_TAX_CATEGORYINVALID_TAX_JURISDICTIONINVALID_TAX_MODEINVALID_TAX_PERCENTAGEINVALID_TAX_PRICE_MODEINVALID_TAX_TYPEINVALID_TIPINVALID_TIP_AMOUNTINVALID_TIP_PERCENTINVALID_TOTALSINVENTORY_DEMAND_DUPLICATEINVENTORY_DEMAND_INVALIDINVENTORY_ROUTING_SOURCE_INVALIDINVENTORY_ROUTING_SOURCE_REQUIREDLINE_ITEM_INVALID_QUANTITYLINE_ITEM_NAME_REQUIREDLINE_ITEM_NAME_TOO_LONGLINE_ITEM_NEGATIVE_PRICELINE_ITEM_PRICE_REQUIREDLINE_ITEM_QUANTITY_TOO_LARGELINE_ITEM_SOURCE_CONFLICTLINE_ITEM_UNIT_PRICE_REQUIREDMETADATA_KEY_TOO_LONGMETADATA_TOO_LARGEMETADATA_TOO_MANY_KEYSMETADATA_VALUE_TOO_LONGMISSING_LINE_ITEMSMODIFIER_CURRENCY_MISMATCHMODIFIER_DUPLICATE_SELECTIONMODIFIER_GROUP_REQUIREDMODIFIER_QUANTITY_INVALIDMODIFIER_SELECTION_LIMIT_EXCEEDEDMODIFIER_SOURCE_UNSUPPORTEDMODIFIER_TEXT_INVALIDMODIFIER_UNAVAILABLENOTE_TOO_LONGNO_DISCOUNTABLE_BALANCENULL_NOT_ALLOWEDORDER_CHARGE_NOT_FOUNDORDER_CHARGE_TAX_INPUT_REQUIREDORDER_DISCOUNT_NO_CHARGE_IDSORDER_DISCOUNT_NO_LINE_ITEM_IDSORDER_LINE_ITEM_TAX_INPUT_REQUIREDORDER_PERCENTAGE_TAX_FORBIDDENORDER_TAX_CALCULATION_FAILEDORDER_TAX_LOCATION_INVALIDORDER_TAX_RATE_UNAVAILABLEORDER_TAX_UNSUPPORTED_COUNTRYPRODUCT_LINE_ITEM_SOURCE_UNSUPPORTEDPROMOTION_CONFLICTPROMOTION_DECLINEDPROMOTION_ID_REQUIREDPROMOTION_NOT_REDEEMABLEPROMOTION_NO_ACTIVE_CODESRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESERVED_METADATA_KEYRESOURCE_NOT_FOUNDSERVICE_CHARGE_DISCOUNT_NO_LINE_ITEM_IDSSERVICE_CHARGE_DISCOUNT_REQUIRES_CHARGE_IDSSERVICE_CHARGE_DISCOUNT_SCOPE_INVALIDSERVICE_UNAVAILABLETAX_CALCULATION_REQUIREDTAX_INPUT_CONFLICTTAX_MODE_MISMATCHTIP_CURRENCY_MISMATCHTIP_LIMIT_EXCEEDEDTOO_MANY_LINE_ITEMSUNKNOWN_FIELDUNSUPPORTED_CURRENCYVARIANT_NOT_SELLABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "discounts": [
      {
        "manual": {
          "amount_money": {
            "amount": 500,
            "currency": "USD"
          },
          "name": "Launch credit"
        }
      }
    ],
    "line_items": [
      {
        "metadata": {
          "ticket_type": "ga"
        },
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        }
      }
    ],
    "metadata": {
      "event_id": "evt_123"
    }
  }'

Get order#

GET/v1/orders/{order_id}Requires scope: commerce.orders.read or commerce.orders.write

Returns a single order by ID.

Path parameters
order_idstringrequired

Flint order ID.

Query parameters
expandarray of enum

Supported expansions: customer, fulfillments.packages, fulfillments.shipments, payment_intents, subscription, subscription_plan. Expansion requires the base order read scope plus the read scope for each expanded resource. Limits: at most 10 unique expand paths per request; path depth at most 2. To-many expansions are capped at 20 related objects per path. Repeat expand, for example expand=customer&expand=fulfillments.packages, or pass one comma-separated value.

customerfulfillments.packagesfulfillments.shipmentspayment_intentssubscriptionsubscription_plan
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDDANGLING_EXPANSION_REFERENCEEXPANSION_DEPENDENCY_UNAVAILABLEEXPANSION_RESOLUTION_FAILEDINSUFFICIENT_SCOPEINTERNAL_ERRORINVALID_API_KEYINVALID_EXPANDINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl https://api.withflintpay.com/v1/orders/ord_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_123",
    "line_items": [
      {
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "inventory_snapshot": null,
        "metadata": {
          "ticket_type": "ga"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "name": "General Admission",
        "order_line_item_id": "li_123",
        "quantity": 2,
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "version": 1
      }
    ],
    "merchant_id": "mer_123",
    "metadata": {
      "event_id": "evt_123"
    },
    "order_id": "ord_123",
    "order_number": "1001",
    "origin": "api",
    "payment_status": "unpaid",
    "pricing_amounts": {
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "refund_status": "none",
    "settlement_amounts": {
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "status": "open",
    "tax": {
      "enabled": false,
      "mode": "automatic",
      "status": "not_required",
      "taxability_reason": "tax_disabled"
    },
    "updated_at": "2026-03-17T14:30:00Z"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update order#

PATCH/v1/orders/{order_id}IdempotentRequires scope: commerce.orders.write

Applies a sparse update to mutable order fields such as customer_id, notes, metadata, tax, the delivery destination, and the requested tip. Send requested_tip: null to clear the current requested tip.

Path parameters
order_idstringrequired

Flint order ID.

Request body
buyer_notestring
customer_idstring
delivery_destinationobject or null

Complete replacement destination. Allowed only while the order is open and unpaid and no delivery selection controls it.

external_reference_idstring

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

internal_notestring
inventory_routing_sourceobject
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 metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

requested_tipone of or null

Requested tip to set or replace. Send null to clear the current requested tip.

taxone of
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDAUTOMATIC_TAX_COMPONENTS_FORBIDDENAUTOMATIC_TAX_EXEMPTION_UNSUPPORTEDAUTOMATIC_TAX_MULTIPLE_DESTINATIONSAUTOMATIC_TAX_MULTIPLE_ORIGINSAUTOMATIC_TAX_POST_TAX_DISCOUNT_UNSUPPORTEDCHECKOUT_ORDER_UPDATE_FIELD_NOT_ALLOWEDCHECKOUT_PAYMENT_RESOLVINGCHECKOUT_TAX_CALCULATION_LIMIT_REACHEDCHECKOUT_TIPPING_DISABLEDCHECKOUT_TIP_NOT_ALLOWEDDELIVERY_DESTINATION_ADDRESS_INCOMPLETEDELIVERY_DESTINATION_ADDRESS_REQUIREDDELIVERY_DESTINATION_CONTROLLED_BY_SELECTIONDELIVERY_DESTINATION_COUNTRY_INVALIDDELIVERY_DESTINATION_FIELD_TOO_LONGDELIVERY_DESTINATION_FROZENDELIVERY_DESTINATION_NOT_APPLICABLEDELIVERY_DESTINATION_UPDATE_CONFLICTDUPLICATE_TAX_COMPONENTEXTERNAL_TAX_COMPONENTS_REQUIREDFIELD_REQUIREDFLAT_TAX_PRICE_MODE_INVALIDIDEMPOTENCY_CLEAR_FAILEDIDEMPOTENCY_KEY_IN_PROGRESSIDEMPOTENCY_KEY_REUSEDIDEMPOTENCY_LOAD_FAILEDIDEMPOTENCY_PERSIST_FAILEDIDEMPOTENCY_RECORD_INVALIDIDEMPOTENCY_RECOVERY_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_FIELD_TYPEINVALID_FLAT_TAXINVALID_IDINVALID_IDEMPOTENCY_KEYINVALID_METADATA_KEYINVALID_ORDER_STATUSINVALID_REQUESTINVALID_TAX_CALCULATION_TYPEINVALID_TAX_CATEGORYINVALID_TAX_JURISDICTIONINVALID_TAX_MODEINVALID_TAX_PRICE_MODEINVALID_TAX_TYPEINVALID_TIPINVALID_TIP_AMOUNTINVALID_TIP_PERCENTINVALID_TOTALSINVENTORY_RESERVATION_EXISTSINVENTORY_ROUTING_SOURCE_INVALIDINVENTORY_ROUTING_SOURCE_REQUIREDINVOICE_LOCKED_ORDER_FINANCIALSMETADATA_KEY_TOO_LONGMETADATA_TOO_LARGEMETADATA_TOO_MANY_KEYSMETADATA_VALUE_TOO_LONGNOTE_TOO_LONGNO_FIELDS_TO_UPDATENULL_NOT_ALLOWEDORDER_CHARGE_TAX_INPUT_REQUIREDORDER_CLOSEDORDER_COLLECTION_ALREADY_ACTIVEORDER_CONFLICTORDER_CUSTOMER_ALREADY_SETORDER_CUSTOMER_CHECKOUT_ACTIVEORDER_CUSTOMER_NOT_CLEARABLEORDER_CUSTOMER_NOT_UPDATABLE_AFTER_PAYMENTORDER_FINANCIAL_MUTATION_NOT_ALLOWEDORDER_LINE_ITEM_TAX_INPUT_REQUIREDORDER_PERCENTAGE_TAX_FORBIDDENORDER_TAX_CALCULATION_FAILEDORDER_TAX_LOCATION_INVALIDORDER_TAX_NOT_UPDATABLE_AFTER_PAYMENTORDER_TAX_RATE_UNAVAILABLEORDER_TAX_UNSUPPORTED_COUNTRYORDER_TIP_MODEL_UNSUPPORTEDORDER_TOTAL_BELOW_NET_COLLECTEDPAYMENT_ATTEMPT_FROZENPAYMENT_ATTEMPT_IN_PROGRESSPAYMENT_ATTEMPT_STILL_PROCESSINGPRODUCT_LINE_ITEM_SOURCE_UNSUPPORTEDRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESERVED_METADATA_KEYRESOURCE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLETAX_CALCULATION_REQUIREDTAX_INPUT_CONFLICTTAX_MODE_MISMATCHTIP_CURRENCY_MISMATCHTIP_LIMIT_EXCEEDEDUNKNOWN_FIELD
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "buyer_note": "Please include a gift receipt.",
    "internal_note": "VIP hold",
    "metadata": {
      "priority": "vip"
    },
    "requested_tip": {
      "percent": 18
    }
  }'

List order activities#

GET/v1/orders/{order_id}/activitiesRequires scope: commerce.orders.read or commerce.orders.write

Returns a read-only, human-readable history log for an order. Use it to render timelines and debug what happened, not as a source of truth, ledger, or webhook replacement. Read the owning resource for authoritative state: the order for balances and status, the payment for payment state, the refund for refund outcomes, and the checkout session for checkout state. Do not sum balance_delta_money to compute an order balance. Informational rows such as payment_failed, refund_failed, and checkout_session_expired have a zero balance delta. The default order is newest first. Use sort_direction=asc for chronological timeline rendering. A typical chronological log might show created, payment_failed, payment, refund, then refund_failed; each row gives one reference to click through for the authoritative resource.

Path parameters
order_idstringrequired

Flint order ID.

Query parameters
page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

sort_directionenum

Sort direction.

ascdesc
typearray of enum

Filter by activity type. Repeat the parameter or pass comma-separated values to OR multiple types.

createdline_item_addedline_item_updatedline_item_removeddiscount_applieddiscount_removedtax_updatedrequested_tip_addedrequested_tip_updatedrequested_tip_removedcharge_addedcharge_updatedcharge_removedcharge_fulfillment_updatedorder_updatedadjustmentclosedpaymentpayment_failedrefundrefund_failedcheckout_session_createdcheckout_session_expiredcheckout_session_invalidatedfulfillment_createdfulfillment_updatedfulfillment_state_changed
Response · 200
dataarray of objectrequired
metaobject
next_page_tokenstring
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/orders/ord_123/activities \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "activity_type": "payment",
      "balance_delta_money": {
        "amount": -5000,
        "currency": "USD"
      },
      "created_at": "2026-03-17T14:35:00Z",
      "description": "Payment received",
      "order_activity_id": "act_123",
      "payment_intent_id": "pi_123",
      "running_balance_money": {
        "amount": 0,
        "currency": "USD"
      }
    }
  ],
  "next_page_token": "Zm9yd2FyZC1vbmx5LW9wYXF1ZS1jdXJzb3I",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Add order charge#

POST/v1/orders/{order_id}/chargesIdempotentRequires scope: commerce.orders.write

Adds a service charge, fee, or surcharge to an order.

Path parameters
order_idstringrequired

Flint order ID.

Request body
chargeone ofrequired
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/charges \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "charge": {
      "amount_money": {
        "amount": 500,
        "currency": "USD"
      },
      "fulfillment_id": "ful_123",
      "name": "Delivery",
      "tax": {
        "taxable": true
      },
      "type": "delivery_fee"
    }
  }'

Update order charge#

PATCH/v1/orders/{order_id}/charges/{order_charge_id}IdempotentRequires scope: commerce.orders.write

Updates a single service charge, fee, or surcharge on an order.

Path parameters
order_idstringrequired

Flint order ID.

order_charge_idstringrequired

Flint order charge ID.

Request body
amount_moneyobject

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

calculation_basisenum
subtotal_pre_discountsubtotal_post_discount
descriptionstring
fulfillment_idstring
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 metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

namestring
percentnumber
taxobject
typeenum
service_feedelivery_feeshipping_feehandling_feepackaging_feesmall_order_feeservice_area_feesetup_feeinstallation_feecleaning_feebooking_feereservation_feeticket_feefulfillment_feerestocking_feerush_feeother
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123/charges/{order_charge_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 700,
      "currency": "USD"
    },
    "fulfillment_id": "ful_123",
    "name": "Priority delivery"
  }'

Delete order charge#

DELETE/v1/orders/{order_id}/charges/{order_charge_id}IdempotentRequires scope: commerce.orders.write

Removes a single service charge, fee, or surcharge from an order.

Path parameters
order_idstringrequired

Flint order ID.

order_charge_idstringrequired

Flint order charge ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X DELETE https://api.withflintpay.com/v1/orders/ord_123/charges/{order_charge_id} \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Close order#

POST/v1/orders/{order_id}/closeIdempotentRequires scope: commerce.orders.write

Closes an eligible open, paid, or partially refunded order. Closing cancels pending discounts, releases pending promotion reservations, and recalculates totals from the current surviving pricing economics; canceled discounts remain visible with status: "canceled" but no longer reduce the total. Closing is blocked while payment collection is in progress.

Path parameters
order_idstringrequired

Flint order ID.

Request body
reasonstring

Internal reason for closing the order. This is not shown to the buyer.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTORDER_ALREADY_CLOSEDORDER_REFUNDEDORDER_STATUS_NOT_CLOSABLEPAYMENT_ATTEMPT_FROZENPAYMENT_ATTEMPT_IN_PROGRESSPAYMENT_ATTEMPT_STILL_PROCESSINGRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/close \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "Customer canceled before payment."
  }'

Get current order delivery selection#

GET/v1/orders/{order_id}/delivery-selections/currentRequires scope: commerce.orders.read or commerce.orders.write

Returns the delivery selection committed to an order.

Path parameters
order_idstringrequired

Flint order ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDDELIVERY_ELIGIBILITY_CONTEXT_CHANGEDDELIVERY_EXPECTED_SELECTION_REQUIREDDELIVERY_EXTERNAL_REFERENCE_REUSEDDELIVERY_OPTION_ALREADY_SELECTEDDELIVERY_OPTION_EXPIREDDELIVERY_OPTION_NOT_IN_CHOICE_GROUPDELIVERY_QUOTE_EXPIREDDELIVERY_QUOTE_INPUT_CHANGEDDELIVERY_QUOTE_REVOKEDDELIVERY_SELECTION_CHANGEDDELIVERY_SELECTION_EXPIREDDELIVERY_SELECTION_INCOMPLETEDELIVERY_SELECTION_REPLACEMENT_LIMITDELIVERY_SELECTION_UNAVAILABLEDELIVERY_SERVICE_UNAVAILABLEDELIVERY_WINDOW_EXPIREDDELIVERY_WINDOW_INVALIDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl https://api.withflintpay.com/v1/orders/ord_123/delivery-selections/current \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "amount_money": {
      "amount": 0,
      "currency": "USD"
    },
    "calculation_expires_at": "2026-08-02T16:00:00Z",
    "checkout_session_id": "cs_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "choices": [
      {
        "amount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "delivery_choice_group_id": "dcgrp_01K1P6G4M7H2N8Q9R3S5T6V7WX",
        "delivery_method_id": "dmet_01K1P6G4M7H2N8Q9R3S5T6V7WX",
        "delivery_option_id": "dopt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
        "delivery_plan": {
          "type": "single_delivery"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "name": "Standard delivery",
        "stable_key": "example",
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "type": "shipment"
      }
    ],
    "created_at": "2026-08-02T16:00:00Z",
    "delivery_quote_id": "dqt_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "delivery_quote_revision": 0,
    "delivery_selection_id": "dsel_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "eligibility_context_revision": 0,
    "expires_at": "2026-08-02T16:00:00Z",
    "lifecycle_updated_at": "2026-08-02T16:00:00Z",
    "limiting_deadline_reason": "selection_guarantee_expiry",
    "order_id": "ord_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "status": "selected"
  },
  "request_id": "req_01K1P6G4M7H2N8Q9R3S5T6V7WX"
}

Apply discount#

POST/v1/orders/{order_id}/discountsIdempotentRequires scope: commerce.orders.write

Applies a promotion-backed or manual discount to an order. Checkout-authenticated buyers must provide a promotion code; resource IDs and manual discounts require merchant authentication.

Path parameters
order_idstringrequired

Flint order ID.

Request body
promotionobject
manualobject
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDCHECKOUT_DISCOUNT_ID_NOT_ALLOWEDCHECKOUT_MANUAL_DISCOUNT_NOT_ALLOWEDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/discounts \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "promotion": {
      "promotion_code": "SPRING15"
    }
  }'

Preview discounts#

POST/v1/orders/{order_id}/discounts/previewRequires scope: commerce.orders.read or commerce.orders.write

Evaluates promotion outcomes for an order without mutating it. Merchant-authenticated callers may include a promotion by promotion_id or promotion_code; checkout-authenticated buyers must provide a code. The response includes applied, skipped, and single-threshold available promotion candidates.

Path parameters
order_idstringrequired

Flint order ID.

Request body
discountone of
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDCHECKOUT_DISCOUNT_ID_NOT_ALLOWEDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/discounts/preview \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "discount": {
      "promotion": {
        "promotion_code": "SPRING15"
      }
    }
  }'

Remove discounts#

POST/v1/orders/{order_id}/discounts/removeIdempotentRequires scope: commerce.orders.write

Removes one or more pending applied discounts from an order. Redeemed or canceled discounts are settlement history and cannot be removed.

Path parameters
order_idstringrequired

Flint order ID.

Request body
order_discount_idsarray of stringrequired
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDCHECKOUT_DISCOUNT_NOT_REMOVABLEINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/discounts/remove \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "order_discount_ids": [
      "01JFXH8Z2K7QF9V3MB0N4T6RCP"
    ]
  }'

Reprice discounts#

POST/v1/orders/{order_id}/discounts/repriceIdempotentRequires scope: commerce.orders.write

Recalculates pending discounts and automatic promotions for a mutable order.

Path parameters
order_idstringrequired

Flint order ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/discounts/reprice \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Resolve order inventory exception#

POST/v1/orders/{order_id}/inventory-exception/resolveIdempotentRequires scope: commerce.orders.write

Marks a paid inventory failure as resolved after an operator has completed manual inventory remediation.

Path parameters
order_idstringrequired

Flint order ID.

Request body
reasonstring
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/inventory-exception/resolve \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "Manual inventory sourced and deducted."
  }'

Add line items#

POST/v1/orders/{order_id}/line-itemsIdempotentRequires scope: commerce.orders.write

Adds one or more line items to an order.

Path parameters
order_idstringrequired

Flint order ID.

Request body
line_itemsarray of one ofrequired
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDAUTOMATIC_TAX_COMPONENTS_FORBIDDENAUTOMATIC_TAX_MULTIPLE_DESTINATIONSAUTOMATIC_TAX_MULTIPLE_ORIGINSAUTOMATIC_TAX_POST_TAX_DISCOUNT_UNSUPPORTEDBUNDLE_NOT_SELLABLECATALOG_INVENTORY_RELATIONSHIP_INVALIDCATALOG_LINE_ITEM_CURRENCY_CHANGEDCATALOG_LINE_ITEM_FIELDS_READ_ONLYCATALOG_LINE_ITEM_SOURCE_CHANGEDCHECKOUT_TAX_CALCULATION_LIMIT_REACHEDCURRENCY_MISMATCHDUPLICATE_TAX_COMPONENTEXTERNAL_IMAGE_NOT_ALLOWEDEXTERNAL_TAX_COMPONENTS_REQUIREDFIELD_REQUIREDFLAT_TAX_SCOPE_INVALIDFULFILLMENT_BUNDLE_UNSUPPORTEDFULFILLMENT_CONFIGURATION_ACTION_REQUIREDFULFILLMENT_PROFILE_REVISION_UNUSABLEFULFILLMENT_REQUIREMENT_REQUIREDIDEMPOTENCY_CLEAR_FAILEDIDEMPOTENCY_KEY_IN_PROGRESSIDEMPOTENCY_KEY_REUSEDIDEMPOTENCY_LOAD_FAILEDIDEMPOTENCY_PERSIST_FAILEDIDEMPOTENCY_RECORD_INVALIDIDEMPOTENCY_RECOVERY_REQUIREDIMAGE_ASSET_NOT_ATTACHABLEIMAGE_ASSET_NOT_FOUNDIMAGE_URL_INVALIDIMAGE_URL_MUST_BE_CANONICALINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_CURRENCYINVALID_FIELD_TYPEINVALID_FULFILLMENT_REQUIREMENTINVALID_IDINVALID_IDEMPOTENCY_KEYINVALID_IMAGE_ALTINVALID_LINE_ITEMSINVALID_METADATA_KEYINVALID_REQUESTINVALID_TAX_CALCULATION_TYPEINVALID_TAX_CATEGORYINVALID_TAX_JURISDICTIONINVALID_TAX_PERCENTAGEINVALID_TAX_PRICE_MODEINVALID_TAX_TYPEINVALID_TOTALSINVENTORY_DEMAND_DUPLICATEINVENTORY_DEMAND_INVALIDINVENTORY_RESERVATION_EXISTSINVENTORY_ROUTING_SOURCE_REQUIREDINVOICE_LOCKED_ORDER_FINANCIALSLINE_ITEM_INVALID_QUANTITYLINE_ITEM_NAME_REQUIREDLINE_ITEM_NAME_TOO_LONGLINE_ITEM_NEGATIVE_PRICELINE_ITEM_PRICE_REQUIREDLINE_ITEM_QUANTITY_TOO_LARGELINE_ITEM_SOURCE_CONFLICTLINE_ITEM_UNIT_PRICE_REQUIREDMETADATA_KEY_TOO_LONGMETADATA_TOO_LARGEMETADATA_TOO_MANY_KEYSMETADATA_VALUE_TOO_LONGMISSING_LINE_ITEMSMODIFIER_CURRENCY_MISMATCHMODIFIER_DUPLICATE_SELECTIONMODIFIER_GROUP_REQUIREDMODIFIER_QUANTITY_INVALIDMODIFIER_SELECTION_LIMIT_EXCEEDEDMODIFIER_SOURCE_UNSUPPORTEDMODIFIER_TEXT_INVALIDMODIFIER_UNAVAILABLENULL_NOT_ALLOWEDORDER_CLOSEDORDER_COLLECTION_ALREADY_ACTIVEORDER_FINANCIAL_MUTATION_NOT_ALLOWEDORDER_LINE_ITEM_TAX_INPUT_REQUIREDORDER_TAX_CALCULATION_FAILEDORDER_TAX_RATE_UNAVAILABLEORDER_TAX_UNSUPPORTED_COUNTRYORDER_TOTAL_BELOW_NET_COLLECTEDPRODUCT_LINE_ITEM_SOURCE_UNSUPPORTEDPROMOTION_CONFLICTPROMOTION_DECLINEDRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESERVED_METADATA_KEYRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLETAX_CALCULATION_REQUIREDTAX_MODE_MISMATCHTOO_MANY_LINE_ITEMSUNKNOWN_FIELDUNSUPPORTED_CURRENCYVARIANT_NOT_SELLABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/line-items \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "name": "Backstage Upgrade",
        "quantity": 1,
        "unit_price_money": {
          "amount": 1500,
          "currency": "USD"
        }
      }
    ]
  }'

Update line item#

PATCH/v1/orders/{order_id}/line-items/{order_line_item_id}IdempotentRequires scope: commerce.orders.write

Updates a single line item on an order.

Path parameters
order_idstringrequired

Flint order ID.

order_line_item_idstringrequired

Flint order line item ID.

Request body
option 1object
modifiers + expected_versionobject
Response · 200
OrderResponseobject
CheckoutSessionLineItemModifierUpdateResponseobject

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123/line-items/li_123 \
  -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,
    "modifiers": [
      {
        "text": {
          "modifier_group_id": "mg_123",
          "value": "No onions"
        }
      }
    ]
  }'

Delete line item#

DELETE/v1/orders/{order_id}/line-items/{order_line_item_id}IdempotentRequires scope: commerce.orders.write

Removes a single line item from an order.

Path parameters
order_idstringrequired

Flint order ID.

order_line_item_idstringrequired

Flint order line item ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDDELIVERY_DESTINATION_NOT_APPLICABLEINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X DELETE https://api.withflintpay.com/v1/orders/ord_123/line-items/li_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Pay order#

POST/v1/orders/{order_id}/payIdempotentRequires scope: commerce.orders.write

Starts or resumes a payment attempt on the order. Set action to pay to charge the full outstanding balance, confirm_payment_intents to confirm order-owned payment intents, setup to save a newly collected token on a zero-balance order, or resume to continue an attempt after a pending client action. Each action accepts only its own fields. Only confirm_payment_intents accepts completion_behavior. A pay action without payment_source is valid only when the outstanding balance is zero. To resume, send action: resume with payment_attempt_id, or replay the exact original request with the same Idempotency-Key while the attempt is open. Payment intents with manual capture return an active authorization instead of settling immediately.

Path parameters
order_idstringrequired

Flint order ID.

Request body
PayOrderRequestPayobject
PayOrderRequestConfirmPaymentIntentsobject
PayOrderRequestSetupobject
PayOrderRequestResumeobject
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDFIELD_REQUIREDFULFILLMENT_SELECTION_REQUIREDINSUFFICIENT_SCOPEINVALID_ACTIONINVALID_API_KEYINVALID_FIELD_TYPEINVALID_REQUESTNULL_NOT_ALLOWEDPAYMENT_SOURCE_CONFLICTPAYMENT_SOURCE_NOT_ALLOWEDPAYMENT_SOURCE_REQUIREDRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLEUNKNOWN_FIELD
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/pay \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "action": "confirm_payment_intents",
    "buyer_email": "buyer@example.com",
    "expected_outstanding_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "payment_intents": [
      {
        "confirmation_token": "ctoken_123",
        "payment_intent_id": "pi_123"
      }
    ]
  }'

List order payment attempts#

GET/v1/orders/{order_id}/payment-attemptsRequires scope: commerce.orders.read or commerce.orders.write

Returns payment attempts for the order, newest first. Checkout-session callers see only attempts created by their own session.

Path parameters
order_idstringrequired

Flint order ID.

Query parameters
page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

Response · 200
dataarray of objectrequired
metaobject
next_page_tokenstring
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/orders/ord_123/payment-attempts \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "is_resumable": true,
      "mode": "payment",
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "payment_intents": [
        {
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "payment_intent": {
                "client_secret": "pi_client_secret_123",
                "stripe_js_call": "handle_next_action"
              },
              "publishable_key": "pk_test_123"
            }
          },
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          }
        }
      ],
      "status": "requires_action"
    }
  ],
  "next_page_token": "Zm9yd2FyZC1vbmx5LW9wYXF1ZS1jdXJzb3I",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get order payment attempt#

GET/v1/orders/{order_id}/payment-attempts/{payment_attempt_id}Requires scope: commerce.orders.read or commerce.orders.write

Returns one durable payment attempt for the order. Checkout-session callers can read only attempts created by their own session.

Path parameters
order_idstringrequired

Flint order ID.

payment_attempt_idstringrequired

Flint order payment attempt ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/orders/ord_123/payment-attempts/opat_01ARZ3NDEKTSV4RRFFQ69G5FAV \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "expected_outstanding_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "is_resumable": true,
    "mode": "payment",
    "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "payment_intents": [
      {
        "amount_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "payment_intent_id": "pi_123",
        "status": "requires_action",
        "tip_money": {
          "amount": 0,
          "currency": "USD"
        }
      }
    ],
    "pending_actions": [
      {
        "action_type": "payment_authentication",
        "client_action": {
          "stripe": {
            "account_id": "acct_123",
            "payment_intent": {
              "client_secret": "pi_client_secret_123",
              "stripe_js_call": "handle_next_action"
            },
            "publishable_key": "pk_test_123"
          }
        },
        "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "subject": {
          "payment_intent": {
            "payment_intent_id": "pi_123"
          }
        }
      }
    ],
    "status": "requires_action"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Cancel order payment attempt#

POST/v1/orders/{order_id}/payment-attempts/{payment_attempt_id}/cancelIdempotentRequires scope: commerce.orders.write

Cancels an active order payment attempt, its unsettled payment legs, and its attempt-owned holds.

Path parameters
order_idstringrequired

Flint order ID.

payment_attempt_idstringrequired

Flint order payment attempt ID.

Request body
cancellation_reasonenum

Optional merchant-supplied cancellation reason. Use metadata for unrelated caller-owned context.

requested_by_customerduplicatefraudulentabandoned
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-attempts/opat_01ARZ3NDEKTSV4RRFFQ69G5FAV/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancellation_reason": "abandoned"
  }'

Create order payment intent#

POST/v1/orders/{order_id}/payment-intentsIdempotentRequires scope: commerce.orders.write

Creates an immutable payment leg owned by the order. Collect a payment source using payment_collection, then submit that source through payOrder. This route requires commerce.orders.write; standalone payment-intent routes require payments.payment_intents.write.

Path parameters
order_idstringrequired

Flint order ID.

Request body
amount_moneyobject

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

capture_methodenum
automaticmanual
external_reference_idstring

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

metadatamap of string
payment_optionsarray of string
payment_return_urlstring
payment_source_selectionobject
Response · 201
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-intents \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 10000,
      "currency": "USD"
    },
    "capture_method": "automatic",
    "payment_source_selection": {
      "card": {
        "digital_wallets": [
          "apple_pay",
          "google_pay"
        ]
      }
    }
  }'

Cancel order payment leg#

POST/v1/orders/{order_id}/payment-intents/{payment_intent_id}/cancelIdempotentRequires scope: commerce.orders.write

Cancels an unsettled order-owned payment leg. A leg in an active payment attempt requires the matching payment_attempt_id. Canceling an authorization releases the payment lock and attempt-owned holds; a staged or declined leg with no active attempt can be canceled without an attempt ID.

Path parameters
order_idstringrequired

Flint order ID.

payment_intent_idstringrequired

Flint payment intent ID.

Request body
cancellation_reasonenum

Optional merchant-supplied cancellation reason. Use metadata for unrelated caller-owned context.

requested_by_customerduplicatefraudulentabandoned
payment_attempt_idstring

Owning Flint payment attempt ID. Required while the payment leg belongs to an active attempt.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-intents/pi_123/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancellation_reason": "requested_by_customer",
    "payment_attempt_id": "opat_01J9ZK1AQ5FYF6M7VQY11M2Z3A"
  }'

Capture order payment#

POST/v1/orders/{order_id}/payment-intents/{payment_intent_id}/captureIdempotentRequires scope: commerce.orders.write

Captures an active payment authorization for an order and updates the order payment lifecycle.

Path parameters
order_idstringrequired

Flint order ID.

payment_intent_idstringrequired

Flint payment intent ID.

Request body
amount_moneyobject

Monetary amount represented as integer minor units plus an ISO 4217 currency code.

payment_attempt_idstring

Owning Flint payment attempt ID. Required while the authorization belongs to an active attempt.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-intents/pi_123/capture \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "payment_attempt_id": "opat_01J9ZK1AQ5FYF6M7VQY11M2Z3A"
  }'

Resend an order receipt#

POST/v1/orders/{order_id}/receiptIdempotentRequires scope: commerce.orders.write

Queues another receipt email for a paid order when Flint manages receipt delivery. The recipient is derived from the order and cannot be supplied by the caller. When the merchant manages receipt delivery, ask the merchant for another copy.

Path parameters
order_idstringrequired

Flint order ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTORDER_RECEIPT_EMAIL_UNAVAILABLEORDER_RECEIPT_MERCHANT_MANAGEDORDER_RECEIPT_NOT_AVAILABLEORDER_RECEIPT_RESEND_RATE_LIMITEDRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/receipt \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
Rate this doc