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.

To buy a gift card, use a variant from a gift_card product. Add gift_card_purchase.face_value_money to select an amount within the variant's custom amount bounds; omit it for the reference denomination. Do not send unit_price_money on a catalog line. Flint calculates consideration from the configured offer and returns gift_card_purchase with the frozen configuration, reference price, selected face value, and consideration per card. quantity counts cards with those same per-card terms. Catalog price changes do not reprice an existing line.

The purchase can include a typed recipient with email, optional name, optional message of up to 200 characters, and optional send_at between now and 90 days from now. Recipient details describe email delivery independently of order fulfillment. Omit recipient to buy the card without email delivery. Explicit null values are not accepted for gift_card_purchase or its fields. Gift card purchases are non-taxable, excluded from ordinary discounts, and require no shipping or inventory.

Before funding starts, replace a purchase recipient with PATCH /v1/orders/{order_id}/line-items/{order_line_item_id}. Send gift_card_recipient and the line item's version as expected_version; send gift_card_recipient: null to clear it. Omission preserves the recipient. Checkout credentials can update these two fields together. Recipient edits preserve the frozen face value and consideration and keep the checkout open. Once a payment starts or the order has any payment, the purchase recipient cannot change.

To sell a catalog variant on subscribe and save, send subscription on its line when you create the order or add the line: subscription_offer_id, billing_interval, and billing_interval_count from an active subscription offer. Switch a line before payment with PATCH /v1/orders/{order_id}/line-items/{order_line_item_id}, sending subscription (or null for one-time) and the line item's version as expected_version. Checkout credentials can update these two fields together. When the order is paid, each subscribed line reports the subscription_id it started.

Pay for gift card purchases through the order payment route. The order must have a customer_id, or the checkout buyer must verify their identity before paying. A purchase over the buyer's funding or daily purchase limit is rejected before collection starts. A complete unit activates when its consideration is captured and settled. Partial payment of a unit leaves it unissued until the remaining consideration is collected; it does not expose a partially funded card. Each issued unit retains its original payment sources and the frozen face value and price. Retrying the same payment attempt recovers the same cards. Read line_items[].purchased_gift_cards for their IDs, unit ordinals, and last characters. Ordinary order reads never include redemption codes. Reversing an invoice manual payment removes the purchased value it backs. If any of that value has been spent or reserved, the reversal returns a conflict. Collecting that amount again restores the same purchased unit through a new paid load. If the original card is closed or cannot hold the value, purchased_gift_cards includes a replacement with the same unit_ordinal and an original_gift_card_id. Its restoration_reason is manual_recollection when a manual payment collects the amount again, or processor_recollection when a processor payment does. The original card and payment history remain available.

In checkout, the buyer's delivery selection writes delivery_destination, and while that selection is active you can't set the field directly. Any payment, including a recorded offline payment, sets frozen_at. Flint can't take a card or other online payment for an order with items to ship, deliver, or pick up until it has a delivery selection (FULFILLMENT_SELECTION_REQUIRED), so set delivery_destination yourself only for an order you collect outside Flint, such as an invoice paid with a recorded offline payment. Set it before you create the invoice: once an order has an invoice, even a draft, updating the order returns 409 INVOICE_LOCKED_ORDER_FINANCIALS. While the order is open and unpaid, you can replace the whole destination, or set it to null before removing its last delivery obligation. 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.

GET /v1/orders filters by payment_status, refund_status, and fulfillment_status. Each takes one value, a repeated parameter, or comma-separated values, and matches an order in any of them: payment_status=unpaid,partially_paid lists the orders with a balance still to collect. A customer session filters GET /v1/me/orders the same way.

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.

