Payments

On Flint, a payment usually belongs to an order. Submit the buyer's payment method to /v1/orders/{order_id}/pay and Flint creates and pays a payment intent for the full balance in one request. To do that, render collection fields from the order or checkout session's payment_collection guidance, create a payment method in the browser, and send it with action: "pay" and payment_source. Payment intents track each payment from creation through confirmation to completion. Order-owned payment legs use /v1/orders/{order_id}/payment-intents, where Flint validates the leg against the order's live outstanding balance. Standalone payment intents use /v1/payment-intents with an explicit amount_money.

A payment intent moves through statuses like requires_payment_method, requires_confirmation, requires_action, processing, and requires_capture before reaching a terminal state of succeeded, canceled, or expired. Standalone intents are confirmed through the payment-intent API. You can update their amount before attaching a payment source or starting the first confirmation attempt. After that, create a new payment intent to collect a different amount. If an amount update is still in progress, retry that update with the same idempotency key before confirming. Order-owned legs are created, confirmed, captured, and canceled only through order routes. Their amounts are immutable: if tax, tip, discounts, or line items change after an explicit leg is staged, cancel and recreate that leg. An order can carry multiple payment intents for split payment, and /v1/orders/{order_id}/pay validates the selected legs against the current outstanding balance before starting an attempt.

Each /v1/orders/{order_id}/pay call runs inside a payment attempt, the resource you inspect and resume when a payment does not complete in one call. The attempt carries a per-leg summary (including last_payment_error for a failed leg) and an is_resumable flag: true means finish the pending action and resume with action: "resume" and order_payment_attempt_id; false means the attempt cannot be resumed, which is not the same as finished: a finalizing attempt is not resumable and has usually charged the buyer already, so read status before starting new work. The open attempt is exposed as active_payment_attempt on order detail, and on checkout-session detail read with the session's own credential, so a lost response can be recovered without double-charging, and past attempts are readable through GET /v1/orders/{order_id}/payment-attempts. See Declines and payment attempts.

A succeeded payment carries processing_fee_money, Flint's all-in fee to process it. It is the complete processing price rather than a provider cost passed through, so your net is captured_money minus that fee. The fee is final at card capture or ACH success, and payments that are canceled or fail before success have none. Refunds do not return or revise it. See Processing fees.

Note:

If you are building browser checkout, start with the Embedded payments guide. For how payments relate to orders, see the Orders-first guide.

POST /v1/orders/{order_id}/pay requires an action. Each action accepts only its own fields:

ActionRequired fieldsOptional fields
payNone beyond actionpayment_source, save_payment_method
confirm_payment_intentsNon-empty payment_intentscompletion_behavior: complete_order or partial_payment; save_payment_method
setupsetup_payment_source containing a newly collected tokenNone
resumeorder_payment_attempt_idNone

All four actions also accept expected_outstanding_money and buyer_contact. A payment start records buyer_contact on the order; with a checkout session credential, omitted email and phone fields use the session's saved contact. pay collects the full outstanding balance; omit payment_source only when that balance is zero. setup saves a credential on a zero-balance order. save_payment_method: true saves the card the buyer typed once the payment succeeds, with usage: "on_session". It needs the checkout session's own credential, a session whose save_payment_method_offered is true and that acts for a customer, and one confirmation_token created with setupFutureUsage: "on_session"; see Offer to save the card. A session created for no customer acts for one after the buyer confirms their email with a code; until then the save returns SAVE_PAYMENT_METHOD_VERIFICATION_REQUIRED. To continue an open attempt after a pending client action, send action: "resume" with a new Idempotency-Key. Replaying the start request with its own key returns that request's stored response if it completed, or recovers the same attempt if it was interrupted. It never starts a second attempt.

JSON
{
  "action": "pay",
  "payment_source": {"confirmation_token": "ctoken_1kmn0aExample"},
  "expected_outstanding_money": {"amount": 2500, "currency": "USD"}
}

The Payment object#

Every field on a payment, as returned by retrieve and carried by the endpoints below.

