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). 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 actually been paid, refunded, and is still outstanding.

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, and inventory_demand_revision advances whenever the tracked demand or its routing changes. 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.

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "order_id": "ord_123",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "name": "General Admission",
          "quantity": 2,
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "metadata": {
            "ticket_type": "ga"
          },
          "inventory_snapshot": null
        }
      ],
      "status": "open",
      "payment_status": "unpaid",
      "refund_status": "none",
      "metadata": {
        "event_id": "evt_123"
      },
      "merchant_id": "mer_123",
      "customer_id": "cus_123",
      "pricing_amounts": {
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "tax": {
        "enabled": false,
        "status": "",
        "mode": "",
        "taxability_reason": ""
      },
      "settlement_amounts": {
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "order_number": "1001",
      "origin": "api",
      "created_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "inventory_demand_revision": 0
    }
  ],
  "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
discountsarray of one of
external_reference_idstring
internal_notestring
inventory_routing_sourceobject

Where this order's tracked demand is routed: a fixed Location, or an allocation policy. Required before an order containing tracked variants can hold stock.

line_itemsarray of one ofrequired
metadatamap of string
requested_tipobject

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

taxobject
Response · 201
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTSERVICE_UNAVAILABLETIP_LIMIT_EXCEEDED
Bash
curl -X POST https://api.withflintpay.com/v1/orders \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        }
      }
    ],
    "discounts": [
      {
        "manual": {
          "name": "Launch credit",
          "amount_money": {
            "amount": 500,
            "currency": "USD"
          }
        }
      }
    ],
    "metadata": {
      "event_id": "evt_123"
    }
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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. Send repeated expand parameters as the canonical form, for example expand=customer&expand=fulfillments.packages. Comma-separated values, expand[]=customer, and numeric expand[0]=customer are accepted for common client compatibility.

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 "Authorization: Bearer YOUR_API_KEY"

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, and metadata.

Path parameters
order_idstringrequired

Flint order ID.

Request body
buyer_notestring
customer_idstring
external_reference_idstring
internal_notestring
inventory_routing_sourceobject

Replaces the order's routing source. Changing it advances the inventory demand revision and invalidates an existing quote.