Select gift cards with POST /v1/orders/{order_id}/gift-cards. Send gift_card_code in the JSON body and order_revision from the latest order read. The response returns masked gift_cards in application order and a gift_card_estimate with gift card and processor amounts. Selection does not reserve or debit value. Gift cards apply to USD orders that are not subscriptions, and an order can select at most 20. The estimate excludes new gift card purchase value from the gift card allocation. In a mixed basket, selected cards can pay for other goods while the processor funds the gift card purchase.

After repeated failed codes, a checkout credential also needs a single-use proof in Flint-Gift-Card-Challenge, or the request fails with GIFT_CARD_CHALLENGE_REQUIRED; see Checkout credential verification.

Remove a selection with DELETE /v1/orders/{order_id}/gift-cards/{gift_card_id}, with the current order_revision in the JSON body. Both routes accept an optional Idempotency-Key to recover a lost response. They reject stale revisions and changes during an active payment attempt. If a selected card's code is replaced, its selection has requires_authorization: true and contributes no value until you apply its current code. gift_card_estimate.can_pay is false when a selection needs authorization, when a payment attempt has reserved the selection (is_reserved: true), or when an order under the $1.00 processor minimum is not fully covered by the cards. On larger orders, the estimate lowers the gift card amount when needed so the processor charge is at least $1.00.

When gift_card_estimate.can_pay is true, send accepted_gift_card_allocation with POST /v1/orders/{order_id}/pay. Copy order_revision, gift_cards, gift_card_money, and processor_money from the estimate, and send an Idempotency-Key. Paying with selected cards and no accepted_gift_card_allocation returns GIFT_CARD_ALLOCATION_REQUIRED. The allocation is checked again when payment starts. If it changed, read the order and accept the refreshed estimate before retrying with a new key.

Use action: "pay" with a payment_source when processor_money.amount is positive. The processor collects only that remainder. To confirm an existing payment intent, use action: "confirm_payment_intents" and select exactly one intent for the remainder. When the gift cards cover the full amount due, use action: "pay" without a payment source. Gift card payments collect the full amount due. The payment attempt returns masked gift_card_redemptions separately from payment_intents. Resume an existing attempt by its ID; its original allocation remains fixed while the processor outcome is unresolved.

Read gift_card_settlements for the original gift card amounts that paid the order. Each entry retains its redemption ID, masked last characters, tip allocation, and payment time after refunds or code replacement.

Read return_credit_settlements for value applied from items the buyer returned, such as an exchange's replacement order. Each entry identifies the Return and resolution, the amount_money applied, and created_at. This value is included in settlement_amounts.paid_money; show it separately from gift card and processor payments when explaining how the order was paid.

Send a receipt to a buyer-provided address with POST /v1/orders/{order_id}/send-receipt and { "email": "buyer@example.com" }. The receipt includes the order's settled payments and masked gift card payments, including orders paid entirely with gift cards. Send an Idempotency-Key to recover a lost response. The route requires Flint-managed receipt delivery and otherwise returns ORDER_RECEIPT_MERCHANT_MANAGED. Each order can send to the same normalized address once every five minutes. Addresses are trimmed and lowercased, preserving plus-addressing. Checkout credentials can send only to the address on file. If no address is on file, checkout credentials can send to at most three distinct addresses over the order's lifetime. Receipts sent for this order through this route count toward this limit, including failed deliveries and receipts sent with a secret API key. Send to an address already used, or send the receipt with a secret API key. Merchant callers can choose any address. Omit email to send to the order's recorded email. Buyers use POST /v1/me/orders/{order_id}/send-receipt, which accepts no email and sends to the order's email.

When you send your own receipt or shipping email, link the buyer to the order with POST /v1/orders/{order_id}/access-links. The url it returns opens the order in your Flint-hosted customer account without a sign-in, and lets the buyer have the receipt sent again, for 30 days or 10 opens. The url is a bearer credential: Flint returns it only in that response and in a retry with the same Idempotency-Key. The route needs commerce.orders.read, and refuses a merchant_hosted customer account and an order without a customer_id. See Link the buyer to their order.

