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 as 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 by 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.

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 merchant 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 "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
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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "external_reference_id": "cart_123",
    "customer_id": "cus_123",
    "metadata": {
      "channel": "web"
    },
    "capture_method": "automatic",
    "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. Send repeated expand parameters as the canonical form, for example expand=customer&expand=invoice. Comma-separated values, expand[]=customer, and numeric expand[0]=customer are accepted for common client compatibility.

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

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
metadatamap of string
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_NOT_FOUNDSERVICE_UNAVAILABLE
Bash
curl -X PATCH https://api.withflintpay.com/v1/payment-intents/pi_123 \
  -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"
  }'
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"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancellation_reason": "requested_by_customer"
  }'
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"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "amount_money": {
      "amount": 3000,
      "currency": "USD"
    }
  }'
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"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

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 "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "confirmation_token": "ctoken_123"
  }'
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"
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}
Rate this doc