Attributes

add_on_feesarray of object

Itemized invoice, subscription, and automatic tax fees collected with this payment. Available to the merchant only. Empty until fees settle or when no add-ons apply. Refunds do not return or revise these fees.

amount_moneyobjectRequired

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

authorization_expires_atstring

RFC3339 timestamp.

authorized_atstring

RFC3339 timestamp.

authorized_moneyobject

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

cancellation_reasonenum

Flint-normalized reason the payment intent was canceled. Unknown processor values are returned as payment_canceled.

  • requested_by_customer
  • duplicate
  • fraudulent
  • abandoned
  • authorization_expired
  • invoice_payment_failed
  • invoice_voided
  • payment_canceled
capturable_moneyobject

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

capture_methodenum
  • automatic
  • manual
captured_atstring

RFC3339 timestamp.

captured_moneyobject

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

created_atstring

RFC3339 timestamp.

current_payment_actionobject

Typed browser authority for the current standalone payment action. Complete it, then call the same confirm endpoint without a replacement credential. Absent when no browser action is required.

customerobject or null
customer_idstring
dispute_statusenum
  • none
  • warning_needs_response
  • warning_under_review
  • warning_closed
  • needs_response
  • under_review
  • won
  • lost
  • prevented
external_reference_idstring

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

fulfillment_holdobject
invoiceobject or null
invoice_idstring
last_payment_errorobject
merchant_idstring
merchant_net_moneyobject

Captured amount minus processing_fee_money and every amount in add_on_fees. Later merchant assessments and credits are separate balance effects.

metadatamap of string
orderobject or null
order_idstring
originenum
  • virtual_terminal
  • payment_link
  • checkout
  • api
  • subscription
payment_collectionobject
payment_flowenumRequired
  • checkout
  • payment_link
  • invoice
  • subscription_initial
  • subscription_renewal
  • virtual_terminal
  • api
payment_intent_idstringRequired
payment_optionsarray of enumRequired
  • card
  • apple_pay
  • google_pay
  • affirm
  • ach_debit
payment_sourceobject
processing_fee_moneyobject

Flint's all-in processing fee for this payment. It is the complete price Flint charges to process the payment, never a provider cost passed through. The fee is final once the card payment is captured or the ACH payment succeeds; canceled payments and failures before success have none. Invoice, subscription, and automatic tax fees are itemized separately in add_on_fees. Your net for the payment is captured_money minus this fee and the add-on fees. Refunds do not return or revise it.

receipt_emailstring
refund_statusenum
  • none
  • partially_refunded
  • refunded
refunded_moneyobject

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

released_moneyobject

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

riskobject
selected_payment_optionstring
settlement_statusenum
  • none
  • partially_refunded
  • refunded
  • disputed
statusenumRequired
  • requires_payment_method
  • requires_confirmation
  • requires_action
  • processing
  • requires_capture
  • canceled
  • succeeded
  • expired
support_referencestringRequired

Opaque payment reference to share with merchant support. Do not parse its format.

tip_moneyobject

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

transaction_purposeenum
  • goods
  • services
  • other
updated_atstring

RFC3339 timestamp.

JSON
{
  "amount_money": {
    "amount": 5000,
    "currency": "USD"
  },
  "capture_method": "automatic",
  "created_at": "2026-03-17T14:30:00Z",
  "customer_id": "cus_123",
  "external_reference_id": "cart_123",
  "last_payment_error": null,
  "merchant_id": "mer_123",
  "metadata": {
    "channel": "web"
  },
  "origin": "api",
  "payment_collection": {
    "stripe": {
      "account_id": "acct_123",
      "elements": {
        "amount_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "digital_wallets": [
          "apple_pay"
        ],
        "mode": "payment",
        "next_step": "create_confirmation_token",
        "payment_method_creation": "manual",
        "payment_method_types": [
          "card"
        ],
        "submit_to": "confirm_payment_intent"
      },
      "publishable_key": "pk_test_123"
    }
  },
  "payment_flow": "",
  "payment_intent_id": "pi_123",
  "payment_options": [
    "card",
    "apple_pay"
  ],
  "receipt_email": "buyer@example.com",
  "refund_status": "none",
  "risk": null,
  "settlement_status": "none",
  "status": "requires_confirmation",
  "support_reference": "",
  "updated_at": "2026-03-17T14:30:00Z"
}