cURL
curl -X POST https://api.withflintpay.com/v1/orders/ord_01J5Z8N3QK4W7Y2RB6TPVXHC9D/access-links \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: order-link-ord_01J5Z8N3QK4W7Y2RB6TPVXHC9D"

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_actionsarray of objectRequired

What the buyer can do with the order, in this order: start_return, then resend_receipt. A buyer's read through a customer session on /v1/me, or in Flint's buyer account, lists both every time; a merchant read gets an empty list. A list of orders leaves start_return out, since only a read of one order checks return eligibility. start_return is due when the last open return window ends.

buyer_contactobject

Email and phone saved when payment started, from the pay request's buyer_contact or the paying checkout session's saved contact. It does not change the linked customer.

buyer_notestring
chargesarray of object
checkout_session_idsarray of string
closed_reasonstring

The note supplied when the order was closed. It 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. Omitted for a checkout session credential that doesn't act for the customer the buyer verified.

external_reference_idstring

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

fulfillment_statusenum
  • not_fulfilled
  • partially_fulfilled
  • fulfilled
  • canceled
  • not_applicable
  • closed
fulfillmentsarray of object
gift_card_estimateobject
gift_card_settlementsarray of object
gift_card_tender_enabledboolean
gift_cardsarray of object
internal_notestring
inventory_exception_statusenum
  • paid_inventory_failed
  • resolved
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
order_revisioninteger
originenum
  • virtual_terminal
  • payment_link
  • checkout
  • api
  • subscription
payment_collectionobject
payment_intent_idsarray of string
payment_intentsarray of object
payment_statusenumRequired
  • unpaid
  • partially_paid
  • paid
pricing_amountsobjectRequired
purchased_eventobject
refund_idsarray of string
refund_statusenumRequired
  • none
  • partially_refunded
  • refunded
requested_tipobject
return_credit_settlementsarray of object

Value applied to this order from items the buyer returned, such as an exchange's replacement order. Included in settlement_amounts.paid_money.

settlement_amountsobjectRequired
setup_collectionobject
statusenumRequired
  • open
  • closed
subscriptionobject or null
subscription_cycleinteger

Charged subscription cycle associated with this order. Signup is cycle 1; unpaid retries and skipped renewals do not advance the cycle.

subscription_delivery_changed_atstring

Time the subscriber changed delivery after this paid renewal was prepared. The order keeps its committed destination until you correct it or refund and replace it.

subscription_idstring
subscription_planobject or null
subscription_plan_idstring
taxobjectRequired
tipsarray of object
updated_atstring

RFC3339 timestamp.

JSON
{
  "buyer_actions": [],
  "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"
}

Create discount preview#

POST/v1/discount-previews

Requires scope commerce.orders.read or commerce.orders.write

Evaluates promotion outcomes for an order without changing it. Returns the complete result inside data, without creating a resource or requiring an idempotency key. 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.

Request body

discountone of
order_idstringRequired

The order to evaluate. Checkout session credentials can use only their own order.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/discount-previews \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "discount": {
      "promotion": {
        "promotion_code": "SPRING15"
      }
    },
    "order_id": "ord_01HZYV7Q9Y0Y4H8Q3H9F6R7T8J"
  }'

List orders#

GET/v1/orders

Requires 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.

  • open
  • closed
payment_statusany of

Filter by settled collection status. Repeat the parameter or pass comma-separated values to match any of several statuses.

refund_statusarray of enum

Filter by refund progress. Repeat the parameter to OR multiple statuses.

  • none
  • partially_refunded
  • refunded
fulfillment_statusarray of enum

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

  • not_fulfilled
  • partially_fulfilled
  • fulfilled
  • canceled
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_terminal
  • payment_link
  • checkout
  • api
  • subscription
querystring

Search across order_id, order number, external_reference_id, fulfillment external_reference_id, buyer email, notes, and line item names. 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 ord_01.