metadatamap of string
taxobject
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "metadata": {
      "priority": "vip"
    },
    "buyer_note": "Please include a gift receipt.",
    "internal_note": "VIP hold"
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "order_activity_id": "act_123",
      "activity_type": "payment",
      "balance_delta_money": {
        "amount": -5000,
        "currency": "USD"
      },
      "running_balance_money": {
        "amount": 0,
        "currency": "USD"
      },
      "description": "Payment received",
      "payment_intent_id": "pi_123",
      "created_at": "2026-03-17T14:35:00Z"
    }
  ],
  "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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "charge": {
      "name": "Delivery",
      "type": "delivery_fee",
      "amount_money": {
        "amount": 500,
        "currency": "USD"
      },
      "tax": {
        "taxable": true
      },
      "fulfillment_id": "ful_123"
    }
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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
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_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123/charges/{order_charge_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "name": "Priority delivery",
    "amount_money": {
      "amount": 700,
      "currency": "USD"
    },
    "fulfillment_id": "ful_123"
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Remove order charges#

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

Removes one or more service charges, fees, or surcharges from an order.

Path parameters
order_idstringrequired

Flint order ID.

Request body
order_charge_idsarray of stringrequired
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/remove \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "order_charge_ids": [
      "och_123"
    ]
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 coupon 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
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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "Customer canceled before payment."
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "amount_money": {
      "amount": 1,
      "currency": "USD"
    },
    "calculation_expires_at": "2026-08-02T16:00:00Z",
    "checkout_session_id": "cs_01K1P6G4M7H2N8Q9R3S5T6V7WX",
    "choices": [
      {
        "amount_money": {
          "amount": 1,
          "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": 1,
          "currency": "USD"
        },
        "name": "Standard delivery",
        "stable_key": "example",
        "tax_money": {
          "amount": 1,
          "currency": "USD"
        },
        "total_money": {
          "amount": 1,
          "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, coupon-backed, or manual discount to an order. Checkout-authenticated buyers must provide a coupon or promotion code; resource IDs and manual discounts require merchant authentication.

Path parameters
order_idstringrequired

Flint order ID.

Request body
option 1object
option 2object
option 3object
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDCHECKOUT_COUPONS_DISABLEDCHECKOUT_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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "coupon": {
      "coupon_code": "SPRING15"
    }
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Delete discount#

DELETE/v1/orders/{order_id}/discounts/{order_discount_id}IdempotentRequires scope: commerce.orders.write

Removes a single pending applied discount from an order. Redeemed or canceled discounts are settlement history and cannot be removed.

Path parameters
order_idstringrequired

Flint order ID.

order_discount_idstringrequired

Flint order discount ID.

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

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "discount": {
      "promotion": {
        "promotion_code": "SPRING15"
      }
    }
  }'
JSON
{
  "data": {
    "discount_preview": {
      "applied": [
        {
          "promotion_id": "promo_01HZYV7Q9Y0Y4H8Q3H9F6R7T8J",
          "customer_facing_name": "Summer sale",
          "discount_class": "order",
          "amount_money": {
            "amount": 1500,
            "currency": "USD"
          },
          "applied_money": {
            "amount": 1500,
            "currency": "USD"
          },
          "stacking_mode": "continue"
        }
      ],
      "skipped": [
        {
          "promotion_id": "promo_01HZYV7Q9Y0Y4H8Q3H9F6R7T8K",
          "customer_facing_name": "Save 20%",
          "discount_class": "order",
          "promotion_decline_reason": "superseded_by_better_offer",
          "would_have_applied_money": {
            "amount": 1200,
            "currency": "USD"
          }
        }
      ],
      "available": [
        {
          "promotion_id": "promo_01HZYV7Q9Y0Y4H8Q3H9F6R7T8M",
          "customer_facing_name": "Free shipping over $75",
          "discount_class": "service_charge",
          "promotion_decline_reason": "minimum_not_met",
          "threshold_money": {
            "amount": 7500,
            "currency": "USD"
          },
          "current_money": {
            "amount": 6700,
            "currency": "USD"
          },
          "gap_money": {
            "amount": 800,
            "currency": "USD"
          }
        }
      ]
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "order_discount_ids": [
      "01JFXH8Z2K7QF9V3MB0N4T6RCP"
    ]
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "Manual inventory sourced and deducted."
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/line-items \
  -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"
        }
      }
    ]
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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
descriptionstring
metadatamap of string
namestring
quantityinteger

Whole-number quantity; fractional quantities are not supported.

taxobject
unit_price_moneyobject

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

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123/line-items/li_123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "quantity": 3
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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_REQUIREDINSUFFICIENT_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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Replace line item modifiers#

PUT/v1/orders/{order_id}/line-items/{order_line_item_id}/modifiersIdempotentRequires scope: commerce.orders.write

Replaces the selected modifier snapshots on a single order line item.

Path parameters
order_idstringrequired

Flint order ID.

order_line_item_idstringrequired

Flint order line item ID.

Request body
modifiersarray of objectrequired
order_revisioninteger
Response · 200
OrderResponseobject
CheckoutSessionLineItemModifierUpdateResponseobject

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PUT https://api.withflintpay.com/v1/orders/ord_123/line-items/li_123/modifiers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "modifiers": [
      {
        "text": {
          "modifier_group_id": "mg_123",
          "value": "No onions"
        },
        "quantity": 1
      }
    ]
  }'

Remove line items#

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

Removes one or more line items from an order.

Path parameters
order_idstringrequired

Flint order ID.

Request body
order_line_item_idsarray of stringrequired
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/line-items/remove \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "order_line_item_ids": [
      "li_123"
    ]
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Pay order#

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

Starts or resumes a payment attempt on the order. Send payment_source to charge the outstanding balance in one call, payment_intents to select order-owned legs you created, setup_payment_source to save a credential on a zero-balance order, or payment_attempt_id to resume an attempt after a pending action. Manual-capture legs return an active authorization instead of settling immediately.

Path parameters
order_idstringrequired

Flint order ID.

Request body
buyer_emailstring
buyer_phonestring
completion_behaviorenum
complete_orderpartial_payment
expected_outstanding_moneyobject

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

payment_attempt_idstring
payment_intentsarray of object
payment_sourceobject
setup_payment_sourceobject
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDFULFILLMENT_SELECTION_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/pay \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "payment_intents": [
      {
        "payment_intent_id": "pi_123",
        "confirmation_token": "ctoken_123"
      }
    ],
    "expected_outstanding_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "buyer_email": "buyer@example.com"
  }'