List payment intents#

GET/v1/payment-intents

Requires scope payments.payment_intents.read or payments.payment_intents.write

Returns a paginated list of payment intents for the authenticated merchant.

Query parameters

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

order_idstring

Filter by order ID.

customer_idstring

Filter by customer ID.

invoice_idstring

Filter by invoice ID.

statusenum

Filter by payment intent status.

  • requires_payment_method
  • requires_confirmation
  • requires_action
  • processing
  • requires_capture
  • canceled
  • succeeded
  • expired
originenum

Filter by payment origin.

  • virtual_terminal
  • payment_link
  • checkout
  • api
  • subscription
risk_levelarray of enum

Filter by the latest completed risk assessment. Repeat or comma-separate values.

  • normal
  • elevated
  • highest
  • not_assessed
payment_flowarray of enum

Filter by immutable payment flow. Repeat or comma-separate values.

  • checkout
  • payment_link
  • invoice
  • subscription_initial
  • subscription_renewal
  • virtual_terminal
  • api
external_reference_idstring

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

return_idstring

Filter by linked Return ID.

return_resolution_idstring

Filter by linked ReturnResolution ID.

querystring

Search across payment_intent_id, external_reference_id, and receipt_email. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.

min_amountinteger

Inclusive lower bound in minor units. Requires currency.

max_amountinteger

Inclusive upper bound in minor units. Requires currency.

currencystring

ISO 4217 currency for min_amount and max_amount.

refund_statusarray of enum

Exact match on refund_status. Repeat keys or comma-separate values to match any selected status. Combined with dispute_status, both filters must match.

  • none
  • partially_refunded
  • refunded
dispute_statusarray of enum

Exact match on dispute_status. Repeat keys or comma-separate values to match any selected status. Combined with refund_status, both filters must match.

  • none
  • warning_needs_response
  • warning_under_review
  • warning_closed
  • needs_response
  • under_review
  • won
  • lost
  • prevented
sort_byenum

Sort field.

  • created_at
  • updated_at
  • amount
sort_directionenum

Sort direction.

  • asc
  • desc
created_afterstring

RFC3339 lower bound for created_at.

created_beforestring

RFC3339 upper bound for created_at.

updated_afterstring

RFC3339 lower bound for updated_at.

updated_beforestring

RFC3339 upper bound for updated_at.

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/payment-intents \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "amount_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "capture_method": "automatic",
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_123",
      "external_reference_id": "cart_123",
      "last_payment_error": null,
      "merchant_id": "mer_123",
      "metadata": {
        "channel": "web"
      },
      "origin": "api",
      "payment_flow": "",
      "payment_intent_id": "pi_123",
      "payment_options": [
        "card",
        "apple_pay"
      ],
      "receipt_email": "buyer@example.com",
      "refund_status": "none",
      "risk": null,
      "settlement_status": "none",
      "status": "requires_confirmation",
      "support_reference": "",
      "updated_at": "2026-03-17T14:30:00Z"
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Create standalone payment intent#

POST/v1/payment-intentsIdempotent

Requires scope payments.payment_intents.write

Creates a standalone payment intent for the authenticated merchant. Create order-owned payment intents with POST /v1/orders/{order_id}/payment-intents.

Request body

amount_moneyobjectRequired

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

capture_methodenum
  • automatic
  • manual
customer_idstring
external_reference_idstring

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

metadatamap of string
payment_optionsarray of enumRequired
  • card
  • apple_pay
  • google_pay
  • affirm
  • ach_debit
payment_return_urlstring
receipt_emailstring
tip_moneyobject

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

transaction_purposeenum
  • goods
  • services
  • other

Response · 201