subscription_idstring

Filter by subscription ID.

subscription_delivery_changedboolean

Filter by whether the subscriber changed delivery after this order was paid.

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_at
  • updated_at
  • outstanding_money
  • total
sort_directionenum

Sort direction.

  • asc
  • desc
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
curl https://api.withflintpay.com/v1/orders \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "buyer_actions": [],
      "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": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Create order#

POST/v1/ordersIdempotent

Requires 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
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.

  • customer
  • fulfillments.packages
  • fulfillments.shipments
  • payment_intents
  • subscription
  • subscription_plan

Response · 200

Same response as Create order.

curl https://api.withflintpay.com/v1/orders/ord_123 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "buyer_actions": [],
    "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}Idempotent

Requires 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. A merchant can correct a paid subscription signup or renewal destination before shipment by sending delivery_destination and the current order_revision. The committed delivery methods must remain eligible, and shipping and tax totals must stay unchanged. ORDER_DELIVERY_DESTINATION_REPRICE_REQUIRED returns the reason and computed shipping and tax amounts when the correction would change the paid totals.

Path parameters

order_idstringRequired

Flint order ID.

Request body

buyer_notestring
customer_idstring
delivery_destinationobject or null

Complete replacement destination. Allowed while the order is open and unpaid and no delivery selection controls it. A merchant may also correct a paid subscription signup or renewal before shipment by sending order_revision, when the committed delivery methods remain eligible and shipping and tax totals stay the same. A paid destination cannot be cleared.

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.

order_revisioninteger

Current order_revision from the order. Required when correcting a paid delivery destination. Optional for other updates; when supplied, the update fails if the order changed.

requested_tipone of or null

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

taxone of

Response · 200

Same response as Create order.

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"
    },
    "order_revision": 1708355100,
    "requested_tip": {
      "percent": 18
    }
  }'

List order activities#

GET/v1/orders/{order_id}/activities

Requires 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.

  • asc
  • desc
typearray of enum

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

  • created
  • line_item_added
  • line_item_updated
  • line_item_removed
  • discount_applied
  • discount_removed
  • tax_updated
  • requested_tip_added
  • requested_tip_updated
  • requested_tip_removed
  • charge_added
  • charge_updated
  • charge_removed
  • charge_fulfillment_updated
  • order_updated
  • adjustment
  • closed
  • payment
  • payment_failed
  • refund
  • refund_failed
  • checkout_session_created
  • checkout_session_expired
  • checkout_session_invalidated
  • fulfillment_created
  • fulfillment_updated
  • fulfillment_state_changed

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
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": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Add order charge#

POST/v1/orders/{order_id}/chargesIdempotent

Requires 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

Same response as Create order.

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}Idempotent

Requires 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_discount
  • subtotal_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_fee
  • delivery_fee
  • shipping_fee
  • handling_fee
  • packaging_fee
  • small_order_fee
  • service_area_fee
  • setup_fee
  • installation_fee
  • cleaning_fee
  • booking_fee
  • reservation_fee
  • ticket_fee
  • fulfillment_fee
  • restocking_fee
  • rush_fee
  • other

Response · 200

Same response as Create order.

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"
  }'
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}/closeIdempotent

Requires scope commerce.orders.write

Closes an open 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

reason_messagestring

Your note explaining why you are closing the order. It is not shown to the buyer.

Response · 200

Same response as Create order.

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_message": "Customer canceled before payment."
  }'

Get current order delivery selection#

GET/v1/orders/{order_id}/delivery-selections/current

Requires 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
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",
    "input_requirements": [
      {
        "constraint": {
          "type": "string"
        },
        "delivery_input_requirement_id": "example",
        "field_path": "destination_address",
        "purpose": "quote"
      }
    ],
    "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}/discountsIdempotent

Requires 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

Send exactly one of these

promotionone ofRequired

Response · 200