JSON
{
  "data": {
    "order": {
      "order_id": "ord_123",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "name": "General Admission",
          "quantity": 2,
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "metadata": {
            "ticket_type": "ga"
          },
          "inventory_snapshot": null
        }
      ],
      "status": "open",
      "payment_status": "unpaid",
      "refund_status": "none",
      "metadata": {
        "event_id": "evt_123"
      },
      "merchant_id": "mer_123",
      "customer_id": "cus_123",
      "pricing_amounts": {
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "tax": {
        "enabled": false,
        "status": "",
        "mode": "",
        "taxability_reason": ""
      },
      "settlement_amounts": {
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "order_number": "1001",
      "origin": "api",
      "created_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "inventory_demand_revision": 0
    },
    "payment_attempt": {
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_action",
      "is_resumable": true,
      "mode": "payment",
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "payment_intents": [
        {
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          },
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "publishable_key": "pk_test_123",
              "payment_intent": {
                "stripe_js_call": "handle_next_action",
                "client_secret": "pi_client_secret_123"
              }
            }
          }
        }
      ]
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_action",
      "is_resumable": true,
      "mode": "payment",
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "payment_intents": [
        {
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          },
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "publishable_key": "pk_test_123",
              "payment_intent": {
                "stripe_js_call": "handle_next_action",
                "client_secret": "pi_client_secret_123"
              }
            }
          }
        }
      ]
    }
  ],
  "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 "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "status": "requires_action",
    "is_resumable": true,
    "mode": "payment",
    "expected_outstanding_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "payment_intents": [
      {
        "payment_intent_id": "pi_123",
        "status": "requires_action",
        "amount_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "tip_money": {
          "amount": 0,
          "currency": "USD"
        }
      }
    ],
    "pending_actions": [
      {
        "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "subject": {
          "payment_intent": {
            "payment_intent_id": "pi_123"
          }
        },
        "action_type": "payment_authentication",
        "client_action": {
          "stripe": {
            "account_id": "acct_123",
            "publishable_key": "pk_test_123",
            "payment_intent": {
              "stripe_js_call": "handle_next_action",
              "client_secret": "pi_client_secret_123"
            }
          }
        }
      }
    ]
  },
  "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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancellation_reason": "abandoned"
  }'
JSON
{
  "data": {
    "order": {
      "order_id": "ord_123",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "name": "General Admission",
          "quantity": 2,
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "metadata": {
            "ticket_type": "ga"
          },
          "inventory_snapshot": null
        }
      ],
      "status": "open",
      "payment_status": "unpaid",
      "refund_status": "none",
      "metadata": {
        "event_id": "evt_123"
      },
      "merchant_id": "mer_123",
      "customer_id": "cus_123",
      "pricing_amounts": {
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "tax": {
        "enabled": false,
        "status": "",
        "mode": "",
        "taxability_reason": ""
      },
      "settlement_amounts": {
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "order_number": "1001",
      "origin": "api",
      "created_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "inventory_demand_revision": 0
    },
    "payment_attempt": {
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_action",
      "is_resumable": true,
      "mode": "payment",
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "payment_intents": [
        {
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          },
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "publishable_key": "pk_test_123",
              "payment_intent": {
                "stripe_js_call": "handle_next_action",
                "client_secret": "pi_client_secret_123"
              }
            }
          }
        }
      ]
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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
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 "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"
        ]
      }
    }
  }'
JSON
{
  "data": {
    "payment_collection": {
      "stripe": {
        "account_id": "acct_example",
        "elements": {
          "amount_money": {
            "amount": 10000,
            "currency": "USD"
          },
          "digital_wallets": [
            "apple_pay",
            "google_pay"
          ],
          "mode": "payment",
          "next_step": "collect_payment_source",
          "payment_method_creation": "manual",
          "payment_method_types": [
            "card"
          ],
          "submit_to": "pay_order"
        },
        "publishable_key": "pk_test_example"
      }
    },
    "payment_intent": {
      "amount_money": {
        "amount": 10000,
        "currency": "USD"
      },
      "order_id": "ord_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "payment_intent_id": "pi_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_payment_method"
    }
  },
  "request_id": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

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 "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"
  }'
JSON
{
  "data": {
    "order": {
      "order_id": "ord_123",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "name": "General Admission",
          "quantity": 2,
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "metadata": {
            "ticket_type": "ga"
          },
          "inventory_snapshot": null
        }
      ],
      "status": "open",
      "payment_status": "unpaid",
      "refund_status": "none",
      "metadata": {
        "event_id": "evt_123"
      },
      "merchant_id": "mer_123",
      "customer_id": "cus_123",
      "pricing_amounts": {
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "tax": {
        "enabled": false,
        "status": "",
        "mode": "",
        "taxability_reason": ""
      },
      "settlement_amounts": {
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "order_number": "1001",
      "origin": "api",
      "created_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "inventory_demand_revision": 0
    },
    "payment_intent": {
      "amount_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "last_payment_error": null,
      "payment_flow": "",
      "payment_intent_id": "pi_123",
      "payment_options": null,
      "risk": null,
      "status": "succeeded",
      "support_reference": ""
    },
    "payment_attempt": {
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_action",
      "is_resumable": true,
      "mode": "payment",
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "payment_intents": [
        {
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          },
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "publishable_key": "pk_test_123",
              "payment_intent": {
                "stripe_js_call": "handle_next_action",
                "client_secret": "pi_client_secret_123"
              }
            }
          }
        }
      ]
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "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"
  }'
