Payments

Payment intents represent a customer's intent to pay and track the payment lifecycle from creation through confirmation to completion. Create standalone payment intents through /v1/payment-intents with an explicit amount_money. Order-owned payment legs use /v1/orders/{order_id}/payment-intents, where Flint validates the leg against the order's live outstanding balance. Most checkout flows do not create a leg before buyer submit. Instead, render collection fields from the order or checkout session's payment_collection guidance, create a payment method in the browser, and submit it to /v1/orders/{order_id}/pay with action: "pay" and payment_source. Flint creates and pays the full-balance leg in that one request.

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. 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 payment_attempt_id; false means the attempt is terminal and you start new work. The in-flight attempt is exposed as active_payment_attempt on order and checkout-session detail so a lost response can be recovered without double-charging, and past attempts are readable through GET /v1/orders/{order_id}/payment-attempts. See Handling declines & 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.

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
confirm_payment_intentsNon-empty payment_intentscompletion_behavior: complete_order or partial_payment
setupsetup_payment_source containing a newly collected tokenNone
resumepayment_attempt_idNone

All four actions also accept expected_outstanding_money, buyer_email, and buyer_phone. pay collects the full outstanding balance; omit payment_source only when that balance is zero. setup saves a credential on a zero-balance order. To continue an open attempt after a pending client action, send action: "resume", or replay the exact original request with the same Idempotency-Key.

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
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_customerduplicatefraudulentabandonedauthorization_expiredinvoice_payment_failedinvoice_voidedpayment_canceled
capturable_moneyobject

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

capture_methodenum
automaticmanual
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
nonewarning_needs_responsewarning_under_reviewwarning_closedneeds_responseunder_reviewwonlostprevented
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. Later merchant assessments and credits are separate balance effects.

metadatamap of string
orderobject or null
order_idstring
originenum
virtual_terminalpayment_linkcheckoutapisubscription
payment_collectionobject
payment_flowenumrequired
checkoutpayment_linkinvoicesubscription_initialsubscription_renewalvirtual_terminalapi
payment_intent_idstringrequired
payment_optionsarray of enumrequired
cardapple_paygoogle_payaffirmach_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. Your net for the payment is captured_money minus this fee. Refunds do not return or revise it.

receipt_emailstring
refund_statusenum
nonepartially_refundedrefunded
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
nonepartially_refundedrefundeddisputed
statusenumrequired
requires_payment_methodrequires_confirmationrequires_actionprocessingrequires_capturecanceledsucceededexpired
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
goodsservicesother
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-intentsRequires 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_methodrequires_confirmationrequires_actionprocessingrequires_capturecanceledsucceededexpired
originenum

Filter by payment origin.

virtual_terminalpayment_linkcheckoutapisubscription
risk_levelarray of enum

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

normalelevatedhighestnot_assessed
payment_flowarray of enum

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

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

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.

stateenum

Filter by aggregate payment-intent state preset.

with_refundsfully_refundeddisputedneeds_action
sort_byenum

Sort field.

created_atupdated_atamount
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/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": "Zm9yd2FyZC1vbmx5LW9wYXF1ZS1jdXJzb3I",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Create standalone payment intent#

POST/v1/payment-intentsIdempotentRequires 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
automaticmanual
customer_idstring
external_reference_idstring

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

metadatamap of string
payment_optionsarray of enumrequired
cardapple_paygoogle_payaffirmach_debit
payment_return_urlstring
receipt_emailstring
tip_moneyobject

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

transaction_purposeenum
goodsservicesother
Response · 201
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_API_KEYINVALID_REQUESTMERCHANT_ONBOARDING_REQUIREDRATE_LIMIT_EXCEEDEDREQUEST_TIMEOUTSERVICE_UNAVAILABLE
Bash
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.

customerinvoiceorder
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/payment-intents/pi_123 \
  -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}IdempotentRequires 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

Error codes

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

Cancel payment intent#

POST/v1/payment-intents/{payment_intent_id}/cancelIdempotentRequires 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. 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/payment-intents/pi_123/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancellation_reason": "requested_by_customer"
  }'

Capture payment intent#

POST/v1/payment-intents/{payment_intent_id}/captureIdempotentRequires 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
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/payment-intents/pi_123/capture \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 3000,
      "currency": "USD"
    }
  }'

Confirm payment intent#

POST/v1/payment-intents/{payment_intent_id}/confirmIdempotentRequires 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
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/payment-intents/pi_123/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"
  }'
Rate this doc