dataobjectRequired
metaobject
request_idstring
curl -X POST https://api.withflintpay.com/v1/payment-intents \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "capture_method": "automatic",
    "customer_id": "cus_123",
    "external_reference_id": "cart_123",
    "metadata": {
      "channel": "web"
    },
    "payment_options": [
      "card",
      "apple_pay"
    ],
    "receipt_email": "buyer@example.com"
  }'

Get payment intent#

GET/v1/payment-intents/{payment_intent_id}

Requires scope payments.payment_intents.read or payments.payment_intents.write

Returns a single payment intent by ID.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID.

Query parameters

expandarray of enum

Supported expansions: customer, invoice, order. Expansion requires payments.payment_intents.read plus the read scope for each expanded resource. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=customer&expand=invoice, or pass one comma-separated value.

  • customer
  • invoice
  • order

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/payment-intents/pi_01J00000000000000000000000 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "amount_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "capture_method": "automatic",
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_123",
    "external_reference_id": "cart_123",
    "last_payment_error": null,
    "merchant_id": "mer_123",
    "metadata": {
      "channel": "web"
    },
    "origin": "api",
    "payment_collection": {
      "stripe": {
        "account_id": "acct_123",
        "elements": {
          "amount_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "digital_wallets": [
            "apple_pay"
          ],
          "mode": "payment",
          "next_step": "create_confirmation_token",
          "payment_method_creation": "manual",
          "payment_method_types": [
            "card"
          ],
          "submit_to": "confirm_payment_intent"
        },
        "publishable_key": "pk_test_123"
      }
    },
    "payment_flow": "",
    "payment_intent_id": "pi_123",
    "payment_options": [
      "card",
      "apple_pay"
    ],
    "receipt_email": "buyer@example.com",
    "refund_status": "none",
    "risk": null,
    "settlement_status": "none",
    "status": "requires_confirmation",
    "support_reference": "",
    "updated_at": "2026-03-17T14:30:00Z"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Update payment intent#

PATCH/v1/payment-intents/{payment_intent_id}Idempotent

Requires scope payments.payment_intents.write

Applies a sparse update to a payment intent before it reaches a terminal state.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID.

Request body

amount_moneyobject

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

customer_idstring
external_reference_idstring

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

metadatamap of string or null

Caller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all metadata. An empty object makes no change. Empty strings are stored. Keys starting with flint_ are reserved and cannot be written through the public API.

receipt_emailstring
tip_moneyobject

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

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X PATCH https://api.withflintpay.com/v1/payment-intents/pi_01J00000000000000000000000 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "metadata": {
      "channel": "support"
    },
    "receipt_email": "updated@example.com"
  }'

Cancel payment intent#

POST/v1/payment-intents/{payment_intent_id}/cancelIdempotent

Requires scope payments.payment_intents.write

Cancels a standalone payment intent before it reaches a terminal settled state. Order-owned payment intents use the attempt-aware order cancellation route.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID.

Request body

cancellation_reasonenum

Optional merchant-supplied cancellation reason.

  • requested_by_customer
  • duplicate
  • fraudulent
  • abandoned

Response · 200

Same response as Update payment intent.

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

Capture payment intent#

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

Requires scope payments.payment_intents.write

Captures an authorized standalone payment intent, including partial captures when supported. Order-owned payment intents use the attempt-aware order capture route.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID.

Request body

amount_moneyobject

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

Response · 200

Same response as Update payment intent.

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

Confirm payment intent#

POST/v1/payment-intents/{payment_intent_id}/confirmIdempotent

Requires scope payments.payment_intents.write

Confirms a standalone payment intent. Order-owned payment intents reject this route and must be confirmed through POST /v1/orders/{order_id}/pay.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID.

Request body

confirmation_tokenstring
payment_method_idstring
payment_source_tokenstring

Response · 200

Same response as Update payment intent.

curl -X POST https://api.withflintpay.com/v1/payment-intents/pi_01J00000000000000000000000/confirm \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "confirmation_token": "ctoken_123"
  }'

Was this helpful?