JSON
{
  "data": {
    "order": {
      "order_id": "ord_123",
      "line_items": [
        {
          "order_line_item_id": "li_123",
          "name": "General Admission",
          "quantity": 2,
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "metadata": {
            "ticket_type": "ga"
          },
          "inventory_snapshot": null
        }
      ],
      "status": "open",
      "payment_status": "unpaid",
      "refund_status": "none",
      "metadata": {
        "event_id": "evt_123"
      },
      "merchant_id": "mer_123",
      "customer_id": "cus_123",
      "pricing_amounts": {
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "tax": {
        "enabled": false,
        "status": "",
        "mode": "",
        "taxability_reason": ""
      },
      "settlement_amounts": {
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "balance_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "credit_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "order_number": "1001",
      "origin": "api",
      "created_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "inventory_demand_revision": 0
    },
    "payment_intent": {
      "amount_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "last_payment_error": null,
      "payment_flow": "",
      "payment_intent_id": "pi_123",
      "payment_options": null,
      "risk": null,
      "status": "succeeded",
      "support_reference": ""
    },
    "payment_attempt": {
      "payment_attempt_id": "opat_01ARZ3NDEKTSV4RRFFQ69G5FAV",
      "status": "requires_action",
      "is_resumable": true,
      "mode": "payment",
      "expected_outstanding_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "payment_intents": [
        {
          "payment_intent_id": "pi_123",
          "status": "requires_action",
          "amount_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tip_money": {
            "amount": 0,
            "currency": "USD"
          }
        }
      ],
      "pending_actions": [
        {
          "pending_action_id": "pendact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
          "subject": {
            "payment_intent": {
              "payment_intent_id": "pi_123"
            }
          },
          "action_type": "payment_authentication",
          "client_action": {
            "stripe": {
              "account_id": "acct_123",
              "publishable_key": "pk_test_123",
              "payment_intent": {
                "stripe_js_call": "handle_next_action",
                "client_secret": "pi_client_secret_123"
              }
            }
          }
        }
      ]
    }
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY"

Set requested tip#

POST/v1/orders/{order_id}/requested-tipIdempotentRequires scope: commerce.orders.write

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

Path parameters
order_idstringrequired

Flint order ID.

Request body
requested_tipobjectrequired

Requested tip to set or replace. Its effective amount must satisfy the CreateOrderTip limit.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDCHECKOUT_TIPPING_DISABLEDCHECKOUT_TIP_NOT_ALLOWEDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUNDTIP_LIMIT_EXCEEDED
Bash
curl -X POST https://api.withflintpay.com/v1/orders/ord_123/requested-tip \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "requested_tip": {
      "percent": 18
    }
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Clear requested tip#

POST/v1/orders/{order_id}/requested-tip/clearIdempotentRequires scope: commerce.orders.write

Clears the requested tip from an order.

Path parameters
order_idstringrequired

Flint order ID.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

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

Refresh order tax#

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

Calculates tax for an order using a caller-provided postal code, billing address, or tax address.

Path parameters
order_idstringrequired

Flint order ID.

Request body
tax_locationobject
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTRESOURCE_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/orders/ord_123/tax \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "tax_location": {
      "address_source": "provided",
      "address_type": "shipping_address",
      "address": {
        "line1": "123 Market St",
        "line2": "Suite 400",
        "country": "US",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94105"
      }
    }
  }'
JSON
{
  "data": {
    "order_id": "ord_123",
    "line_items": [
      {
        "order_line_item_id": "li_123",
        "name": "General Admission",
        "quantity": 2,
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "metadata": {
          "ticket_type": "ga"
        },
        "inventory_snapshot": null
      }
    ],
    "status": "open",
    "payment_status": "unpaid",
    "refund_status": "none",
    "metadata": {
      "event_id": "evt_123"
    },
    "merchant_id": "mer_123",
    "customer_id": "cus_123",
    "pricing_amounts": {
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "tax": {
      "enabled": false,
      "status": "",
      "mode": "",
      "taxability_reason": ""
    },
    "settlement_amounts": {
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "credit_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "order_number": "1001",
    "origin": "api",
    "created_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "inventory_demand_revision": 0
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}
Rate this doc