Same response as Create order.

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"
    }
  }'

Remove discounts#

POST/v1/orders/{order_id}/discounts/removeIdempotent

Requires 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

Same response as Create order.

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"
    ]
  }'
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"

Apply a gift card to an order#

POST/v1/orders/{order_id}/gift-cardsIdempotent

Requires scope commerce.orders.write

Selects a gift card by its current code and returns masked selections and an unreserved estimate. No value is held or debited. order_revision must match the order revision returned by the last read. An order may select at most 20 gift cards. Gift card value cannot pay for subscription orders.

Path parameters

order_idstringRequired

Order ID.

Request body

gift_card_codestringRequired
order_revisionintegerRequired

Response · 200

Same response as Create order.

curl -X POST https://api.withflintpay.com/v1/orders/ord_123/gift-cards \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "gift_card_code": "",
    "order_revision": 0
  }'

Remove a selected gift card#

DELETE/v1/orders/{order_id}/gift-cards/{gift_card_id}Idempotent

Requires scope commerce.orders.write

Removes a selected gift card without moving value. The order revision must still match. Selections cannot change during an active payment attempt.

Path parameters

order_idstringRequired

Order ID.

gift_card_idstringRequired

Selected gift card ID.

Request body

order_revisionintegerRequired

Response · 200

Same response as Create order.

curl -X DELETE https://api.withflintpay.com/v1/orders/ord_123/gift-cards/{gift_card_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 '{
    "order_revision": 0
  }'
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_message": "Manual inventory sourced and deducted."
  }'

Add line items#

POST/v1/orders/{order_id}/line-itemsIdempotent

Requires 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

Same response as Create order.

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}Idempotent

Requires scope commerce.orders.write

Updates a single line item on an order. Send gift_card_recipient and expected_version to replace or clear recipient delivery details before any purchase funding. Checkout credentials can update recipient details, modifiers, or a line subscription offer selection, each with expected_version. Set subscription to null to buy the line once.

Path parameters

order_idstringRequired

Flint order ID.

order_line_item_idstringRequired

Flint order line item ID.

Request body

Send at least one of these

descriptionstring
expected_versioninteger
gift_card_recipientobject or null

Replaces the recipient of an unfunded gift card purchase. Omission preserves it; null clears it. Send expected_version from the line item.

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
quantityinteger

Whole-number quantity; fractional quantities are not supported.

subscriptionobject or null

Selects an active subscription offer and reprices an unpaid line. Null selects a one-time purchase. Omission preserves the selection. Requires expected_version from the line item and clears the delivery selection when terms change.

taxobject
unit_price_moneyobject

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

Response · 200

One of these shapes

dataobjectRequired
metaobject
request_idstring
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"
        }
      }
    ]
  }'
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}/payIdempotent

Requires 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 continue a resumable attempt, send action: resume with order_payment_attempt_id and a new Idempotency-Key. An exact retry of the original request with its Idempotency-Key returns the stored response if the request completed, or recovers the same attempt if it was interrupted. Payment intents with manual capture return an active authorization instead of settling immediately.

Path parameters

order_idstringRequired

Flint order ID.

Request body

Send exactly one of these

accepted_gift_card_allocationobject

Accept the exact gift_card_estimate returned on the current order, including all selected cards and both totals. Requires an Idempotency-Key. Gift card payments collect the full amount due and may use one processor payment intent for the processor_money remainder.

actionenumRequired
  • pay
buyer_contactobject

Buyer email and phone recorded on the order. A checkout session payment uses the session's saved contact for omitted fields. Email and phone cannot be null.

expected_outstanding_moneyobject

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

payment_sourceobject
save_payment_methodboolean

The buyer's choice to save the card they typed for faster checkout at this merchant. Send true only from the checkout session's own credential, when the session's save_payment_method_offered is true and save_payment_method_requires_verification is false, for one newly collected card sent as a confirmation_token created with setup_future_usage on_session. The card is saved with usage on_session once the payment succeeds, for the customer the checkout acts for: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. A typed buyer_contact.email never decides it. A checkout that acts for no customer refuses the save until the buyer confirms their email with a code, unless it sends save_payment_method_phone. A checkout the buyer bound by a texted code saves the card with that number. A checkout whose buyer confirmed the customer's email can also send save_payment_method_phone, to save the card with a number the buyer confirms by text after paying. Send false or omit it when the buyer does not choose to save; the confirmation_token must then have no setup_future_usage.

save_payment_method_phonestring

A US or Canadian mobile phone number in E.164 format, such as +14155552671, that confirms a card saved while the checkout acts for no customer, or for the customer whose email the buyer confirmed in it. Send it with save_payment_method: true only from the checkout session's own credential, when the session's save_payment_method_phone_offered is true. The card is kept for the customer the checkout acts for, or else the merchant's customer with the buyer's email, once the payment succeeds, or once it is approved when the merchant captures later, but works for nothing until the buyer confirms it within 24 hours, with a code texted to this number or, when the customer's email is the email of the payment, emailed there instead: request the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications and purpose confirm_saved_payment_method, and read payment_method_save on the checkout session. A card saved with the number makes it the customer's saved number, and the cards saved with the number it replaces are removed. A card not confirmed in time is not saved.

Response · 200

dataobjectRequired
metaobject
request_idstring
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_contact": {
      "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-attempts

Requires 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
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",
      "order_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": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Get order payment attempt#

GET/v1/orders/{order_id}/payment-attempts/{order_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.

order_payment_attempt_idstringRequired

Flint order payment attempt ID.

Response · 200

dataobjectRequired
metaobject
request_idstring
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",
    "order_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/{order_payment_attempt_id}/cancelIdempotent

Requires 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.

order_payment_attempt_idstringRequired

Flint order payment attempt ID.

Request body

cancellation_reasonenum

Optional merchant-supplied cancellation reason.

  • requested_by_customer
  • duplicate
  • fraudulent
  • abandoned

Response · 200

Same response as Pay order.

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-intentsIdempotent

Requires 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
  • automatic
  • manual
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
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}/cancelIdempotent

Requires scope commerce.orders.write

Cancels an unsettled order-owned payment leg. A leg in an active payment attempt requires the matching order_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.

  • requested_by_customer
  • duplicate
  • fraudulent
  • abandoned
order_payment_attempt_idstring

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

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-intents/pi_01J00000000000000000000000/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",
    "order_payment_attempt_id": "opat_01J9ZK1AQ5FYF6M7VQY11M2Z3A"
  }'

Capture order payment#

POST/v1/orders/{order_id}/payment-intents/{payment_intent_id}/captureIdempotent

Requires 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.

order_payment_attempt_idstring

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

Response · 200

Same response as Cancel order payment leg.

curl -X POST https://api.withflintpay.com/v1/orders/ord_123/payment-intents/pi_01J00000000000000000000000/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"
    },
    "order_payment_attempt_id": "opat_01J9ZK1AQ5FYF6M7VQY11M2Z3A"
  }'

Send an order receipt#

POST/v1/orders/{order_id}/send-receiptIdempotent

Requires scope commerce.orders.write

Queues a receipt for a paid order, including gift card payments and settled payments. Send email to choose a recipient, or omit it to use the order's email. Requires Flint-managed receipt delivery. Sending is limited to once every five minutes per order and normalized recipient. Checkout credentials can send only to the address on file. If no address is on file, checkout credentials can send to at most three distinct addresses over the order's lifetime. Receipts sent for this order through this route count toward this limit, including failed deliveries and receipts sent with a secret API key. Merchant callers can choose any address.

Path parameters

order_idstringRequired

Flint order ID.

Request body

emailstring

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/send-receipt \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "email": ""
  }'

Was this helpful?