Checkout sessions
A checkout session is one buyer's chance to pay one order. Flint either hosts the payment page, and you send the buyer to the session's url, or your storefront renders checkout itself and calls Flint with the session's checkout credential. Every session is backed by an order: the session collects payment, and the order holds what was sold, its total, and its payment state.
Use a session when a buyer pays now, in one sitting. A payment link is a reusable URL that starts a new session for each buyer, and an invoice collects a balance over time. Payment links vs checkout sessions vs invoices compares the three, and the Checkout sessions guide walks through a hosted checkout from creation to payment.
Delivery address country requirements come from the session's pinned delivery methods, including their eligibility and rate-table conditions. Read input_requirements[].constraint.supported_countries on the checkout session or delivery quote, and intersect across choice groups. Automatic tax adds the order's tax.supported_countries limit, currently ["US"]. Non-US automatic tax locations are not supported. Unrestricted delivery excludes CU, IR, KP, and SY; Crimea, Donetsk, and Luhansk are excluded when address data identifies them.
What a session collects#
type is fixed at creation. You create three types with POST /v1/checkout-sessions, and Flint creates the other two through other routes.
order: sendorder_idfor an open order you built. The session uses the order's customer, tax, and lines, so set those on the order;customer_idandtaxaren't accepted with this type. A return resolution's replacement order is also collected asorder.quick_pay: sendquick_pay_itemwith anameandamount_money, and Flint creates a one-line order.subscription_plan: sendsubscription_plan_idfor an active plan. Flint creates the signup order and, once the buyer pays, the subscription.invoice: created withtype: invoiceto collect the invoice's order. Its deadline comes from the invoice, notexpires_in_seconds.payment_link: started byPOST /v1/payment-links/{payment_link_id}/resolve, which creates an order from the link for each buyer.shop: started byPOST /v1/shops/{shop_id}/resolve. The session carriesshop_id. FilterGET /v1/checkout-sessionsby that ID to list a shop's sessions.
Sessions started from payment links also have client_reference: the opaque buyer or cart reference carried by the URL or resolve request, or null when none was sent. It is immutable and readable only by merchant credentials, including checkout-session webhooks. Create and PATCH do not accept it. Unlike merchant-owned external_reference_id, it is buyer-editable before resolve and is not proof of identity. Resolve's prefill.email fills in an editable email without setting customer_id or customer_prefill.
They also return custom_field_answers, the buyer's answers to the link's custom fields, the same as on the session's order. It is read-only, readable only by merchant credentials, and empty for other sessions. See Orders.
A partner app token can send platform_fee on an order or quick_pay session to charge a platform fee on the payment it collects. The session's platform_fee shows the fee requested, readable only by merchant credentials, and each payment the session creates carries its own. To price a subscription signup and every renewal after it, send platform_fee_rule instead, on an order, quick_pay, or subscription_plan session. Live rules also require the app's owner to accept a Flint Platform Agreement version that covers rules. See Platform fees.
For quick_pay and subscription_plan, tax.enabled and tax.calculation set the tax of the order Flint creates. tax.calculation is {"mode": "automatic"} or {"mode": "external", "components_source": "callback"}, which asks your tax calculation callback once the buyer gives an address or picks delivery. External tax needs components_source: callback; without it the request returns 400 INVALID_REQUEST with detail code REQUIRED. Leave it out to follow tax.default_calculation, where a provided default means automatic. The session's tax returns what you set. See Tax at checkout.
Payment needs the buyer's email, which comes from the buyer's entry or their wallet, and Flint saves it on the customer.
For a subscription plan checkout, subscription_terms.line_items accepts partial quantity overrides such as [{"subscription_plan_line_item_id":"spli_1kmn0aExample","quantity":7}] on create and PATCH. Each ID must be distinct and belong to the plan. Omitted lines keep their quantities. Merchant credentials may set any line to 1 through 9,999. Checkout credentials may set only the line with allow_quantity_adjustment: true, within its frozen min_quantity and max_quantity (defaults 1 and 9,999). Read the IDs and policy in the session's subscription_terms.line_items. Changing line quantities reprices the signup order and its recurring terms together.
In a headless checkout that sells a subscription, pass the session's customer_account_url as Apple Pay's recurringPaymentRequest.managementURL, so the wallet sheet says where the buyer manages the subscription.
Prefill delivery details#
Send prefill.shipping_recipient_name on POST /v1/checkout-sessions. shipping_recipient_name: who receives the delivery. Send it with shipping_address so the buyer has nothing to type.
It is optional and accepted with or without prefill.shipping_address. Flint trims surrounding whitespace and keeps 1 to 200 characters. A blank or longer name returns 400 INVALID_REQUEST with detail INVALID_VALUE and param: prefill.shipping_recipient_name. Both your API key and the session's checkout credential read the stored value under prefill. The buyer can edit it, and it never changes the customer record. Pickup-only sessions and sessions without delivery accept it and don't use it.
{
"type": "quick_pay",
"quick_pay_item": {"name": "Coffee", "amount_money": {"amount": 1800, "currency": "USD"}},
"prefill": {
"shipping_recipient_name": "Alex Morgan",
"shipping_address": {"line1": "123 Market Street", "city": "San Francisco", "state": "CA", "postal_code": "94103", "country": "US"}
}
}
Payment-link resolve still accepts only prefill.email.
Apply promotions at creation#
For quick_pay and subscription_plan, send discounts with 1 to 10 entries, each containing promotion with either promotion_id or promotion_code. Flint prices them after the order's lines, subscription terms, customer, and tax inputs, and saves the order and session together. If a promotion can't be redeemed, neither record is created. With type: "order", apply discounts through POST /v1/orders/{order_id}/discounts instead.
Account promotion settings apply to these entries. Session promotion_config controls buyer actions, so you can set promotion_config.codes_enabled: false alongside a pre-applied offer to prevent buyers from adding codes. A code-type promotion still requires account codes to be enabled, including when selected by ID.
Flint ranks the entries as promotions already on the order. A ranking loss returns 201 with a promotion_declined warning in meta.warnings; an unredeemable promotion returns 409 PROMOTION_DECLINED. Read applied entries on order.discounts, or order.deferred_promotions for a trial, by expanding order on a session read or reading the order directly. By-ID entries have promotion_code: null; the buyer can't remove them. Eligible promotions survive buyer changes to subscription terms, address, and codes.
See Apply a promotion when you create a checkout session for an example.
Hosted or headless#
surface is also fixed at creation, and defaults to hosted.
surface: hosted
Hosted
Flint renders the payment page. Create and launch responses include url and omit checkout_auth_token. Send the buyer to url, and set where they land afterward with redirects (success_url, cancel_url, expired_url). Only a merchant credential reads url.
surface: headless
Headless
Your storefront renders checkout. Your backend keeps checkout_auth_token and relays the buyer's calls with it. Send page_origin to show a gift card challenge and payment_return_url for redirect payments such as Affirm. There's no url, and redirects isn't accepted.
Build your own checkout covers a headless integration end to end.
Who can call what#
A session answers to two credentials:
- Your API key reaches every session. Use it to create, list, read, and close sessions, to update
metadataandexternal_reference_idin any status, and to pay the order for the buyer, for example over the phone. - The checkout credential (
ckat_), returned ascheckout_auth_tokenby headless create and launch routes, reaches only its own session and that session's order. It does what the buyer does: savesbuyer_contactandtimezone, chooses delivery, applies codes and gift cards, requests and confirms verification codes, and pays the order. It can also confirm and cancel its own session's payment intents. After 3D Secure, confirm the action's payment intent withoutpayment_sourceto continue the holding attempt. It can't close the session.
A read with the checkout credential leaves out url, metadata, external_reference_id, and closed_reason_message, and adds what the buyer's page needs, such as payment_collection, customer_prefill, the save-card fields, and merchant_support. The API reference marks each field a credential doesn't receive. What the checkout credential can do lists every call it can make.
The checkout credential requests a six-digit code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications and confirms it on the confirm route. purpose says what the code unlocks: save_payment_method, use_saved_payment_methods, confirm_saved_payment_method, or gift_card_purchase, which lets a buyer with no customer record buy a gift card. Confirming an email returns a new checkout credential, and only that credential acts for the customer it confirms. See Confirm the buyer's email.
Texted customer verifications include code_route in create, read, and list responses: store for a number saved at this business, or flint_wallet for the buyer's enrolled wallet number in Flint's hosted checkout. The field is omitted for email and describes the original request, not current access to saved details. Its vocabulary is extensible; use generic code instructions for unrecognized values.
Listing saved cards without customer_id requires saved-card authority from the merchant's customer binding or a confirmed email or phone code. Without that authority, GET /v1/payment-methods returns 409 ACTION_NOT_ALLOWED, reason verification_required, and no param. Its top-level remediation.next_actions includes create_checkout_session_customer_verification with /v1/checkout-sessions/{checkout_session_id}/customer-verifications. Use purpose: use_saved_payment_methods with the supported email or phone flow, confirm the code, then list with the checkout credential returned by confirmation. A code may not be offered; the buyer can continue with a fresh card. An explicit customer outside the credential's authority stays concealed as 404 RESOURCE_NOT_FOUND. Linking the order to a customer alone grants no saved-card authority.
An ended checkout refuses operations outside its allowed reads with 409 ACTION_NOT_ALLOWED, reason terminal_status, its current_status, and the message "The checkout session has ended." Read the checkout to decide whether to start another session.
Status#
A session starts open and ends exactly once. terminal_reason says why it ended.
status on checkout sessionopenThe buyer can pay.paidFinalA payment through the session collected the full amount due:payment_succeeded.partially_paidFinalA payment through the session settled part of the amount due:payment_partially_succeeded. Create a new session for the order to collect the rest.expiredFinalThe deadline inexpires_atpassed first:expired.closedFinalYou closed it:closed_by_merchant.invalidatedFinalSomething outside the session ended it.terminal_reasonsays what.
An invalidated session's terminal_reason is one of these:
superseded: a replacement session took its place, andsuperseding_checkout_session_idnames it.order_paid_elsewhere: a payment outside the session cleared the order's balance.order_mutated: an order edit closed the order or left nothing to pay.invoice_paid_elsewhere,invoice_voided,invoice_uncollectible, orinvoice_balance_changed: the invoice was paid another way, voided, marked uncollectible, or its amount due changed.
A session lasts 24 hours unless you send expires_in_seconds, from 60 to 86,400, or the merchant set a different default; see Expiration. A session that reaches expires_at during a payment, for example on a 3D Secure screen, stays open with is_in_recovery: true until that one attempt finishes; see Finish a payment after expiry. Closing takes an optional reason_message, kept as closed_reason_message, which the buyer never sees.
After the session ends, its checkout credential can still read it, so the buyer's page can show the outcome. After a paid, partially_paid, or invalidated session, it can also read the order and its payments, and after a paid or partially_paid one it can send the receipt. Any other call returns 409 ACTION_NOT_ALLOWED with details[0].reason terminal_status. Your API key keeps full access; see After a session ends.
Flint sends a webhook when a session starts and when it ends. Fulfill from order.paid, which fires once the order is paid in full however it was paid. Check the order's dispute_status first (access rules).
- checkout_
session. created A session was created. - checkout_
session. paid The session collected the full amount due. - checkout_
session. partially_ paid The session collected part of the amount due. - checkout_
session. expired The deadline passed. - checkout_
session. closed You closed the session. - checkout_
session. invalidated Something outside the session ended it. Readterminal_reason.
Rules across a session#
One open session per order#
An order has at most one open session. Creating another returns 409 ALREADY_EXISTS with param: order_id and the open session in details[0].current_resource, which keeps working. To replace it on purpose, send its ID as replace_checkout_session_id with type: "order": the old session becomes invalidated with superseded. If a different session is now open, the request returns 409 VERSION_CONFLICT with that session in details[0].current_resource. Naming a closed or expired session when none is open creates the new session normally. See One open session per order.
A hosted session collects the order with one payment method. Creating one for an order with more than one unpaid payment intent returns 409 RESOURCE_IN_USE with those payment intents in details[0].blocking_resources; cancel the extra ones or use a headless session.
What can change after creation#
How checkout looks and behaves is set on POST /v1/checkout-sessions and stays fixed: theme, tip, buyer_fields, prefill, payments, promotion_config, legal, custom_text, tax, delivery_method_ids, redirects, expires_in_seconds, page_origin, and payment_return_url. Of these, only page_origin and the return destination can change, through the invoice and return-resolution launch routes; to change anything else, replace the session. These fields change after creation:
| Field | Who changes it, and when |
|---|---|
metadata, external_reference_id | Your API key, with PATCH, in any status. |
buyer_contact, timezone | The checkout credential, with PATCH, while the session is open. |
subscription_terms | Either credential, with PATCH, while a subscription_plan session is open and no payment is running. A billing interval or quantity change reprices the signup order. gift_recipient is accepted only when subscription_terms.gifts_enabled is true, and leaves the price and delivery choice as they are. See Gifts at checkout. |
page_origin and the return destination | The invoice and return-resolution launch routes, when they reuse an open session. return_url applies only until a payment starts. See Collect an invoice or a return balance. |
Changing the order during checkout#
Editing the order with your API key keeps a session open with the same ID, URL, and checkout credential, and Flint re-prices the order in place. The edit ends the session with order_mutated only when it closes the order or leaves nothing to pay; sessions for an invoice, a return, or a subscription plan can also end that way when their order changes. Because the total can move, a payment while the session is open sends the outstanding_money the buyer approved as expected_outstanding_money, and can send the order's version as expected_version, on POST /v1/orders/{order_id}/pay. A mismatch returns 409 VERSION_CONFLICT without charging. See Changing the order during checkout and Paying the order with your API key.
Versions#
Every session has a version, starting at 1, that goes up with each committed change to the session itself:
- an update to
metadata,external_reference_id,buyer_contact, orsubscription_terms - a launch route replacing
page_originor the return destination - closing, expiry, invalidation, or a payment ending the session
- Flint clearing the saved
buyer_contactafter the session ends
Saving the buyer's timezone doesn't change it. Order edits change the order's version, and expanded payment intents carry their own.
Send the version you read as expected_version to apply a change only to that version. Two calls accept it:
PATCH /v1/checkout-sessions/{checkout_session_id} accepts expected_version from your API key, a partner credential, or the session's checkout credential, for the fields that credential can update.
POST /v1/checkout-sessions/{checkout_session_id}/close accepts expected_version from your API key or partner credential. The session's checkout credential cannot close it.
A stale value returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and nothing changes. A buyer's page sends the version it loaded and moves forward only with versions its own saves return. On a conflict, keep what the buyer typed, read the session again, and resend with the new version and a new Idempotency-Key. Paying uses the order's version, not the session's.
Expand related records#
GET /v1/checkout-sessions/{checkout_session_id} and GET /v1/checkout-sessions accept expand to include related records beside their IDs, or null when the session has no such ID. Each path needs checkouts.checkout_sessions.read plus the scope of the record it adds; without it, the request returns 403 INSUFFICIENT_SCOPE with param: expand.
expand | Also needs |
|---|---|
order | commerce.orders.read |
invoice | commerce.invoices.read |
payment_link | checkouts.payment_links.read |
customer | customers.read |
payment_intents | payments.payment_intents.read. Single-session read only. |
An expanded order includes the contact the order recorded as buyer_contact, including on guest orders; see Expanded order summaries.
This lists paid headless sessions for one invoice, with each session's order:
curl -G https://api.withflintpay.com/v1/checkout-sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "invoice_id=inv_01J00000000000000000000000" \
--data-urlencode "surface=headless" \
--data-urlencode "status=paid" \
--data-urlencode "expand=order"
status, type, and surface take several values as repeated keys or a comma-separated list. Expand related records covers how Flint expands a page and keeps page tokens valid.
Related guides#
Checkout sessionsCreate a hosted session, send the buyer to it, and confirm the payment.Build your own checkoutRun a headless session from your storefront: delivery, saved cards, gift cards, and branding.Payment links vs checkout sessions vs invoicesChoose how to collect a payment.The Checkout session object#
A session in which a buyer completes an order's payment.
Returned by GET /v1/checkout-sessions/{checkout_session_id} and carried by the endpoints below.
Attributes
active_payment_attemptobjectThe payment attempt now collecting this checkout's order, the same attempt as the order's active_payment_attempt. Read it to recover after losing a pay response, and resume it only when is_resumable is true. Omitted when no attempt is active. Pending actions that open a URL are left out; the pay response carries them.
completed_atstringRFC3339 timestamp.
expected_outstanding_moneyobjectRequiredThe outstanding balance this attempt was started to collect, fixed when it started. For an order that gift cards partly cover, it includes the gift card part. Later changes to the order's balance don't change it, and a resume request that sends `expected_outstanding_money` is compared with this amount.
gift_card_redemptionsarray of objectRequiredGift cards this attempt holds or has redeemed, one entry per card. Each amount is reserved while the attempt is open and is taken from the card when the attempt succeeds. A failed or canceled attempt releases it. Empty when no gift card is used.
idempotency_keystring or nullRequiredThe Idempotency-Key of the request that created this resource. `null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown. Filter its list with `idempotency_key` to find it. Recorded payloads, including replayed responses and webhook events, can return `null`. To find a key that a replay returns as `null`, read the resource. Buyer sessions on routes shared with merchants get `null`. `/v1/me` responses do not include this field.
is_resumablebooleanRequiredWhether the attempt can continue through PayOrder with action: resume and this order_payment_attempt_id after any pending client action is complete. If false, check status before starting another payment; the attempt may still be in progress.
last_payment_errorobjectThe concluded failure of a payment leg that failed this attempt. Absent for non-payment failures.
modeenumRequiredWhether the attempt collects the order's balance, saves a payment method without charging it, or settles the order without a processor payment.
paymentsetupsettlement
order_idstringRequiredThe order this payment attempt collects money for or saves a payment method for.
order_payment_attempt_idstringRequiredUnique identifier for this order payment attempt, prefixed `opat_`.
payment_intentsarray of objectRequiredThe payment intents this attempt collects through, each with its amount, status, tip, and latest error. Empty for an attempt that collects no processor payment, such as a setup, or an order that gift cards or return credit settle alone.
payment_method_saveobjectReports only a checkout buyer's skipped save when the pay request sent save_payment_method: true and the attempt paid without saving the payment method. A merchant save has no entry here; read payment_source.card.payment_method_id on the payment intent. A card typed into checkout and saved has no entry here; read payment_method_save on the checkout session for a card waiting for confirmation.
pending_actionsarray of objectRequiredSteps the buyer must finish in your client before the attempt can continue, such as authentication. Empty when none is pending. Complete them, then resume the attempt.
started_atstringRFC3339 timestamp.
statusenumRequiredWhere the attempt is in collecting payment or saving a payment method. `partially_succeeded`, `succeeded`, `failed`, `canceled`, and `expired` are final.
processingrequires_actionrequires_capturepartially_succeededsucceededfailedexpiredcanceled
status_reasonenumNon-payment reason an attempt failed, was canceled, or expired. Failed attempts with an unmapped non-payment reason report other. Canceled and expired attempts include a reason only when it adds information beyond status. New values may be added.
authorization_canceledcanceled_on_readerreader_unavailablecoupon_reservation_failedgift_card_hold_acquisition_failedinvalid_payment_sourceinventory_unavailableorder_changed_before_paymentorder_payment_customer_mismatchotherpayment_authorization_canceledpayment_authorization_expiredpayment_confirmation_rejectedpayment_link_capacity_claim_failedpayment_link_capacity_validation_failedpayment_method_activation_pendingpayment_method_requiredpayment_option_not_allowedpayment_option_unavailablepayment_returnedpayment_source_binding_failedpayment_source_conflictpayment_source_not_updatablepayment_source_ownership_mismatchrate_limit_exceededresource_guarantee_failedsetup_action_unavailablesetup_hold_acquisition_failedsetup_result_incompletetip_allocation_sync_failedzero_balance_hold_acquisition_failed
supported_actionsarray of enumLifecycle actions accepted now. Cancel is available during collection until a payment leg succeeds. Attempts applying their outcome to the order and terminal attempts list no actions. Always present with merchant credentials.
Not returned with a checkout credential or a customer session
cancel
buyer_contactobjectContact the buyer entered in checkout before paying, saved with the session's checkout credential. Separate from merchant-supplied prefill and customer_prefill from the customer record. Omitted until the buyer saves or clears a field. When a checkout session payment omits buyer_contact.email or buyer_contact.phone, Flint uses these values. Flint clears the contact 30 days after the session ends, and when a customer linked to the session is deleted.
emailstring or nullRequiredEmail supplied for the buyer, exactly as sent. Null when no email is saved; is_email_cleared distinguishes an explicit clear.
is_email_clearedbooleanRequiredTrue when the buyer explicitly cleared the email, including before entering one. Saving an email resets it to false. Do not restore a prefilled email while true.
is_phone_clearedbooleanRequiredTrue when the buyer explicitly cleared the phone, including before entering one. Saving a phone resets it to false. Do not restore a prefilled phone while true.
phonestring or nullRequiredPhone supplied for the buyer, in E.164 format. Null when no phone is saved; is_phone_cleared distinguishes an explicit clear.
updated_atstringWhen the buyer last changed the saved checkout contact. Omitted on order buyer contact.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
address_autocomplete_enabledbooleanWhether checkout offers address suggestions while the buyer enters an address.
require_billing_addressbooleanWhether checkout requires the buyer's billing address.
require_emailbooleanWhether checkout requires the buyer's email address. Subscription plan sessions always require email, so only true is allowed with type: subscription_plan.
require_phonebooleanWhether checkout requires the buyer's phone number.
can_apply_promotion_codebooleanRequiredWhether to offer promotion-code entry now. True only while the session is open, is not in recovery, and merchant promotion policy allows codes. An explicit promotion_config.codes_enabled wins; null offers entry only when this merchant has an active code promotion whose schedule includes now, in the session's environment. Recomputed on each read. This hint does not change code admission: checkout lifecycle, promotion_config, and merchant policy still apply.
can_save_payment_methodbooleanWhether checkout offers the buyer the option to save the card they type for faster checkout at this merchant. When true, PayOrder accepts save_payment_method: true for one newly collected card. False when the merchant turned checkout.saved_payment_details off, customer accounts are merchant hosted, card is not an available payment option, the checkout collects an invoice, a subscription, or a return, or the checkout acts for no customer and Flint cannot email the buyer a verification code. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
can_save_payment_method_with_phonebooleanWhether the buyer can save the card they type by giving a US or Canadian mobile phone number with the payment, in save_payment_method_phone on POST /v1/orders/{order_id}/pay, and confirming it with a texted code after paying. True while Flint can send texts and either save_payment_method_requires_verification is true, so the number replaces confirming an email before paying, or the checkout acts for the customer whose email the buyer confirmed with this credential, so the number joins that customer's saved details once the buyer confirms it. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
checkout_session_idstringRequiredUnique identifier for this checkout session, prefixed `cs_`.
client_referencestring or nullThe reference the payment link URL or resolve request carried, such as your user ID. `null` when none was sent or checkout did not start from a payment link. Returned only to merchant credentials; omitted for buyer credentials. Set by the buyer's browser, so treat it as a claim, not proof of identity. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
closed_reason_messagestringThe note supplied when the checkout session was closed.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRequiredRFC3339 timestamp.
custom_field_answersarray of one ofThe buyer's answers to the payment link's custom fields, the same as the `custom_field_answers` of the session's order. Read-only. Empty when the session didn't start from a payment link, the buyer answered no custom fields, or the order was created before Flint recorded answers here. Returned only to merchant credentials; omitted for buyer credentials. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
One of these shapes
One answer to a payment link custom field, with the field as it was when checkout started. `custom_field_type` determines the type of `value`.
custom_field_typeenumRequiredThe kind of field answered, which determines the type of `value`.
text
keystringRequiredThe field's `key` when checkout started.
labelstringRequiredThe question the buyer saw: the field's `label` when checkout started.
payment_link_custom_field_idstringRequiredID of the payment link custom field the buyer answered. The link may have changed or removed the field since.
valueany ofRequiredThe buyer's answer: a string for `text`, `textarea`, and `dropdown`; a boolean for `checkbox`.
custom_textobjectThe custom text this session shows in checkout.
order_summary_messagestringMessage shown near the order summary in checkout.
shipping_address_labelstringLabel shown for the shipping address in checkout.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRFC3339 timestamp.
customer_idstringRequiredUnique identifier for this customer, prefixed `cus_`.
emailstring or nullRequiredCustomer email. `null` when the customer has none. Unique among the environment's customers.
namestring or nullRequiredCustomer name. `null` when none is set.
phonestring or nullRequiredCustomer phone number. `null` when none is set.
statusenumRequiredWhere the customer is in the deletion lifecycle.
activedeletion_processingdeleted
updated_atstringRFC3339 timestamp.
customer_account_urlstringThe store's customer account, where the buyer can see this purchase and manage a subscription it starts. A stable link that opens the account wherever the merchant's `customer_account` settings put it; the buyer signs in there if needed. Pass it as Apple Pay's `managementURL` for a subscription. Omitted from webhooks, and when the account can't be resolved.
customer_idstringThe customer of the session's order. Omitted when the order has none. A checkout credential issued for this session acts for this customer. Add expand=customer to include the customer.
customer_prefillobjectContact and default addresses of the customer the checkout acts for, with the recipient name on its default shipping address: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. Present on GET and PATCH responses while the session is open and acts for a customer. Separate from merchant-supplied prefill and buyer_contact saved by the buyer. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
billing_addressobjectThe customer's default billing address. Omitted when the customer has none.
emailstringRequiredThe customer's email.
shipping_addressobjectThe customer's default shipping address. Omitted when the customer has none.
shipping_recipient_namestringRecipient name of the customer's default shipping address. Present whenever `shipping_address` is.
deliveryobjectCurrent delivery choices for Flint-owned pricing. External pricing reports requires_explicit_quote; reading this field does not request a delivery quote. Omitted when the session is not open, has no order, or Flint cannot read its delivery.
buyer_reasonsarray of stringRequiredBuyer-safe reasons a choice group has no available option. Groups with an available option contribute no reasons.
choice_groupsarray of objectRequiredGroups of order items that each choose their own delivery option. Empty until the checkout has a delivery quote.
delivery_quote_idstringID of the checkout's current delivery quote. Omitted until the checkout has one.
delivery_selection_idstring or nullRequiredCurrent delivery selection ID after reconciliation. `null` when no selection is current. Assert this value with expected_delivery_selection_id on checkout delivery writes.
evaluation_statusenumRequiredHow completely Flint evaluated the candidate delivery methods.
completeincompletedegradedrequires_explicit_quote
expires_atstringRFC3339 timestamp.
input_requirementsarray of objectRequiredInputs the checkout's delivery methods need. Once the checkout has a delivery quote, these are the quote's input_requirements. Before that, they come from the methods alone and name no choice group: the fields in each method's quote_input_fields, and each recipient field a method requires.
inventory_unavailablebooleanTrue when a required delivery group has no option and a candidate lacks the requested stock.
merchant_diagnosticsarray of objectAlways present with an API key or dashboard credential.
Not returned with a checkout credential
delivery_method_idsarray of stringRequiredImmutable delivery method assignment captured when the checkout was created.
delivery_selection_requiredbooleanRequiredWhether the order has at least one remaining quote-resolved fulfillment choice that must be selected before payment.
expires_atstringRFC3339 timestamp.
expires_in_secondsintegerThe lifetime the session got. expires_at is its deadline. Omitted for invoice sessions, which take their deadline from the invoice.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential, a customer session, or an invoice access token
gift_card_challengeobjectWhere the buyer completes a gift card challenge for this checkout. Returned on single-session reads, session create and update responses, checkout launch results, and customer verification confirmation results while the session is open and can show the challenge. Omitted from lists, webhooks, expanded resources, and delivery selection results.
urlstringRequiredLoad this URL in an iframe on page_origin when applying a gift card returns GIFT_CARD_CHALLENGE_REQUIRED. On a hosted session, Flint's checkout loads it for you, so you don't need to do anything. The page posts a single-use proof to your page; send it in Flint-Gift-Card-Challenge. Treat the URL as opaque. It stays the same for the session and stops working when the session ends.
inventory_reservation_idsarray of stringImmutable cart hold IDs authorized by the merchant at session creation. Omitted when empty and from checkout-credential responses. Buyer and merchant delivery requests that omit IDs use eligible bound holds; explicit merchant IDs replace the binding for that request. First adopter wins when sessions share a hold. Invalidated or otherwise ended sessions cannot adopt stock, and replacements never inherit the binding. Unused cart units retain their own release and expiration lifecycle.
Not returned with a checkout credential, a customer session, or an invoice access token
invoiceobject or nullPresent only when `expand` includes `invoice`; `null` when expanded and there is no related invoice.
Not returned with a checkout credential, a customer session, or an invoice access token
collection_block_statusenumWhether collection is blocked. While it is inventory_blocked, collection attempts return 409 ACTION_NOT_ALLOWED with details[0].reason inventory_wait.
noneinventory_blockedresolved
created_atstringWhen the invoice was created.
customer_idstringCustomer billed by the invoice. Absent when the invoice has no customer.
due_datestringCalendar due date in YYYY-MM-DD format, interpreted in timezone (UTC when absent). The outstanding balance becomes overdue only after this date ends. Automatic collection runs at the later of issue and the start of this date. With payment terms, issue computes this date from issued_at. Absent when there is no due date.
invoice_idstringRequiredFlint invoice ID.
invoice_numberstringSequential document number assigned when the invoice is issued. Absent on a draft.
is_overduebooleanRequiredWhether the invoice is open or partially_paid and past due with a balance remaining, as is_overdue on the full Invoice reports it.
order_idstringThe order the invoice bills.
pricing_amountsobjectRequiredThe invoice pricing totals, frozen at issue; a draft previews the backing order.
refund_statusenumHow much of the collected money has been refunded. It doesn't change status.
nonepartially_refundedrefunded
settlement_amountsobjectRequiredThe same settlement amounts as the full Invoice.
statusenumRequiredCurrent invoice status. paid and credited close the current balance and can reopen to open or partially_paid after a payment or credit allocation reversal; invoice.reopened reports that change. An uncollectible invoice accepts manual recovery payments and becomes paid when fully recovered; reversals restore the write-off. voided is final. Refunds change refund_status without reopening the balance. An ACH bank return reverses paid_money and reopens the balance. A lost card chargeback leaves paid_money, the balance, and status unchanged; collecting it again requires a new invoice.
draftopenpartially_paidpaidvoideduncollectiblecredited
supported_actionsarray of enumRequiredLifecycle actions Flint accepts for this resource now, based on stored state. Independent of the caller's permissions; each action still requires its route's scope. Always [] when no action is available.
collectissuemark_uncollectiblevoid
updated_atstringWhen the invoice last changed.
invoice_idstringID of the invoice a session of type `invoice` collects payment for. Absent for other types.
is_in_recoverybooleanRequiredWhether the checkout is in its payment recovery window after its deadline. The checkout credential can recover only an attempt it started. Merchant reads can also report a merchant-started attempt.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
contract_urlstringAn `https://` URL of the contract the buyer agrees to, linked in checkout.
refund_policy_urlstringAn `https://` URL of your refund policy, linked in checkout.
require_terms_of_servicebooleanWhether the buyer must accept the terms of service before paying.
shipping_policy_urlstringAn `https://` URL of your shipping policy, linked in checkout.
terms_of_service_urlstringAn `https://` URL of your terms of service, linked in checkout.
merchant_iconobjectThe merchant's square icon, shown in browser tabs and compact headers. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
altstringAlternative text describing the image for accessibility.
heightintegerRequiredImage height in pixels, when known.
urlstringRequiredURL of the image.
widthintegerRequiredImage width in pixels, when known.
merchant_idstringRequiredID of the merchant this resource belongs to.
merchant_logoobjectThe merchant's logo. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
altstringAlternative text describing the image for accessibility.
heightintegerRequiredImage height in pixels, when known.
urlstringRequiredURL of the image.
widthintegerRequiredImage width in pixels, when known.
merchant_namestringThe merchant's business name, which hosted checkout shows when `theme.title` is unset. Reads `Merchant` when the merchant has not set a business name. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
merchant_supportobjectHow the buyer can reach the merchant for help: the support email, phone, and URL the merchant set. Present on GET and PATCH responses when the merchant set at least one of them. Show it where your checkout tells the buyer to contact the merchant, such as an expired or closed checkout, or your receipt. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
emailstringSupport email address.
phonestringSupport phone number.
urlstringSupport page, as an absolute http or https URL.
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential, a customer session, or an invoice access token
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
Not returned with a checkout credential, a customer session, or an invoice access token
buyer_contactobjectBuyer contact recorded on the order, including guest contact when retained. Omitted when the order has no recorded contact.
Not returned with a checkout credential or a customer session
closed_atstringWhen the order last closed. Present exactly when status is closed.
closed_reasonenumWhy the order closed. Present exactly when status is closed. Flint returns other for an unrecognized reason and may add new values.
invoice_voidedpaidclosed_by_merchantcheckout_expiredwritten_offsupersededreturn_resolution_canceledother
created_atstringWhen the order was created, in RFC3339 format.
customer_idstringCustomer associated with the order, when one is set.
deferred_promotionsarray of objectRequiredPromotions accepted at subscription signup. They attach when the subscription is provisioned and first discount its first charged cycle. They do not discount this order and are separate from discounts and order totals. Always present; empty when no promotions are deferred.
fulfillment_statusenumAggregate progress across the order's fulfillment quantities.
not_fulfilledpartially_fulfilledfulfilledcancelednot_applicableclosed
governing_delivery_selection_idstring or nullRequiredID of the delivery selection that governs this order. Null when no selection governs the order.
order_idstringRequiredStable identifier of the expanded order.
order_numberstringHuman-readable order number for receipts and merchant reference.
paid_atstring or nullRequiredWhen the current paid state began, including a final capture that releases the remaining balance. A reversal that reopens the order clears this timestamp. `null` when `payment_status` isn't `paid`, including an order whose balance was written off without being paid.
payment_intent_idsarray of stringPayment intents associated with the order.
payment_statusenumRequiredCollection progress. Reversing a recorded invoice payment can move this back to unpaid or partially_paid. An invoice write-off also completes collection without receiving the written-off amount.
unpaidpartially_paidpaid
pricing_amountsobjectRequiredOrder totals before accounting for collected payments and refunds.
refund_statusenumRequiredRefund progress for collected money. Refunds with `reason` `payment_returned` return money the order never received and don't count.
nonepartially_refundedrefunded
settlement_amountsobjectRequiredPayments, refunds, credits, and amounts still owed for the order.
statusenumRequiredWhether the order still accepts changes and new payments. An order closed as paid reopens if reversing a recorded invoice payment leaves an outstanding order balance. Refunds, fulfillment, disputes, returns, and metadata or note edits continue on a closed order.
openclosed
supported_actionsarray of enumLifecycle actions Flint accepts on the order now, independent of permissions. Always present with merchant credentials.
Not returned with a checkout credential or a customer session
closepayresolve_inventory_exception
updated_atstringWhen the order was last updated, in RFC3339 format.
order_idstringID of the order the session collects payment for, fixed at creation. Absent when the session has no order.
page_originstringOrigin of the page that renders this headless checkout. Omitted when not set.
pay_to_new_address_requires_verificationbooleanWhether at least one saved card this checkout lists would be refused for the current delivery destination because the paying credential last confirmed a code more than 15 minutes ago. Request a code with purpose pay_to_new_address, without email or channel, and confirm it with this credential before paying. A Flint wallet card can still pay to an address in that wallet while this is true for a store saved card. Pickup and orders that ship nothing never require this verification. Returned only to the checkout credential. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_collectionobjectGuidance for collecting a payment source. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
stripeobjectClient configuration for collecting the payment through Stripe.
payment_intent_idsarray of stringIDs of the payment intents for the session's order. Absent when the order has none.
payment_intentsarray of objectPresent only when `expand` includes `payment_intents`: summaries of the payment intents in `payment_intent_ids`.
Not returned with a checkout credential, a customer session, or an invoice access token
amount_moneyobjectRequiredThe amount requested from the buyer, including any tip_money. Capturing doesn't change it: after a partial capture it still shows the requested amount, and captured_money shows what was collected. On a standalone payment intent, PATCH can change it only before the first confirmation attempt. An amount_money or tip_money change that leaves too little for stored splits returns LIMIT_EXCEEDED at the changed field with minimum_money.
capture_methodenumWhen money is collected. Defaults to automatic.
automaticmanual
created_atstringRFC3339 timestamp.
customer_idstringCustomer linked to this payment intent.
dispute_statusenumRequiredDispute state of this payment. none means no dispute or inquiry is open or recorded. The inquiry_ values track an issuer inquiry or early warning that isn't a chargeback. Read the dispute with GET /v1/disputes for its deadline and evidence.
noneinquiry_needs_responseinquiry_under_reviewinquiry_closedneeds_responseunder_reviewwonlostpreventedother
order_idstringOrder this payment intent belongs to. Create it through the order and confirm it with POST /v1/orders/{order_id}/pay. Capture and cancel use POST /v1/payment-intents/{payment_intent_id}/capture or /cancel for every payment intent. Order-owned intents accept PATCH for metadata and external_reference_id.
payment_intent_idstringRequiredFlint payment intent ID.
payment_sourceobjectSummary of the card or bank account used for the payment. Absent until a payment source is attached.
refund_statusenumHow much of captured_money has been refunded, including value issued as store credit, based on refunded_money.
nonepartially_refundedrefunded
statusenumRequiredLifecycle status. requires_payment_method covers both a new payment intent and one whose last attempt failed, so read last_payment_error with it. succeeded, canceled, and expired are final. Refunds and disputes never change status.
requires_payment_methodrequires_confirmationrequires_actionprocessingrequires_capturecanceledsucceededexpired
supported_actionsarray of enumVerbs this payment intent accepts now, each a POST to /v1/payment-intents/{payment_intent_id}/{action}. The list includes stored order facts and can change without a payment intent version change. Order legs list confirm when a single leg can pay the order or an open attempt can continue it. Several unpaid legs, selected gift cards, or automatic tax with a leg below the balance require pay_order instead. Invoice payments list only cancel. An unused first-period subscription payment lists cancel once the subscription is canceled. Order edit payments list confirm while awaiting payment details or action. A listed action can still be refused due to an open risk review, an order payment attempt, a closed order, or the merchant account. A managed_by_owner refusal names the owner and its command in remediation.next_actions. The merchant list is credential-independent. Checkout credentials receive that list filtered to confirm and cancel on their own session's intents, never capture. Customer sessions omit this field. New actions may be added. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
confirmcapturecancel
updated_atstringRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
payment_linkobject or nullPresent only when `expand` includes `payment_link`; `null` when expanded and there is no related payment link.
Not returned with a checkout credential, a customer session, or an invoice access token
completed_countintegerRequiredNumber of paid checkout sessions started from this link.
created_atstringRFC3339 timestamp.
descriptionstringText about what the link sells, returned to buyers when they open it.
namestringRequiredName of the payment link.
payment_link_idstringRequiredUnique identifier for this payment link, prefixed `pl_`.
payment_link_typeenumWhat kind of link this is.
standarddonationevent
statusenumRequiredWhether the link can start new checkouts.
activeinactive
subscription_plan_idstringID of the subscription plan the link sells. Absent for a link that doesn't sell a subscription.
updated_atstringRFC3339 timestamp.
urlstringURL buyers open to use the link.
payment_link_idstringID of the payment link the session was started from. Absent when it was not started from a payment link.
payment_link_imageobjectThe current image of the payment link that opened this session. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when that link has an image; other responses and webhooks omit it.
altstringAlternative text describing the image for accessibility.
heightintegerRequiredImage height in pixels, when known.
urlstringRequiredURL of the image.
widthintegerRequiredImage width in pixels, when known.
payment_method_saveobjectThe card the buyer saved pending with this checkout's payment, and whether they confirmed it. Present on GET and PATCH responses after a payment that paid the order in full, or that was approved for the merchant to capture later, and saved a card this way. Without a number, confirmation requires an emailed code. A checkout whose payment is approved stays open until the capture. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
email_confirmation_requiredbooleanRequiredTrue from the moment status is pending when an emailed code is what finishes the save: the buyer gave no number, or the number alone can't save the card. An emailed code alone saves the card by email. If the buyer already confirmed the number by text, the emailed code saves the card with that number.
expires_atstring or nullWhen a pending save stops waiting: 24 hours after the payment succeeded or was approved. `null` when the save is no longer pending.
phone_last_digitsstringLast two digits of the number the buyer gave, which a code is texted to. Set while status is pending and the buyer gave a number.
saved_withenumHow the buyer confirmed the card: with a code texted to their phone or emailed to them.
smsemail
statusenumRequiredWhether the card is saved. Until `saved`, the card can't be used.
pendingsavedexpired
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectConfigured payment options for merchant credentials; currently available payment options for the checkout credential.
enabled_payment_optionsarray of enumPayment options for this session. The list replaces settings.checkout.enabled_payment_options; omit it to use that setting.
cardapple_paygoogle_payaffirmach_debit
payment_notestringA note shown to the buyer with the payment options.
platform_feeobjectThe platform fee the partner app requested when it created the session with an install token. Each payment intent the session creates carries its own platform_fee, lowered to fit that payment. Absent when the session has none.
Not returned with a checkout credential, a customer session, or an invoice access token
amount_moneyobjectRequiredThe fee the partner app requested.
partner_app_idstringRequiredThe partner app that requested the fee.
platform_fee_ruleobjectThe platform fee rule that the session was created with.
Not returned with a checkout credential
fixed_fee_moneyobjectThe fixed amount per payment.
maximum_fee_moneyobjectThe maximum fee per payment, at least the fixed amount.
partner_app_idstringRequiredThe partner app whose install set the rule.
percentnumberRequiredPercent of the amount collected. Zero requires fixed_fee_money.
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
billing_addressobjectThe billing address to fill in.
emailstringThe buyer's email address to fill in.
phonestringThe buyer's phone number to fill in.
shipping_addressobjectThe shipping address to fill in.
shipping_recipient_namestringThe name of the person receiving the delivery, to fill in with the shipping address.
problemsarray of objectRequiredNamed conditions that affect checkout completion. Follow each problem's remediation action instead of reconstructing delivery lifecycle rules in the client. payment_in_progress means another payment for the order must finish before this checkout can complete. When Flint cannot read the checkout's delivery, the read still succeeds and reports delivery_unreadable; its remediation says whether reading the session again can succeed, and its next action's reason_code names the error.
blocks_completionbooleanRequiredWhether the checkout cannot complete until the problem is resolved.
codeenumRequiredWhich condition affects the checkout.
delivery_selection_staledelivery_selection_invaliddelivery_unreadablepayment_in_progressprocessor_payments_paused
remediationobjectWhat the caller can do about the problem, and whether retrying the same request can help.
severityenumRequiredHow serious the problem is.
error
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
automatic_enabledbooleanWhether automatic promotions apply to this checkout. Send false to stop them here. True can't turn them back on when your promotion settings have them off.
codes_enabledboolean or nullObject-level override for whether this checkout's buyer can apply promotion codes, hosted or headless. Omit to inherit the payment link and checkout.promotion_codes_enabled. When all are unset, hosted checkout offers code entry only while an active code promotion exists in this environment; read can_apply_promotion_code on the session. True allows codes when the merchant's promotion settings allow them; false blocks them for this checkout. `null` when this checkout inherits checkout.promotion_codes_enabled.
recovery_expires_atstring or nullWhen the restricted payment-attempt recovery window ends. `null` when the session has no recovery window.
recovery_payment_attempt_idstringThe payment attempt in the recovery window. Only merchant reads report a merchant-started attempt.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
refundsarray of objectAll buyer-visible refunds on this session’s order, including refunds made by the store. Uses the same buyer projection as /v1/me/refunds. Included on GET single-session reads as an array, with [] when there are none, and omitted from other responses and webhooks. A failed refund with failure_reason refund_abandoned could not be completed: tell the buyer to contact the store to get their money back.
amount_moneyobjectRequiredTotal refunded across all tenders, including `refunded_tip_money`.
created_atstringRequiredRFC3339 timestamp.
credit_adjustment_moneyobjectRequiredMoney paid for Return resolution credits, included in amount_money. It carries no merchandise, shipping, tax, or tip allocation. Zero for refunds without credits.
credit_note_idstringID of the credit note this refund paid out. Present only on refunds issued through a credit note.
customerobject or nullThe customer summary for `customer_id`. Buyer refund endpoints take no `expand` parameter, so it is never expanded here. `null` when the refund is not expanded.
customer_idstringID of the customer on the refunded order or payment. Absent when neither has one.
failure_reasonenumA coarse buyer-visible failure category. refund_abandoned means the refund could not be completed; contact the store to get your money back. refund_failed means the refund failed. Omitted when there is no failure.
refund_failedrefund_abandoned
invoice_idstringID of the invoice whose credit note this refund paid out. Present only on refunds issued through a credit note.
line_item_allocationsarray of objectHow the refund applied to each order line item it covered, with quantity, tax, and adjustments.
orderobject or nullThe order summary for `order_id`. Buyer refund endpoints take no `expand` parameter, so it is never expanded here. `null` when the refund is not expanded.
order_edit_idstringID of the paid-order edit that created this refund. Present only on refunds issued through an order edit.
order_idstringID of the order the refund was issued against. For a refund with `reason` `payment_returned`, the order the returned payment was for; the order never received this money. Absent for a refund of a payment that has no order, and for a standalone gift card refund.
payment_intentobject or nullThe payment summary for `payment_intent_id`. Buyer refund endpoints take no `expand` parameter, so it is never expanded here. `null` when the refund is not expanded.
payment_intent_idstringID of the payment the refund was issued against, when it targeted one payment. `payment_refunds` lists every payment it returned money through.
payment_refundsarray of objectThe part of the refund returned through each payment, with its own status. Absent when the refund was all gift card credit or store credit.
pending_reasonenum or nullRequiredWhy a pending refund is waiting. `null` when `status` isn't `pending`, or when the refund is on its way without review.
manual_reviewnull
processed_byenumRequiredWho moved or is moving the money for this refund. Flint processes refunds through a processor or a gift card; merchant means the merchant returned the money outside Flint and recorded it here. Existing refunds are processed by Flint.
flintmerchant
reasonenum or nullRequired`payment_returned` when Flint refunded a payment it couldn't apply to the order. `null` when the store made the refund, because a store's reasons aren't shared with buyers.
payment_returnednull
reason_messagestringNote explaining the refund, up to 1,024 characters.
refund_idstringRequiredUnique identifier for this refund, prefixed `ref_`.
refund_referencestringThe merchant's opaque check, wire, or other reference for money returned outside Flint, preserved exactly. Present only when processed_by is merchant and a reference was supplied. external_reference_id is the merchant's own refund ID.
refunded_atstringWhen the merchant reports that the money was returned outside Flint. Present only when processed_by is merchant.
refunded_tip_moneyobjectRequiredShare of `amount_money` that refunds tips.
return_idstringID of the return this refund paid out. Present only on refunds issued by a return.
return_resolution_idstringID of the return resolution that issued this refund. Present only on refunds issued by a return.
statusenumRequiredSummary of payment_refunds and tender_allocations. Only failed is final: succeeded and partially_succeeded can still change when a bank rejects a refund after accepting it. A refund Flint made to return a payment it couldn't accept goes from succeeded back to pending, with pending_reason manual_review, when a bank reverses it. Follow refund.created when it is accepted, refund.succeeded, refund.partially_succeeded, or refund.failed when its outcome changes, and refund.updated for other changes.
pendingsucceededpartially_succeededfailed
succeeded_atstringWhen `status` first became `succeeded`. For a refund with `payment_refunds` or `tender_allocations`, it's when the last of them first succeeded, so it equals the latest `succeeded_at` among them. For a refund Flint processes, it's when Flint recorded the outcome; with `processed_by` `merchant`, it equals `refunded_at`. Present only while `status` is `succeeded`; absent for every other status, including `partially_succeeded` and a refund that failed after it succeeded. A refund that succeeds again shows its first success time.
tax_breakdown_refundsarray of objectTax reversed on order-level charges and flat taxes, one entry per tax breakdown. Tax reversed on line items is in `line_item_allocations[].tax_breakdown_refunds`.
tender_allocationsarray of objectEvery tender the refund drew from, payment or gift card, with its amount, tip share, status, and destination.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
save_payment_method_requires_verificationbooleanWhether saving a new card or using saved cards needs the buyer to confirm their email with a code. A new card can be saved pending with the payment and confirmed on the receipt; using saved cards still needs the code before paying. True when can_save_payment_method is true and the checkout acts for no customer for this credential: the merchant created it without one, and either the buyer has not confirmed an email with this credential, or the customer whose email they confirmed has since changed that email or been deleted. A credential other than the one a confirmation returned, such as the hosted checkout link opened on another device, reads true. Send the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications. False while the checkout acts for a customer, and whenever can_save_payment_method is false. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
save_payment_method_typesarray of enumWhat save_payment_method keeps, present when can_save_payment_method is true: card, a card the buyer types into checkout. Show the save option with that payment method only. A pay request that sends save_payment_method: true with Apple Pay, Google Pay, a bank account, or Affirm, through a confirmation token created with setup_future_usage none, still pays, and its payment attempt's payment_method_save reports not_saved. The values can grow. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
card
setup_collectionobjectGuidance for collecting a payment method to save. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
stripeobjectClient configuration for saving a payment method through Stripe on the merchant's connected account.
shop_idstringID of the shop that started checkout.
show_flint_markbooleanWhether Flint's hosted pages show the Powered by Flint mark for this merchant. `false` when the merchant's agreement with Flint removes it. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
statusenumRequiredWhere the session is in its lifecycle. Only an `open` session accepts payment. `terminal_reason` says why a session that is not open ended.
openpaidpartially_paidexpiredclosedinvalidated
subscription_plan_idstringID of the subscription plan a session of type `subscription_plan` signs the buyer up for. Absent for other types.
subscription_termsobjectRenewal terms a subscription checkout commits the buyer to. Frozen when the session's order was created, so later plan changes do not alter them. Absent when the checkout starts no subscription.
billing_intervalenumRequiredUnit of the billing period this checkout currently charges on. It starts as the interval chosen when the checkout session was created, or the plan's default when none was chosen, and changes when the buyer picks another option. Read with `billing_interval_count`.
dailyweeklymonthlyyearly
billing_interval_countintegerRequiredNumber of billing intervals between recurring charges.
billing_interval_optionsarray of objectRequiredBilling intervals the buyer can choose from, frozen from the plan when the session was created.
contract_term_monthsintegerThe term agreed with the buyer, in months, when configured. Flint records it on the subscription and does not stop the buyer from canceling earlier.
deliveries_per_periodintegerRequiredDeliveries paid for by one billing period, from 1 to 24. One when no separate delivery cadence is set. Prices of lines that ship are per delivery.
delivery_intervalenum or nullRequiredDelivery cadence frozen from the plan. Null when no separate delivery cadence is set; one delivery is made per billing period.
dailyweeklymonthlyyearlynull
delivery_interval_countinteger or nullRequiredNumber of delivery intervals between deliveries. Null when no separate delivery cadence is set.
delivery_requiredbooleanRequiredWhether any line in the subscription plan's frozen checkout terms requires delivery. Available before delivery selection. One-time order lines do not affect this value.
early_termination_fee_moneyobjectThe fee agreed for canceling before the recorded term ends, when configured. Flint records it on the subscription but never charges it.
end_afterobjectThe automatic end condition frozen with the order. Omitted for subscriptions with no automatic end.
gift_recipientobject or nullRequiredWho receives the gift. The subscription this checkout starts gets it, and the buyer stays the purchaser. Null when the buyer hasn't named one.
gifts_enabledbooleanRequiredWhether the buyer can name a gift recipient, frozen from the plan's gifts_enabled when the session was created.
line_itemsarray of objectRequiredIdentified frozen plan lines with buyer quantity permissions and bounds.
plan_namestringRequiredPlan name shown to the buyer.
recurring_price_phasesarray of objectRequiredOrdered recurring merchandise prices from the first paid billing period, after any trial, with frozen signup promotions applied. Each finite phase is followed by the next phase; the final phase has a null billing_period_count. The subscription’s end_after condition can end any phase. Tax and shipping are additional. Always contains at least one phase.
recurring_shippingobjectShipping that renews with each charge, for the delivery method the buyer chose. Omitted when no delivery method applies to the plan's lines.
recurring_total_moneyobjectRequiredCharge for one billing period before tax and shipping, including prepaid deliveries and modifiers.
setup_fee_moneyobjectOne-time fee charged with the first payment, when the plan has one.
subscription_plan_idstringRequiredFlint subscription plan ID the terms come from.
trial_period_daysintegerDays before the first recurring charge, when the plan has a trial.
superseding_checkout_session_idstringID of the session that replaced this one. Present when `terminal_reason` is `superseded`.
supported_actionsarray of enumLifecycle actions Flint accepts now, computed from stored checkout state without checking the caller's permissions. Contains close while open; empty after payment, closure, or expiry. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
close
surfaceenumRequiredHow the session is presented to the buyer. A hosted session has a `url` on Flint's checkout page; a headless one is rendered on your own page.
hostedheadless
taxobjectThe session's tax settings. Omitted when the session sets none.
calculationobjectThe calculation the session's order uses, as set when the session was created. Omitted when the session followed `tax.default_calculation` from your settings; read `tax` on the order for what it uses.
enabledbooleanWhether the session collects tax, as set when it was created.
location_fixed_by_merchantobjectThe tax location your order already held when this session was created over it. Hosted checkout shows it and does not ask the buyer for another. Omitted when the buyer may give or change the location.
terminal_reasonenumWhy the session ended. The checkout credential can still read its own closed or expired session; every other call is refused because the session is not open. order_paid_elsewhere applies only to invalidated sessions when payment succeeds or partially succeeds outside the session. order_mutated applies when an edit closes or completes its order, or ends an invoice, return-resolution, or subscription-plan session. Other merchant edits keep hosted and headless sessions open. A session already past expires_at ends with expired before the edit is applied.
payment_succeededpayment_partially_succeededexpiredclosed_by_merchantorder_mutatedsupersededorder_paid_elsewhereinvoice_paid_elsewhereinvoice_voidedinvoice_uncollectibleinvoice_balance_changed
themeobjectThe theme checkout renders with: your branding settings, with the session's `title`, `primary_color`, and `accent_color` over them. A session sets only those three; the other fields come from branding settings. Omitted when neither sets a value.
accent_colorstringAccent color, from the session or link theme, or from branding settings.
background_colorstringPage background color from branding settings, as a six-digit hex value such as `#ffffff`.
corner_radiusintegerCorner radius in pixels from branding settings, from 0 to 32. 0 is a square corner.
font_familyenumFont family from branding settings. New values may be added.
instrument_sanssystem_sanssystem_serifmonospace
primary_colorstringPrimary color, from the session or link theme, or from branding settings.
text_colorstringText color from branding settings, as a six-digit hex value.
titlestringTitle shown in place of the merchant's business name.
tipobjectThe tip options this session offers the buyer.
custom_tip_enabledbooleanWhether buyers can enter a custom tip amount.
default_smart_tip_moneyobjectThe preselected fixed tip, with a positive amount in the same currency as smart_tip_money_options. Its amount and currency must match one of the effective smart_tip_money_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped.
default_tip_percentnumberThe preselected tip percent, from 1 through 100 with at most four decimal places. Must match one of the effective tip_percent_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped, and checkout preselects no tip.
enabledbooleanWhether checkout offers a tip. Omit it to follow the merchant's tipping settings. Subscription signups don't inherit that setting or its preselected tip: they offer a tip only when this is true, and the tip is collected once, with the signup payment. A signup with nothing due today, such as a free trial, offers none. Renewals don't include it.
smart_tip_money_optionsarray of objectThree fixed tips to offer, each with a positive amount. On a checkout session they must use the session's currency. On a payment link they must share one currency, and a checkout opened from the link offers only those in its currency.
smart_tips_enabledbooleanWhether checkout offers fixed tip amounts instead of tip percentages.
tip_percent_optionsarray of numberThree tip percents to offer, each from 1 through 100 with at most four decimal places.
typeenumRequiredWhat the session collects payment for, fixed at creation.
orderquick_paysubscription_planinvoicepayment_linkshop
updated_atstringRequiredRFC3339 timestamp.
urlstringHosted checkout URL that carries a one-time launch credential. Send the buyer here to pay. Present only for hosted sessions read with a merchant credential that can manage checkout sessions. Launch results include it for hosted sessions: create, payment-link resolve, and invoice and return-resolution checkout. Omitted for headless sessions.
Not returned with a checkout credential
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
{
"buyer_fields": {
"require_email": true
},
"can_apply_promotion_code": false,
"checkout_session_id": "cs_01KEZF7C00NH3PCFF00TEWN03B",
"client_reference": null,
"created_at": "2026-03-17T14:30:00Z",
"custom_field_answers": [],
"customer_account_url": "https://links.withflintpay.com/account/v1.eyJtZXJjaGFudF9pZCI6Im1lcl8xMjMifQ.example",
"delivery_method_ids": [],
"delivery_selection_required": false,
"gift_card_challenge": {
"url": "https://checkout.withflintpay.com/gift-card-challenge/opaque-frame-token"
},
"is_in_recovery": false,
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"campaign": "spring_launch"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payments": {
"enabled_payment_options": [
"card",
"apple_pay",
"google_pay"
],
"payment_note": "Thank you for your purchase."
},
"prefill": {},
"problems": [],
"promotion_config": {
"codes_enabled": true
},
"redirects": {
"cancel_url": "https://example.com/canceled",
"success_url": "https://example.com/success"
},
"refunds": [
{
"amount_money": {
"amount": 2500,
"currency": "USD"
},
"created_at": "2026-11-13T12:00:00Z",
"credit_adjustment_money": {
"amount": 0,
"currency": "USD"
},
"failure_reason": "refund_abandoned",
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"pending_reason": null,
"processed_by": "flint",
"reason": "payment_returned",
"refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
"refunded_tip_money": {
"amount": 0,
"currency": "USD"
},
"status": "failed",
"updated_at": "2026-11-13T12:00:00Z",
"version": 1
}
],
"status": "open",
"supported_actions": [
"close"
],
"surface": "hosted",
"theme": {
"primary_color": "#0f766e",
"title": "Spring Gala Checkout"
},
"type": "quick_pay",
"updated_at": "2026-03-17T14:30:00Z",
"url": "https://checkout.withflintpay.com/checkout/cs_01KEZF7C00NH3PCFF00TEWN03B#checkout_token=cklt_v1.example",
"version": 1
}List checkout sessions#
/v1/checkout-sessionsRequires scope checkouts.checkout_sessions.read or checkouts.checkout_sessions.write
Rate limit: read
Returns a paginated list of checkout sessions for the authenticated merchant. Default order: created_at descending, then checkout_session_id descending.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
statusarray of enumFilter by the status each session has when read. A session past expires_at lists as expired even before its stored status is updated, unless payment work keeps it open, in which case it lists as open. A page can hold fewer sessions than page_size. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
openpaidpartially_paidexpiredclosedinvalidated
order_idstringFilter by Flint order ID.
shop_idstringFilter by Flint shop ID.
payment_link_idstringFilter by Flint payment link ID.
customer_idstringFilter by Flint customer ID.
subscription_plan_idstringExact match on the Flint subscription plan ID.
invoice_idstringExact match on the Flint invoice ID.
surfacearray of enumFilter by checkout surface. Sessions created before surfaces existed are hosted. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
hostedheadless
typearray of enumFilter by checkout session type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
orderquick_paysubscription_planinvoicepayment_linkshop
external_reference_idstringExact-match filter on the caller-owned external reference ID.
querystringSearch across checkout session ID, external reference ID, metadata, and payment notes. 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 cs_01.
sort_byenumField to sort by. Defaults to created_at; ties are broken by checkout_session_id.
created_atupdated_at
sort_directionenumSort direction. Defaults to desc.
ascdesc
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
expires_afterstringInclusive lower bound on expires_at.
expires_beforestringExclusive upper bound on expires_at.
expandarray of enumInclude related objects in the response. Supported expansions: customer, invoice, order, payment_link. Include the requested related resources using scoped batch reads for this page. Each relationship requires its existing target read scopes. Expansion changes the representation without changing pagination tokens. Limits: at most 10 unique expand paths per request.
customerinvoiceorderpayment_link
Response · 200
A page of checkout sessions.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
active_payment_attemptobjectThe payment attempt now collecting this checkout's order, the same attempt as the order's active_payment_attempt. Read it to recover after losing a pay response, and resume it only when is_resumable is true. Omitted when no attempt is active. Pending actions that open a URL are left out; the pay response carries them.
buyer_contactobjectContact the buyer entered in checkout before paying, saved with the session's checkout credential. Separate from merchant-supplied prefill and customer_prefill from the customer record. Omitted until the buyer saves or clears a field. When a checkout session payment omits buyer_contact.email or buyer_contact.phone, Flint uses these values. Flint clears the contact 30 days after the session ends, and when a customer linked to the session is deleted.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
can_apply_promotion_codebooleanRequiredWhether to offer promotion-code entry now. True only while the session is open, is not in recovery, and merchant promotion policy allows codes. An explicit promotion_config.codes_enabled wins; null offers entry only when this merchant has an active code promotion whose schedule includes now, in the session's environment. Recomputed on each read. This hint does not change code admission: checkout lifecycle, promotion_config, and merchant policy still apply.
can_save_payment_methodbooleanWhether checkout offers the buyer the option to save the card they type for faster checkout at this merchant. When true, PayOrder accepts save_payment_method: true for one newly collected card. False when the merchant turned checkout.saved_payment_details off, customer accounts are merchant hosted, card is not an available payment option, the checkout collects an invoice, a subscription, or a return, or the checkout acts for no customer and Flint cannot email the buyer a verification code. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
can_save_payment_method_with_phonebooleanWhether the buyer can save the card they type by giving a US or Canadian mobile phone number with the payment, in save_payment_method_phone on POST /v1/orders/{order_id}/pay, and confirming it with a texted code after paying. True while Flint can send texts and either save_payment_method_requires_verification is true, so the number replaces confirming an email before paying, or the checkout acts for the customer whose email the buyer confirmed with this credential, so the number joins that customer's saved details once the buyer confirms it. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
checkout_session_idstringRequiredUnique identifier for this checkout session, prefixed `cs_`.
client_referencestring or nullThe reference the payment link URL or resolve request carried, such as your user ID. `null` when none was sent or checkout did not start from a payment link. Returned only to merchant credentials; omitted for buyer credentials. Set by the buyer's browser, so treat it as a claim, not proof of identity. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
closed_reason_messagestringThe note supplied when the checkout session was closed.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRequiredRFC3339 timestamp.
custom_field_answersarray of one ofThe buyer's answers to the payment link's custom fields, the same as the `custom_field_answers` of the session's order. Read-only. Empty when the session didn't start from a payment link, the buyer answered no custom fields, or the order was created before Flint recorded answers here. Returned only to merchant credentials; omitted for buyer credentials. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
custom_textobjectThe custom text this session shows in checkout.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
Not returned with a checkout credential, a customer session, or an invoice access token
customer_account_urlstringThe store's customer account, where the buyer can see this purchase and manage a subscription it starts. A stable link that opens the account wherever the merchant's `customer_account` settings put it; the buyer signs in there if needed. Pass it as Apple Pay's `managementURL` for a subscription. Omitted from webhooks, and when the account can't be resolved.
customer_idstringThe customer of the session's order. Omitted when the order has none. A checkout credential issued for this session acts for this customer. Add expand=customer to include the customer.
customer_prefillobjectContact and default addresses of the customer the checkout acts for, with the recipient name on its default shipping address: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. Present on GET and PATCH responses while the session is open and acts for a customer. Separate from merchant-supplied prefill and buyer_contact saved by the buyer. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
deliveryobjectCurrent delivery choices for Flint-owned pricing. External pricing reports requires_explicit_quote; reading this field does not request a delivery quote. Omitted when the session is not open, has no order, or Flint cannot read its delivery.
delivery_method_idsarray of stringRequiredImmutable delivery method assignment captured when the checkout was created.
delivery_selection_requiredbooleanRequiredWhether the order has at least one remaining quote-resolved fulfillment choice that must be selected before payment.
expires_atstringRFC3339 timestamp.
expires_in_secondsintegerThe lifetime the session got. expires_at is its deadline. Omitted for invoice sessions, which take their deadline from the invoice.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential, a customer session, or an invoice access token
gift_card_challengeobjectWhere the buyer completes a gift card challenge for this checkout. Returned on single-session reads, session create and update responses, checkout launch results, and customer verification confirmation results while the session is open and can show the challenge. Omitted from lists, webhooks, expanded resources, and delivery selection results.
inventory_reservation_idsarray of stringImmutable cart hold IDs authorized by the merchant at session creation. Omitted when empty and from checkout-credential responses. Buyer and merchant delivery requests that omit IDs use eligible bound holds; explicit merchant IDs replace the binding for that request. First adopter wins when sessions share a hold. Invalidated or otherwise ended sessions cannot adopt stock, and replacements never inherit the binding. Unused cart units retain their own release and expiration lifecycle.
Not returned with a checkout credential, a customer session, or an invoice access token
invoiceobject or nullPresent only when `expand` includes `invoice`; `null` when expanded and there is no related invoice.
Not returned with a checkout credential, a customer session, or an invoice access token
invoice_idstringID of the invoice a session of type `invoice` collects payment for. Absent for other types.
is_in_recoverybooleanRequiredWhether the checkout is in its payment recovery window after its deadline. The checkout credential can recover only an attempt it started. Merchant reads can also report a merchant-started attempt.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
merchant_iconobjectThe merchant's square icon, shown in browser tabs and compact headers. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_idstringRequiredID of the merchant this resource belongs to.
merchant_logoobjectThe merchant's logo. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_namestringThe merchant's business name, which hosted checkout shows when `theme.title` is unset. Reads `Merchant` when the merchant has not set a business name. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
merchant_supportobjectHow the buyer can reach the merchant for help: the support email, phone, and URL the merchant set. Present on GET and PATCH responses when the merchant set at least one of them. Show it where your checkout tells the buyer to contact the merchant, such as an expired or closed checkout, or your receipt. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential, a customer session, or an invoice access token
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
Not returned with a checkout credential, a customer session, or an invoice access token
order_idstringID of the order the session collects payment for, fixed at creation. Absent when the session has no order.
page_originstringOrigin of the page that renders this headless checkout. Omitted when not set.
pay_to_new_address_requires_verificationbooleanWhether at least one saved card this checkout lists would be refused for the current delivery destination because the paying credential last confirmed a code more than 15 minutes ago. Request a code with purpose pay_to_new_address, without email or channel, and confirm it with this credential before paying. A Flint wallet card can still pay to an address in that wallet while this is true for a store saved card. Pickup and orders that ship nothing never require this verification. Returned only to the checkout credential. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_collectionobjectGuidance for collecting a payment source. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_intent_idsarray of stringIDs of the payment intents for the session's order. Absent when the order has none.
payment_intentsarray of objectPresent only when `expand` includes `payment_intents`: summaries of the payment intents in `payment_intent_ids`.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_linkobject or nullPresent only when `expand` includes `payment_link`; `null` when expanded and there is no related payment link.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_link_idstringID of the payment link the session was started from. Absent when it was not started from a payment link.
payment_link_imageobjectThe current image of the payment link that opened this session. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when that link has an image; other responses and webhooks omit it.
payment_method_saveobjectThe card the buyer saved pending with this checkout's payment, and whether they confirmed it. Present on GET and PATCH responses after a payment that paid the order in full, or that was approved for the merchant to capture later, and saved a card this way. Without a number, confirmation requires an emailed code. A checkout whose payment is approved stays open until the capture. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectConfigured payment options for merchant credentials; currently available payment options for the checkout credential.
platform_feeobjectThe platform fee the partner app requested when it created the session with an install token. Each payment intent the session creates carries its own platform_fee, lowered to fit that payment. Absent when the session has none.
Not returned with a checkout credential, a customer session, or an invoice access token
platform_fee_ruleobjectThe platform fee rule that the session was created with.
Not returned with a checkout credential
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
problemsarray of objectRequiredNamed conditions that affect checkout completion. Follow each problem's remediation action instead of reconstructing delivery lifecycle rules in the client. payment_in_progress means another payment for the order must finish before this checkout can complete. When Flint cannot read the checkout's delivery, the read still succeeds and reports delivery_unreadable; its remediation says whether reading the session again can succeed, and its next action's reason_code names the error.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
recovery_expires_atstring or nullWhen the restricted payment-attempt recovery window ends. `null` when the session has no recovery window.
recovery_payment_attempt_idstringThe payment attempt in the recovery window. Only merchant reads report a merchant-started attempt.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
refundsarray of objectAll buyer-visible refunds on this session’s order, including refunds made by the store. Uses the same buyer projection as /v1/me/refunds. Included on GET single-session reads as an array, with [] when there are none, and omitted from other responses and webhooks. A failed refund with failure_reason refund_abandoned could not be completed: tell the buyer to contact the store to get their money back.
save_payment_method_requires_verificationbooleanWhether saving a new card or using saved cards needs the buyer to confirm their email with a code. A new card can be saved pending with the payment and confirmed on the receipt; using saved cards still needs the code before paying. True when can_save_payment_method is true and the checkout acts for no customer for this credential: the merchant created it without one, and either the buyer has not confirmed an email with this credential, or the customer whose email they confirmed has since changed that email or been deleted. A credential other than the one a confirmation returned, such as the hosted checkout link opened on another device, reads true. Send the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications. False while the checkout acts for a customer, and whenever can_save_payment_method is false. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
save_payment_method_typesarray of enumWhat save_payment_method keeps, present when can_save_payment_method is true: card, a card the buyer types into checkout. Show the save option with that payment method only. A pay request that sends save_payment_method: true with Apple Pay, Google Pay, a bank account, or Affirm, through a confirmation token created with setup_future_usage none, still pays, and its payment attempt's payment_method_save reports not_saved. The values can grow. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
card
setup_collectionobjectGuidance for collecting a payment method to save. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
shop_idstringID of the shop that started checkout.
show_flint_markbooleanWhether Flint's hosted pages show the Powered by Flint mark for this merchant. `false` when the merchant's agreement with Flint removes it. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
statusenumRequiredWhere the session is in its lifecycle. Only an `open` session accepts payment. `terminal_reason` says why a session that is not open ended.
openpaidpartially_paidexpiredclosedinvalidated
subscription_plan_idstringID of the subscription plan a session of type `subscription_plan` signs the buyer up for. Absent for other types.
subscription_termsobjectRenewal terms a subscription checkout commits the buyer to. Frozen when the session's order was created, so later plan changes do not alter them. Absent when the checkout starts no subscription.
superseding_checkout_session_idstringID of the session that replaced this one. Present when `terminal_reason` is `superseded`.
supported_actionsarray of enumLifecycle actions Flint accepts now, computed from stored checkout state without checking the caller's permissions. Contains close while open; empty after payment, closure, or expiry. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
close
surfaceenumRequiredHow the session is presented to the buyer. A hosted session has a `url` on Flint's checkout page; a headless one is rendered on your own page.
hostedheadless
taxobjectThe session's tax settings. Omitted when the session sets none.
terminal_reasonenumWhy the session ended. The checkout credential can still read its own closed or expired session; every other call is refused because the session is not open. order_paid_elsewhere applies only to invalidated sessions when payment succeeds or partially succeeds outside the session. order_mutated applies when an edit closes or completes its order, or ends an invoice, return-resolution, or subscription-plan session. Other merchant edits keep hosted and headless sessions open. A session already past expires_at ends with expired before the edit is applied.
payment_succeededpayment_partially_succeededexpiredclosed_by_merchantorder_mutatedsupersededorder_paid_elsewhereinvoice_paid_elsewhereinvoice_voidedinvoice_uncollectibleinvoice_balance_changed
themeobjectThe theme checkout renders with: your branding settings, with the session's `title`, `primary_color`, and `accent_color` over them. A session sets only those three; the other fields come from branding settings. Omitted when neither sets a value.
tipobjectThe tip options this session offers the buyer.
typeenumRequiredWhat the session collects payment for, fixed at creation.
orderquick_paysubscription_planinvoicepayment_linkshop
updated_atstringRequiredRFC3339 timestamp.
urlstringHosted checkout URL that carries a one-time launch credential. Send the buyer here to pay. Present only for hosted sessions read with a merchant credential that can manage checkout sessions. Launch results include it for hosted sessions: create, payment-link resolve, and invoice and return-resolution checkout. Omitted for headless sessions.
Not returned with a checkout credential
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/checkout-sessions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"A page of checkout sessions.
{
"data": [
{
"buyer_fields": {
"require_email": true
},
"can_apply_promotion_code": false,
"checkout_session_id": "cs_01KEZF7C00NH3PCFF00TEWN03B",
"client_reference": null,
"created_at": "2026-03-17T14:30:00Z",
"custom_field_answers": [],
"customer_account_url": "https://links.withflintpay.com/account/v1.eyJtZXJjaGFudF9pZCI6Im1lcl8xMjMifQ.example",
"delivery_method_ids": [],
"delivery_selection_required": false,
"gift_card_challenge": {
"url": "https://checkout.withflintpay.com/gift-card-challenge/opaque-frame-token"
},
"is_in_recovery": false,
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"campaign": "spring_launch"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payments": {
"enabled_payment_options": [
"card",
"apple_pay",
"google_pay"
],
"payment_note": "Thank you for your purchase."
},
"prefill": {},
"problems": [],
"promotion_config": {
"codes_enabled": true
},
"redirects": {
"cancel_url": "https://example.com/canceled",
"success_url": "https://example.com/success"
},
"status": "open",
"supported_actions": [
"close"
],
"surface": "hosted",
"theme": {
"primary_color": "#0f766e",
"title": "Spring Gala Checkout"
},
"type": "quick_pay",
"updated_at": "2026-03-17T14:30:00Z",
"url": "https://checkout.withflintpay.com/checkout/cs_01KEZF7C00NH3PCFF00TEWN03B#checkout_token=cklt_v1.example",
"version": 1
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6K9DDQXWQ9SX35C75Y4FH"
}Create checkout session#
/v1/checkout-sessionsIdempotentRequires scope checkouts.checkout_sessions.write or commerce.invoices.write or commerce.returns.resolutions.write
Rate limit: payment
Creates a hosted or headless checkout session for an order, quick-pay charge, subscription plan signup, a return resolution's buyer balance, or what is due now on an invoice. Subscription signup requires a buyer email before payment. Creation never implicitly replaces an open order session. To replace one, send order_id with replace_checkout_session_id set to the expected current session; the compare-and-swap replacement and collection-lock transfer commit atomically. Scopes depend on type: order, quick_pay and subscription_plan need checkouts.checkout_sessions.write, return_resolution needs commerce.returns.resolutions.write, and invoice needs commerce.invoices.write. A credential without the type's scope gets 403 INSUFFICIENT_SCOPE. A return_resolution or invoice session reuses the open session with the same surface and returns 200; a different surface replaces an idle session and is refused while a payment is in progress. Read the resolution or invoice with its own GET.
Request body
Send exactly one of these
The `order` variant of `CreateCheckoutSessionRequest`.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
address_autocomplete_enabledbooleanWhether checkout offers address suggestions while the buyer enters an address.
require_billing_addressbooleanWhether checkout requires the buyer's billing address.
require_emailbooleanWhether checkout requires the buyer's email address. Subscription plan sessions always require email, so only true is allowed with type: subscription_plan.
require_phonebooleanWhether checkout requires the buyer's phone number.
custom_textobjectCustom text for this session's checkout: an order summary message and a shipping address label.
order_summary_messagestringMessage shown near the order summary in checkout.
shipping_address_labelstringLabel shown for the shipping address in checkout.
delivery_method_idsarray of stringImmutable delivery method assignment for this checkout, 1 to 25 unique IDs. Omit it to use settings.checkout.default_delivery_method_ids when the order has items to deliver; otherwise no methods are assigned. Empty arrays and null are rejected.
expires_in_secondsintegerSeconds the session stays open, from 60 to 86,400. Omit it to use settings.checkout.default_expires_in_seconds, or 24 hours.
external_reference_idstringCaller-owned identifier for this resource in an external system.
inventory_reservation_idsarray of stringMerchant-created cart holds this session may adopt during delivery selection. Only with type: order and a merchant credential. At most 100 unique IDs; exceeding the cap returns INVALID_REQUEST with param inventory_reservation_ids. Immutable after creation. Buyer quotes credit still-eligible bound holds and buyer selections adopt matching units without supplying IDs. Merchant delivery requests that omit IDs also use this binding; explicit IDs, including an empty array, replace it for that request. First adopter wins when sessions share a hold. Unused units remain held until released or expired. Unknown or ineligible IDs at creation return 404. Invalidated or otherwise ended sessions cannot use the binding, and replacement sessions never inherit it.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
contract_urlstringAn `https://` URL of the contract the buyer agrees to, linked in checkout.
refund_policy_urlstringAn `https://` URL of your refund policy, linked in checkout.
require_terms_of_servicebooleanWhether the buyer must accept the terms of service before paying.
shipping_policy_urlstringAn `https://` URL of your shipping policy, linked in checkout.
terms_of_service_urlstringAn `https://` URL of your terms of service, linked in checkout.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
order_idstringRequiredThe order to collect. It must be open and not collected by an invoice or a return resolution.
page_originstringOrigin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectPayment settings for this session: the payment options it offers and a note shown with them. Omit `enabled_payment_options` to use the merchant's `settings.checkout.enabled_payment_options`. Not allowed when `type` is `return_resolution` or `invoice`.
enabled_payment_optionsarray of enumPayment options for this session. The list replaces settings.checkout.enabled_payment_options; omit it to use that setting.
cardapple_paygoogle_payaffirmach_debit
payment_notestringA note shown to the buyer with the payment options.
platform_feeobjectA platform fee your partner app charges on the payment the session collects, checked once against the order total when the session is created. Each payment the session creates carries its own fee, lowered to the cap for its amount. Only a partner app install token can send it; from any other credential it is INVALID_REQUEST with NOT_ALLOWED on platform_fee. A subscription_plan checkout session, or an order whose payment starts or renews a subscription, refuses it with INVALID_REQUEST and NOT_ALLOWED on platform_fee, because Flint's billing creates the renewals. Set platform_fee_rule on the subscription or its checkout session. amount_money.amount must be at least 1 minor unit; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money.amount. Omit platform_fee to charge no fee. The fee must be in the payment's currency, at most the platform fee cap the merchant approved for this amount, and below the amount; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money, with maximum_money when the cap or the amount bounds it. Without an approved cap in this currency it is ACTION_NOT_ALLOWED with reason platform_fee_consent_required. In live mode the partner app's platform_fees capability must be active; otherwise ACTION_NOT_ALLOWED with capability platform_fees and the reason the app's platform status gives. Test mode never checks the capability. Flint lowers the fee, or cancels it, when the cap or Flint's own fees leave less at confirm or capture, so the payment never fails because of it. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
amount_moneyobjectRequiredThe fee, at least 1 minor unit, in the payment's currency. A fixed amount: compute any percentage yourself. Omit platform_fee when creating a payment without a fee.
platform_fee_ruleobjectThe platform fee rule for payments the session creates. Only a partner app install token can set or remove a platform fee rule.
fixed_fee_moneyobjectThe fixed amount per payment.
maximum_fee_moneyobjectThe maximum fee per payment, at least the fixed amount.
percentnumberRequiredPercent of the amount collected. Zero requires fixed_fee_money.
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
billing_addressobjectThe billing address to fill in.
emailstringThe buyer's email address to fill in.
phonestringThe buyer's phone number to fill in.
shipping_addressobjectThe shipping address to fill in.
shipping_recipient_namestringThe name of the person receiving the delivery, to fill in with the shipping address.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
automatic_enabledbooleanWhether automatic promotions apply to this checkout. Send false to stop them here. True can't turn them back on when your promotion settings have them off.
codes_enabledboolean or nullObject-level override for whether this checkout's buyer can apply promotion codes, hosted or headless. Omit to inherit the payment link and checkout.promotion_codes_enabled. When all are unset, hosted checkout offers code entry only while an active code promotion exists in this environment; read can_apply_promotion_code on the session. True allows codes when the merchant's promotion settings allow them; false blocks them for this checkout. `null` when this checkout inherits checkout.promotion_codes_enabled.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
replace_checkout_session_idstringExpected checkout session for an atomic replacement. Allowed only with type: order. The named session must belong to the same merchant, environment, and order. Active payment work fails with `OPERATION_IN_PROGRESS`.
surfaceenumDefaults to hosted when omitted. Use headless for a merchant-owned presentation.
hostedheadless
themeobjectThe title and colors for this session's checkout. Fields you omit come from your branding settings.
accent_colorstringAccent color of the checkout, such as #1A73E8.
primary_colorstringPrimary color of the checkout, such as #1A73E8.
titlestringTitle shown in place of the merchant's business name.
tipobjectTip options for this session. Fields you omit follow your tipping settings.
custom_tip_enabledbooleanWhether buyers can enter a custom tip amount.
default_smart_tip_moneyobjectThe preselected fixed tip, with a positive amount in the same currency as smart_tip_money_options. Its amount and currency must match one of the effective smart_tip_money_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped.
default_tip_percentnumberThe preselected tip percent, from 1 through 100 with at most four decimal places. Must match one of the effective tip_percent_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped, and checkout preselects no tip.
enabledbooleanWhether checkout offers a tip. Omit it to follow the merchant's tipping settings. Subscription signups don't inherit that setting or its preselected tip: they offer a tip only when this is true, and the tip is collected once, with the signup payment. A signup with nothing due today, such as a free trial, offers none. Renewals don't include it.
smart_tip_money_optionsarray of objectThree fixed tips to offer, each with a positive amount. On a checkout session they must use the session's currency. On a payment link they must share one currency, and a checkout opened from the link offers only those in its currency.
smart_tips_enabledbooleanWhether checkout offers fixed tip amounts instead of tip percentages.
tip_percent_optionsarray of numberThree tip percents to offer, each from 1 through 100 with at most four decimal places.
typeenumRequiredWhat the checkout collects payment for. order: an order you created; send order_id. quick_pay: one named amount; send quick_pay_item, and Flint creates the order. subscription_plan: a signup for an active plan; send subscription_plan_id, and Flint creates the order and, once the buyer pays, the subscription. return_resolution: the buyer's balance on a return resolution; send return_resolution_id. invoice: what is due now on an open invoice; send invoice_id. The order, quick_pay and subscription_plan types need checkouts.checkout_sessions.write; return_resolution needs commerce.returns.resolutions.write; invoice needs commerce.invoices.write.
order
The `quick_pay` variant of `CreateCheckoutSessionRequest`.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
address_autocomplete_enabledbooleanWhether checkout offers address suggestions while the buyer enters an address.
require_billing_addressbooleanWhether checkout requires the buyer's billing address.
require_emailbooleanWhether checkout requires the buyer's email address. Subscription plan sessions always require email, so only true is allowed with type: subscription_plan.
require_phonebooleanWhether checkout requires the buyer's phone number.
custom_textobjectCustom text for this session's checkout: an order summary message and a shipping address label.
order_summary_messagestringMessage shown near the order summary in checkout.
shipping_address_labelstringLabel shown for the shipping address in checkout.
customer_idstringExisting customer to link to the order Flint creates. Not allowed with type: order: the session uses the order's customer, so set customer_id on the order first.
delivery_method_idsarray of stringImmutable delivery method assignment for this checkout, 1 to 25 unique IDs. Omit it to use settings.checkout.default_delivery_method_ids when the order has items to deliver; otherwise no methods are assigned. Empty arrays and null are rejected.
discountsarray of objectPromotions to apply to the order Flint creates, using your account promotion settings. Only for quick_pay and subscription_plan. A ranking loss returns a promotion_declined warning; an unredeemable promotion fails the request. Read the result on order.discounts, or order.deferred_promotions for a trial.
promotionone ofRequiredThe promotion selected by ID or code, subject to your account promotion settings.
expires_in_secondsintegerSeconds the session stays open, from 60 to 86,400. Omit it to use settings.checkout.default_expires_in_seconds, or 24 hours.
external_reference_idstringCaller-owned identifier for this resource in an external system.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
contract_urlstringAn `https://` URL of the contract the buyer agrees to, linked in checkout.
refund_policy_urlstringAn `https://` URL of your refund policy, linked in checkout.
require_terms_of_servicebooleanWhether the buyer must accept the terms of service before paying.
shipping_policy_urlstringAn `https://` URL of your shipping policy, linked in checkout.
terms_of_service_urlstringAn `https://` URL of your terms of service, linked in checkout.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
page_originstringOrigin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectPayment settings for this session: the payment options it offers and a note shown with them. Omit `enabled_payment_options` to use the merchant's `settings.checkout.enabled_payment_options`. Not allowed when `type` is `return_resolution` or `invoice`.
enabled_payment_optionsarray of enumPayment options for this session. The list replaces settings.checkout.enabled_payment_options; omit it to use that setting.
cardapple_paygoogle_payaffirmach_debit
payment_notestringA note shown to the buyer with the payment options.
platform_feeobjectA platform fee your partner app charges on the payment the session collects, checked once against the order total when the session is created. Each payment the session creates carries its own fee, lowered to the cap for its amount. Only a partner app install token can send it; from any other credential it is INVALID_REQUEST with NOT_ALLOWED on platform_fee. A subscription_plan checkout session, or an order whose payment starts or renews a subscription, refuses it with INVALID_REQUEST and NOT_ALLOWED on platform_fee, because Flint's billing creates the renewals. Set platform_fee_rule on the subscription or its checkout session. amount_money.amount must be at least 1 minor unit; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money.amount. Omit platform_fee to charge no fee. The fee must be in the payment's currency, at most the platform fee cap the merchant approved for this amount, and below the amount; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money, with maximum_money when the cap or the amount bounds it. Without an approved cap in this currency it is ACTION_NOT_ALLOWED with reason platform_fee_consent_required. In live mode the partner app's platform_fees capability must be active; otherwise ACTION_NOT_ALLOWED with capability platform_fees and the reason the app's platform status gives. Test mode never checks the capability. Flint lowers the fee, or cancels it, when the cap or Flint's own fees leave less at confirm or capture, so the payment never fails because of it. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
amount_moneyobjectRequiredThe fee, at least 1 minor unit, in the payment's currency. A fixed amount: compute any percentage yourself. Omit platform_fee when creating a payment without a fee.
platform_fee_ruleobjectThe platform fee rule for payments the session creates. Only a partner app install token can set or remove a platform fee rule.
fixed_fee_moneyobjectThe fixed amount per payment.
maximum_fee_moneyobjectThe maximum fee per payment, at least the fixed amount.
percentnumberRequiredPercent of the amount collected. Zero requires fixed_fee_money.
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
billing_addressobjectThe billing address to fill in.
emailstringThe buyer's email address to fill in.
phonestringThe buyer's phone number to fill in.
shipping_addressobjectThe shipping address to fill in.
shipping_recipient_namestringThe name of the person receiving the delivery, to fill in with the shipping address.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
automatic_enabledbooleanWhether automatic promotions apply to this checkout. Send false to stop them here. True can't turn them back on when your promotion settings have them off.
codes_enabledboolean or nullObject-level override for whether this checkout's buyer can apply promotion codes, hosted or headless. Omit to inherit the payment link and checkout.promotion_codes_enabled. When all are unset, hosted checkout offers code entry only while an active code promotion exists in this environment; read can_apply_promotion_code on the session. True allows codes when the merchant's promotion settings allow them; false blocks them for this checkout. `null` when this checkout inherits checkout.promotion_codes_enabled.
quick_pay_itemobjectRequiredThe one named amount to collect. Flint creates the order from it. Required when `type` is `quick_pay`.
amount_moneyobjectRequiredPositive price for the quick-pay item.
namestringRequiredName shown for the item. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
taxobjectTax settings for the item.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
surfaceenumDefaults to hosted when omitted. Use headless for a merchant-owned presentation.
hostedheadless
taxobjectAutomatic tax settings for the order Flint creates from quick_pay_item or subscription_plan_id. With order_id, set tax on the order; sending tax returns INVALID_REQUEST with a NOT_ALLOWED detail. Read order.tax for the resulting tax settings and status.
calculationobjectHow the order Flint creates calculates tax while tax is enabled. Omitted when it follows `tax.default_calculation` from your settings, where a `provided` default means automatic. On a payment link update, send null to follow your settings again.
enabledbooleanWhether Flint calculates tax on the order it creates for this checkout. Omit to use tax.default_enabled from your settings.
themeobjectThe title and colors for this session's checkout. Fields you omit come from your branding settings.
accent_colorstringAccent color of the checkout, such as #1A73E8.
primary_colorstringPrimary color of the checkout, such as #1A73E8.
titlestringTitle shown in place of the merchant's business name.
tipobjectTip options for this session. Fields you omit follow your tipping settings.
custom_tip_enabledbooleanWhether buyers can enter a custom tip amount.
default_smart_tip_moneyobjectThe preselected fixed tip, with a positive amount in the same currency as smart_tip_money_options. Its amount and currency must match one of the effective smart_tip_money_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped.
default_tip_percentnumberThe preselected tip percent, from 1 through 100 with at most four decimal places. Must match one of the effective tip_percent_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped, and checkout preselects no tip.
enabledbooleanWhether checkout offers a tip. Omit it to follow the merchant's tipping settings. Subscription signups don't inherit that setting or its preselected tip: they offer a tip only when this is true, and the tip is collected once, with the signup payment. A signup with nothing due today, such as a free trial, offers none. Renewals don't include it.
smart_tip_money_optionsarray of objectThree fixed tips to offer, each with a positive amount. On a checkout session they must use the session's currency. On a payment link they must share one currency, and a checkout opened from the link offers only those in its currency.
smart_tips_enabledbooleanWhether checkout offers fixed tip amounts instead of tip percentages.
tip_percent_optionsarray of numberThree tip percents to offer, each from 1 through 100 with at most four decimal places.
typeenumRequiredWhat the checkout collects payment for. order: an order you created; send order_id. quick_pay: one named amount; send quick_pay_item, and Flint creates the order. subscription_plan: a signup for an active plan; send subscription_plan_id, and Flint creates the order and, once the buyer pays, the subscription. return_resolution: the buyer's balance on a return resolution; send return_resolution_id. invoice: what is due now on an open invoice; send invoice_id. The order, quick_pay and subscription_plan types need checkouts.checkout_sessions.write; return_resolution needs commerce.returns.resolutions.write; invoice needs commerce.invoices.write.
quick_pay
The `subscription_plan` variant of `CreateCheckoutSessionRequest`.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
address_autocomplete_enabledbooleanWhether checkout offers address suggestions while the buyer enters an address.
require_billing_addressbooleanWhether checkout requires the buyer's billing address.
require_emailenumWhether checkout requires the buyer's email address. Subscription plan sessions always require email, so only true is allowed with type: subscription_plan.
true
require_phonebooleanWhether checkout requires the buyer's phone number.
custom_textobjectCustom text for this session's checkout: an order summary message and a shipping address label.
order_summary_messagestringMessage shown near the order summary in checkout.
shipping_address_labelstringLabel shown for the shipping address in checkout.
customer_idstringExisting customer to link to the order Flint creates. Not allowed with type: order: the session uses the order's customer, so set customer_id on the order first.
delivery_method_idsarray of stringImmutable delivery method assignment for this checkout, 1 to 25 unique IDs. Omit it to use settings.checkout.default_delivery_method_ids when the order has items to deliver; otherwise no methods are assigned. Empty arrays and null are rejected.
discountsarray of objectPromotions to apply to the order Flint creates, using your account promotion settings. Only for quick_pay and subscription_plan. A ranking loss returns a promotion_declined warning; an unredeemable promotion fails the request. Read the result on order.discounts, or order.deferred_promotions for a trial.
promotionone ofRequiredThe promotion selected by ID or code, subject to your account promotion settings.
expires_in_secondsintegerSeconds the session stays open, from 60 to 86,400. Omit it to use settings.checkout.default_expires_in_seconds, or 24 hours.
external_reference_idstringCaller-owned identifier for this resource in an external system.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
contract_urlstringAn `https://` URL of the contract the buyer agrees to, linked in checkout.
refund_policy_urlstringAn `https://` URL of your refund policy, linked in checkout.
require_terms_of_servicebooleanWhether the buyer must accept the terms of service before paying.
shipping_policy_urlstringAn `https://` URL of your shipping policy, linked in checkout.
terms_of_service_urlstringAn `https://` URL of your terms of service, linked in checkout.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
page_originstringOrigin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectPayment settings for this session: the payment options it offers and a note shown with them. Omit `enabled_payment_options` to use the merchant's `settings.checkout.enabled_payment_options`. Not allowed when `type` is `return_resolution` or `invoice`.
enabled_payment_optionsarray of enumPayment options for this session. The list replaces settings.checkout.enabled_payment_options; omit it to use that setting.
cardapple_paygoogle_payaffirmach_debit
payment_notestringA note shown to the buyer with the payment options.
platform_feeobjectA platform fee your partner app charges on the payment the session collects, checked once against the order total when the session is created. Each payment the session creates carries its own fee, lowered to the cap for its amount. Only a partner app install token can send it; from any other credential it is INVALID_REQUEST with NOT_ALLOWED on platform_fee. A subscription_plan checkout session, or an order whose payment starts or renews a subscription, refuses it with INVALID_REQUEST and NOT_ALLOWED on platform_fee, because Flint's billing creates the renewals. Set platform_fee_rule on the subscription or its checkout session. amount_money.amount must be at least 1 minor unit; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money.amount. Omit platform_fee to charge no fee. The fee must be in the payment's currency, at most the platform fee cap the merchant approved for this amount, and below the amount; otherwise INVALID_REQUEST with INVALID_VALUE on platform_fee.amount_money, with maximum_money when the cap or the amount bounds it. Without an approved cap in this currency it is ACTION_NOT_ALLOWED with reason platform_fee_consent_required. In live mode the partner app's platform_fees capability must be active; otherwise ACTION_NOT_ALLOWED with capability platform_fees and the reason the app's platform status gives. Test mode never checks the capability. Flint lowers the fee, or cancels it, when the cap or Flint's own fees leave less at confirm or capture, so the payment never fails because of it. Part of the request fingerprint. See [Platform fees](/docs/guides/platform-fees).
amount_moneyobjectRequiredThe fee, at least 1 minor unit, in the payment's currency. A fixed amount: compute any percentage yourself. Omit platform_fee when creating a payment without a fee.
platform_fee_ruleobjectThe platform fee rule for payments the session creates. Only a partner app install token can set or remove a platform fee rule.
fixed_fee_moneyobjectThe fixed amount per payment.
maximum_fee_moneyobjectThe maximum fee per payment, at least the fixed amount.
percentnumberRequiredPercent of the amount collected. Zero requires fixed_fee_money.
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
billing_addressobjectThe billing address to fill in.
emailstringThe buyer's email address to fill in.
phonestringThe buyer's phone number to fill in.
shipping_addressobjectThe shipping address to fill in.
shipping_recipient_namestringThe name of the person receiving the delivery, to fill in with the shipping address.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
automatic_enabledbooleanWhether automatic promotions apply to this checkout. Send false to stop them here. True can't turn them back on when your promotion settings have them off.
codes_enabledboolean or nullObject-level override for whether this checkout's buyer can apply promotion codes, hosted or headless. Omit to inherit the payment link and checkout.promotion_codes_enabled. When all are unset, hosted checkout offers code entry only while an active code promotion exists in this environment; read can_apply_promotion_code on the session. True allows codes when the merchant's promotion settings allow them; false blocks them for this checkout. `null` when this checkout inherits checkout.promotion_codes_enabled.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
subscription_plan_idstringRequiredAn active plan.
subscription_termsobjectThe billing interval, line quantities, and gift recipient for a `subscription_plan` session. Other types refuse it, and `null` is invalid. Omit it to use the plan's default billing interval and line quantities. The billing interval must be one the plan offers in `billing_interval_options`.
billing_intervalenumUnit of the billing period the buyer chose from `subscription_terms.billing_interval_options`. Send it with `billing_interval_count`; omit both to keep the interval the session already has.
dailyweeklymonthlyyearly
billing_interval_countintegerNumber of `billing_interval` units between charges. Send it with `billing_interval`.
gift_recipientobject or nullWho receives the gift, when subscription_terms.gifts_enabled is true. Replaces the whole recipient; send null to clear it. The buyer stays the purchaser.
line_itemsarray of objectPartial quantities for distinct frozen plan lines. Omitted lines keep their quantities. Checkout credentials may set only the adjustable line, within min_quantity and max_quantity (defaults 1 and 9,999). Merchant credentials may set any line to 1 through 9,999.
surfaceenumDefaults to hosted when omitted. Use headless for a merchant-owned presentation.
hostedheadless
taxobjectAutomatic tax settings for the order Flint creates from quick_pay_item or subscription_plan_id. With order_id, set tax on the order; sending tax returns INVALID_REQUEST with a NOT_ALLOWED detail. Read order.tax for the resulting tax settings and status.
calculationobjectHow the order Flint creates calculates tax while tax is enabled. Omitted when it follows `tax.default_calculation` from your settings, where a `provided` default means automatic. On a payment link update, send null to follow your settings again.
enabledbooleanWhether Flint calculates tax on the order it creates for this checkout. Omit to use tax.default_enabled from your settings.
themeobjectThe title and colors for this session's checkout. Fields you omit come from your branding settings.
accent_colorstringAccent color of the checkout, such as #1A73E8.
primary_colorstringPrimary color of the checkout, such as #1A73E8.
titlestringTitle shown in place of the merchant's business name.
tipobjectTip options for this session. Fields you omit follow your tipping settings.
custom_tip_enabledbooleanWhether buyers can enter a custom tip amount.
default_smart_tip_moneyobjectThe preselected fixed tip, with a positive amount in the same currency as smart_tip_money_options. Its amount and currency must match one of the effective smart_tip_money_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped.
default_tip_percentnumberThe preselected tip percent, from 1 through 100 with at most four decimal places. Must match one of the effective tip_percent_options: the ones sent here, or else the ones inherited from tipping settings. An inherited preselection that isn't one of the effective options is dropped, and checkout preselects no tip.
enabledbooleanWhether checkout offers a tip. Omit it to follow the merchant's tipping settings. Subscription signups don't inherit that setting or its preselected tip: they offer a tip only when this is true, and the tip is collected once, with the signup payment. A signup with nothing due today, such as a free trial, offers none. Renewals don't include it.
smart_tip_money_optionsarray of objectThree fixed tips to offer, each with a positive amount. On a checkout session they must use the session's currency. On a payment link they must share one currency, and a checkout opened from the link offers only those in its currency.
smart_tips_enabledbooleanWhether checkout offers fixed tip amounts instead of tip percentages.
tip_percent_optionsarray of numberThree tip percents to offer, each from 1 through 100 with at most four decimal places.
typeenumRequiredWhat the checkout collects payment for. order: an order you created; send order_id. quick_pay: one named amount; send quick_pay_item, and Flint creates the order. subscription_plan: a signup for an active plan; send subscription_plan_id, and Flint creates the order and, once the buyer pays, the subscription. return_resolution: the buyer's balance on a return resolution; send return_resolution_id. invoice: what is due now on an open invoice; send invoice_id. The order, quick_pay and subscription_plan types need checkouts.checkout_sessions.write; return_resolution needs commerce.returns.resolutions.write; invoice needs commerce.invoices.write.
subscription_plan
The `return_resolution` variant of `CreateCheckoutSessionRequest`.
page_originstringOrigin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
return_resolution_idstringRequiredThe return resolution whose buyer balance this checkout collects. Required when type is return_resolution, and not allowed otherwise. The resolution must have a buyer payment pending on its replacement order. An open session with the same surface is reused and returned with 200.
return_urlstringWhere the checkout sends the buyer after paying, such as the invoice's or Return's page in the customer account. Limited to 2048 characters (Unicode code points) before trimming surrounding whitespace. It must be an HTTPS address of the merchant's customer account: /{merchant_id} on Flint's account host, the merchant's active custom account domain, or the host of customer_account.merchant_account_url when the merchant hosts the account. In test mode, any URL on localhost or a loopback IP address (such as 127.0.0.1 or [::1]) is also accepted, over HTTP or HTTPS and on any port. Anything else returns 400 INVALID_REQUEST with an INVALID_VALUE detail on return_url. An alias for redirects.success_url on hosted checkout or payment_return_url on headless checkout; keep them consistent when sending both. Only with type return_resolution or invoice.
surfaceenumDefaults to hosted when omitted. Use headless for a merchant-owned presentation.
hostedheadless
typeenumRequiredWhat the checkout collects payment for. order: an order you created; send order_id. quick_pay: one named amount; send quick_pay_item, and Flint creates the order. subscription_plan: a signup for an active plan; send subscription_plan_id, and Flint creates the order and, once the buyer pays, the subscription. return_resolution: the buyer's balance on a return resolution; send return_resolution_id. invoice: what is due now on an open invoice; send invoice_id. The order, quick_pay and subscription_plan types need checkouts.checkout_sessions.write; return_resolution needs commerce.returns.resolutions.write; invoice needs commerce.invoices.write.
return_resolution
The `invoice` variant of `CreateCheckoutSessionRequest`.
invoice_idstringRequiredThe open invoice whose balance due now this checkout collects. An open session for the invoice's current collection is reused and returned with 200. Required when type is invoice, and not allowed otherwise.
invoice_schedule_entry_idstringOptional. The schedule entry to collect. Only the earliest entry that is due and still has an outstanding balance can be collected; omit it to collect that entry. Not allowed on an invoice without a schedule. Only with type invoice.
page_originstringOrigin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
cancel_urlstringWhere the buyer goes when they leave checkout without paying. The session stays open until it expires. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
expired_urlstringWhere Flint sends a buyer who opens the session after it expires. Without it, the buyer sees Flint's expired-checkout page. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
success_urlstringWhere the buyer goes after paying. Flint adds checkout_session_id and order_id query parameters, replacing any with those names. The redirect doesn't prove payment: confirm with the order.paid webhook or by reading the session. Absolute HTTPS URL; test mode also accepts HTTP loopback URLs. Up to 2,048 characters.
return_urlstringWhere the checkout sends the buyer after paying, such as the invoice's or Return's page in the customer account. Limited to 2048 characters (Unicode code points) before trimming surrounding whitespace. It must be an HTTPS address of the merchant's customer account: /{merchant_id} on Flint's account host, the merchant's active custom account domain, or the host of customer_account.merchant_account_url when the merchant hosts the account. In test mode, any URL on localhost or a loopback IP address (such as 127.0.0.1 or [::1]) is also accepted, over HTTP or HTTPS and on any port. Anything else returns 400 INVALID_REQUEST with an INVALID_VALUE detail on return_url. An alias for redirects.success_url on hosted checkout or payment_return_url on headless checkout; keep them consistent when sending both. Only with type return_resolution or invoice.
surfaceenumDefaults to hosted when omitted. Use headless for a merchant-owned presentation.
hostedheadless
typeenumRequiredWhat the checkout collects payment for. order: an order you created; send order_id. quick_pay: one named amount; send quick_pay_item, and Flint creates the order. subscription_plan: a signup for an active plan; send subscription_plan_id, and Flint creates the order and, once the buyer pays, the subscription. return_resolution: the buyer's balance on a return resolution; send return_resolution_id. invoice: what is due now on an open invoice; send invoice_id. The order, quick_pay and subscription_plan types need checkouts.checkout_sessions.write; return_resolution needs commerce.returns.resolutions.write; invoice needs commerce.invoices.write.
invoice
Response · 201
The created checkout session and surface-appropriate access details.
dataobjectRequiredResource, collection, or operation result returned by this request.
checkout_auth_tokenstringHeadless checkout credential. Send it as Authorization: Bearer <checkout_auth_token>. Omitted when the session is hosted or another credential replays the request.
remembered_buyer_tokenstringOne-time identity token returned only when a successful code confirmation remembered the buyer. Store it on your backend or in an HttpOnly cookie. It never opens saved cards.
active_payment_attemptobjectThe payment attempt now collecting this checkout's order, the same attempt as the order's active_payment_attempt. Read it to recover after losing a pay response, and resume it only when is_resumable is true. Omitted when no attempt is active. Pending actions that open a URL are left out; the pay response carries them.
buyer_contactobjectContact the buyer entered in checkout before paying, saved with the session's checkout credential. Separate from merchant-supplied prefill and customer_prefill from the customer record. Omitted until the buyer saves or clears a field. When a checkout session payment omits buyer_contact.email or buyer_contact.phone, Flint uses these values. Flint clears the contact 30 days after the session ends, and when a customer linked to the session is deleted.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
can_apply_promotion_codebooleanRequiredWhether to offer promotion-code entry now. True only while the session is open, is not in recovery, and merchant promotion policy allows codes. An explicit promotion_config.codes_enabled wins; null offers entry only when this merchant has an active code promotion whose schedule includes now, in the session's environment. Recomputed on each read. This hint does not change code admission: checkout lifecycle, promotion_config, and merchant policy still apply.
can_save_payment_methodbooleanWhether checkout offers the buyer the option to save the card they type for faster checkout at this merchant. When true, PayOrder accepts save_payment_method: true for one newly collected card. False when the merchant turned checkout.saved_payment_details off, customer accounts are merchant hosted, card is not an available payment option, the checkout collects an invoice, a subscription, or a return, or the checkout acts for no customer and Flint cannot email the buyer a verification code. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
can_save_payment_method_with_phonebooleanWhether the buyer can save the card they type by giving a US or Canadian mobile phone number with the payment, in save_payment_method_phone on POST /v1/orders/{order_id}/pay, and confirming it with a texted code after paying. True while Flint can send texts and either save_payment_method_requires_verification is true, so the number replaces confirming an email before paying, or the checkout acts for the customer whose email the buyer confirmed with this credential, so the number joins that customer's saved details once the buyer confirms it. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
checkout_session_idstringRequiredUnique identifier for this checkout session, prefixed `cs_`.
client_referencestring or nullRequiredThe reference the payment link URL or resolve request carried, such as your user ID. `null` when none was sent or checkout did not start from a payment link. Returned only to merchant credentials; omitted for buyer credentials. Set by the buyer's browser, so treat it as a claim, not proof of identity.
Not returned with a checkout credential, a customer session, or an invoice access token
closed_reason_messagestringThe note supplied when the checkout session was closed.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRequiredRFC3339 timestamp.
custom_field_answersarray of one ofRequiredThe buyer's answers to the payment link's custom fields, the same as the `custom_field_answers` of the session's order. Read-only. Empty when the session didn't start from a payment link, the buyer answered no custom fields, or the order was created before Flint recorded answers here. Returned only to merchant credentials; omitted for buyer credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
custom_textobjectThe custom text this session shows in checkout.
customerobject or nullOmitted when launching checkout. Read the session with `expand=customer` to include the customer.
Not returned with a checkout credential, a customer session, or an invoice access token
customer_account_urlstringThe store's customer account, where the buyer can see this purchase and manage a subscription it starts. A stable link that opens the account wherever the merchant's `customer_account` settings put it; the buyer signs in there if needed. Pass it as Apple Pay's `managementURL` for a subscription. Omitted from webhooks, and when the account can't be resolved.
customer_idstringThe customer of the session's order. Omitted when the order has none. A checkout credential issued for this session acts for this customer. Add expand=customer to include the customer.
customer_prefillobjectContact and default addresses of the customer the checkout acts for, with the recipient name on its default shipping address: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. Present on GET and PATCH responses while the session is open and acts for a customer. Separate from merchant-supplied prefill and buyer_contact saved by the buyer. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
deliveryobjectCurrent delivery choices for Flint-owned pricing. External pricing reports requires_explicit_quote; reading this field does not request a delivery quote. Omitted when the session is not open, has no order, or Flint cannot read its delivery.
delivery_method_idsarray of stringRequiredImmutable delivery method assignment captured when the checkout was created.
delivery_selection_requiredbooleanRequiredWhether the order has at least one remaining quote-resolved fulfillment choice that must be selected before payment.
expires_atstringRFC3339 timestamp.
expires_in_secondsintegerThe lifetime the session got. expires_at is its deadline. Omitted for invoice sessions, which take their deadline from the invoice.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential, a customer session, or an invoice access token
gift_card_challengeobjectWhere the buyer completes a gift card challenge for this checkout. Returned on single-session reads, session create and update responses, checkout launch results, and customer verification confirmation results while the session is open and can show the challenge. Omitted from lists, webhooks, expanded resources, and delivery selection results.
inventory_reservation_idsarray of stringImmutable cart hold IDs authorized by the merchant at session creation. Omitted when empty and from checkout-credential responses. Buyer and merchant delivery requests that omit IDs use eligible bound holds; explicit merchant IDs replace the binding for that request. First adopter wins when sessions share a hold. Invalidated or otherwise ended sessions cannot adopt stock, and replacements never inherit the binding. Unused cart units retain their own release and expiration lifecycle.
Not returned with a checkout credential, a customer session, or an invoice access token
invoiceobject or nullOmitted when launching checkout. Read the session with `expand=invoice` to include the invoice.
Not returned with a checkout credential, a customer session, or an invoice access token
invoice_idstringID of the invoice a session of type `invoice` collects payment for. Absent for other types.
is_in_recoverybooleanRequiredWhether the checkout is in its payment recovery window after its deadline. The checkout credential can recover only an attempt it started. Merchant reads can also report a merchant-started attempt.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
merchant_iconobjectThe merchant's square icon, shown in browser tabs and compact headers. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_idstringRequiredID of the merchant this resource belongs to.
merchant_logoobjectThe merchant's logo. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_namestringThe merchant's business name, which hosted checkout shows when `theme.title` is unset. Reads `Merchant` when the merchant has not set a business name. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
merchant_supportobjectHow the buyer can reach the merchant for help: the support email, phone, and URL the merchant set. Present on GET and PATCH responses when the merchant set at least one of them. Show it where your checkout tells the buyer to contact the merchant, such as an expired or closed checkout, or your receipt. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential, a customer session, or an invoice access token
orderobject or nullOmitted when launching checkout. Read the session with `expand=order` to include the order.
Not returned with a checkout credential, a customer session, or an invoice access token
order_idstringID of the order the session collects payment for, fixed at creation. Absent when the session has no order.
page_originstringOrigin of the page that renders this headless checkout. Omitted when not set.
pay_to_new_address_requires_verificationbooleanWhether at least one saved card this checkout lists would be refused for the current delivery destination because the paying credential last confirmed a code more than 15 minutes ago. Request a code with purpose pay_to_new_address, without email or channel, and confirm it with this credential before paying. A Flint wallet card can still pay to an address in that wallet while this is true for a store saved card. Pickup and orders that ship nothing never require this verification. Returned only to the checkout credential. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_collectionobjectGuidance for collecting a payment source. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_intent_idsarray of stringIDs of the payment intents for the session's order. Absent when the order has none.
payment_intentsarray of objectPresent only when `expand` includes `payment_intents`: summaries of the payment intents in `payment_intent_ids`.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_linkobject or nullOmitted when launching checkout. Read the session with `expand=payment_link` to include the payment link.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_link_idstringID of the payment link the session was started from. Absent when it was not started from a payment link.
payment_link_imageobjectThe current image of the payment link that opened this session. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when that link has an image; other responses and webhooks omit it.
payment_method_saveobjectThe card the buyer saved pending with this checkout's payment, and whether they confirmed it. Present on GET and PATCH responses after a payment that paid the order in full, or that was approved for the merchant to capture later, and saved a card this way. Without a number, confirmation requires an emailed code. A checkout whose payment is approved stays open until the capture. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectConfigured payment options for merchant credentials; currently available payment options for the checkout credential.
platform_feeobjectThe platform fee the partner app requested when it created the session with an install token. Each payment intent the session creates carries its own platform_fee, lowered to fit that payment. Absent when the session has none.
Not returned with a checkout credential, a customer session, or an invoice access token
platform_fee_ruleobjectThe platform fee rule that the session was created with.
Not returned with a checkout credential
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
problemsarray of objectRequiredNamed conditions that affect checkout completion. Follow each problem's remediation action instead of reconstructing delivery lifecycle rules in the client. payment_in_progress means another payment for the order must finish before this checkout can complete. When Flint cannot read the checkout's delivery, the read still succeeds and reports delivery_unreadable; its remediation says whether reading the session again can succeed, and its next action's reason_code names the error.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
recovery_expires_atstring or nullWhen the restricted payment-attempt recovery window ends. `null` when the session has no recovery window.
recovery_payment_attempt_idstringThe payment attempt in the recovery window. Only merchant reads report a merchant-started attempt.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
refundsarray of objectAll buyer-visible refunds on this session’s order, including refunds made by the store. Uses the same buyer projection as /v1/me/refunds. Included on GET single-session reads as an array, with [] when there are none, and omitted from other responses and webhooks. A failed refund with failure_reason refund_abandoned could not be completed: tell the buyer to contact the store to get their money back.
save_payment_method_requires_verificationbooleanWhether saving a new card or using saved cards needs the buyer to confirm their email with a code. A new card can be saved pending with the payment and confirmed on the receipt; using saved cards still needs the code before paying. True when can_save_payment_method is true and the checkout acts for no customer for this credential: the merchant created it without one, and either the buyer has not confirmed an email with this credential, or the customer whose email they confirmed has since changed that email or been deleted. A credential other than the one a confirmation returned, such as the hosted checkout link opened on another device, reads true. Send the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications. False while the checkout acts for a customer, and whenever can_save_payment_method is false. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
save_payment_method_typesarray of enumWhat save_payment_method keeps, present when can_save_payment_method is true: card, a card the buyer types into checkout. Show the save option with that payment method only. A pay request that sends save_payment_method: true with Apple Pay, Google Pay, a bank account, or Affirm, through a confirmation token created with setup_future_usage none, still pays, and its payment attempt's payment_method_save reports not_saved. The values can grow. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
card
setup_collectionobjectGuidance for collecting a payment method to save. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
shop_idstringID of the shop that started checkout.
show_flint_markbooleanWhether Flint's hosted pages show the Powered by Flint mark for this merchant. `false` when the merchant's agreement with Flint removes it. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
statusenumRequiredWhere the session is in its lifecycle. Only an `open` session accepts payment. `terminal_reason` says why a session that is not open ended.
openpaidpartially_paidexpiredclosedinvalidated
subscription_plan_idstringID of the subscription plan a session of type `subscription_plan` signs the buyer up for. Absent for other types.
subscription_termsobjectRenewal terms a subscription checkout commits the buyer to. Frozen when the session's order was created, so later plan changes do not alter them. Absent when the checkout starts no subscription.
superseding_checkout_session_idstringID of the session that replaced this one. Present when `terminal_reason` is `superseded`.
supported_actionsarray of enumRequiredLifecycle actions Flint accepts now, computed from stored checkout state without checking the caller's permissions. Contains close while open; empty after payment, closure, or expiry.
Not returned with a checkout credential, a customer session, or an invoice access token
close
surfaceenumRequiredHow the session is presented to the buyer. A hosted session has a `url` on Flint's checkout page; a headless one is rendered on your own page.
hostedheadless
taxobjectThe session's tax settings. Omitted when the session sets none.
terminal_reasonenumWhy the session ended. The checkout credential can still read its own closed or expired session; every other call is refused because the session is not open. order_paid_elsewhere applies only to invalidated sessions when payment succeeds or partially succeeds outside the session. order_mutated applies when an edit closes or completes its order, or ends an invoice, return-resolution, or subscription-plan session. Other merchant edits keep hosted and headless sessions open. A session already past expires_at ends with expired before the edit is applied.
payment_succeededpayment_partially_succeededexpiredclosed_by_merchantorder_mutatedsupersededorder_paid_elsewhereinvoice_paid_elsewhereinvoice_voidedinvoice_uncollectibleinvoice_balance_changed
themeobjectThe theme checkout renders with: your branding settings, with the session's `title`, `primary_color`, and `accent_color` over them. A session sets only those three; the other fields come from branding settings. Omitted when neither sets a value.
tipobjectThe tip options this session offers the buyer.
typeenumRequiredWhat this launch collects. A return balance launch reports `return_resolution`. Later reads and checkout session events report `order` for that session.
orderquick_paysubscription_planinvoicepayment_linkshopreturn_resolution
updated_atstringRequiredRFC3339 timestamp.
urlstringHosted checkout URL with a one-time launch credential. Send the buyer here to pay. Omitted when the session is headless or another credential replays the request.
Not returned with a checkout credential
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
Response · 200
Only for type return_resolution or invoice: the existing open checkout session was returned. Nothing was created.
Same attributes as 201.
curl -X POST https://api.withflintpay.com/v1/checkout-sessions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"buyer_fields": {
"require_email": true
},
"metadata": {
"campaign": "spring_launch"
},
"payments": {
"enabled_payment_options": [
"card",
"apple_pay",
"google_pay"
],
"payment_note": "Thank you for your purchase."
},
"promotion_config": {
"codes_enabled": true
},
"quick_pay_item": {
"amount_money": {
"amount": 2500,
"currency": "USD"
},
"name": "Service Fee"
},
"redirects": {
"cancel_url": "https://example.com/canceled",
"success_url": "https://example.com/success"
},
"theme": {
"primary_color": "#0f766e",
"title": "Spring Gala Checkout"
},
"type": "quick_pay"
}'Get checkout session#
/v1/checkout-sessions/{checkout_session_id}Requires scope checkouts.checkout_sessions.read or checkouts.checkout_sessions.write
Rate limit: read
Returns a single checkout session by ID.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expandarray of enumInclude related objects in the response. Supported expansions: customer, invoice, order, payment_intents, payment_link. Expansion requires checkouts.checkout_sessions.read plus the read scope for each expanded resource. Limits: at most 10 unique expand paths per request. To-many expansions are capped at 20 related objects per path. Checkout session credentials cannot use expand on this route.
customerinvoiceorderpayment_intentspayment_link
Response · 200
The requested checkout session.
dataobjectRequiredResource, collection, or operation result returned by this request.
active_payment_attemptobjectThe payment attempt now collecting this checkout's order, the same attempt as the order's active_payment_attempt. Read it to recover after losing a pay response, and resume it only when is_resumable is true. Omitted when no attempt is active. Pending actions that open a URL are left out; the pay response carries them.
buyer_contactobjectContact the buyer entered in checkout before paying, saved with the session's checkout credential. Separate from merchant-supplied prefill and customer_prefill from the customer record. Omitted until the buyer saves or clears a field. When a checkout session payment omits buyer_contact.email or buyer_contact.phone, Flint uses these values. Flint clears the contact 30 days after the session ends, and when a customer linked to the session is deleted.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
can_apply_promotion_codebooleanRequiredWhether to offer promotion-code entry now. True only while the session is open, is not in recovery, and merchant promotion policy allows codes. An explicit promotion_config.codes_enabled wins; null offers entry only when this merchant has an active code promotion whose schedule includes now, in the session's environment. Recomputed on each read. This hint does not change code admission: checkout lifecycle, promotion_config, and merchant policy still apply.
can_save_payment_methodbooleanWhether checkout offers the buyer the option to save the card they type for faster checkout at this merchant. When true, PayOrder accepts save_payment_method: true for one newly collected card. False when the merchant turned checkout.saved_payment_details off, customer accounts are merchant hosted, card is not an available payment option, the checkout collects an invoice, a subscription, or a return, or the checkout acts for no customer and Flint cannot email the buyer a verification code. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
can_save_payment_method_with_phonebooleanWhether the buyer can save the card they type by giving a US or Canadian mobile phone number with the payment, in save_payment_method_phone on POST /v1/orders/{order_id}/pay, and confirming it with a texted code after paying. True while Flint can send texts and either save_payment_method_requires_verification is true, so the number replaces confirming an email before paying, or the checkout acts for the customer whose email the buyer confirmed with this credential, so the number joins that customer's saved details once the buyer confirms it. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
checkout_session_idstringRequiredUnique identifier for this checkout session, prefixed `cs_`.
client_referencestring or nullThe reference the payment link URL or resolve request carried, such as your user ID. `null` when none was sent or checkout did not start from a payment link. Returned only to merchant credentials; omitted for buyer credentials. Set by the buyer's browser, so treat it as a claim, not proof of identity. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
closed_reason_messagestringThe note supplied when the checkout session was closed.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRequiredRFC3339 timestamp.
custom_field_answersarray of one ofThe buyer's answers to the payment link's custom fields, the same as the `custom_field_answers` of the session's order. Read-only. Empty when the session didn't start from a payment link, the buyer answered no custom fields, or the order was created before Flint recorded answers here. Returned only to merchant credentials; omitted for buyer credentials. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
custom_textobjectThe custom text this session shows in checkout.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
Not returned with a checkout credential, a customer session, or an invoice access token
customer_account_urlstringThe store's customer account, where the buyer can see this purchase and manage a subscription it starts. A stable link that opens the account wherever the merchant's `customer_account` settings put it; the buyer signs in there if needed. Pass it as Apple Pay's `managementURL` for a subscription. Omitted from webhooks, and when the account can't be resolved.
customer_idstringThe customer of the session's order. Omitted when the order has none. A checkout credential issued for this session acts for this customer. Add expand=customer to include the customer.
customer_prefillobjectContact and default addresses of the customer the checkout acts for, with the recipient name on its default shipping address: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. Present on GET and PATCH responses while the session is open and acts for a customer. Separate from merchant-supplied prefill and buyer_contact saved by the buyer. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
deliveryobjectCurrent delivery choices for Flint-owned pricing. External pricing reports requires_explicit_quote; reading this field does not request a delivery quote. Omitted when the session is not open, has no order, or Flint cannot read its delivery.
delivery_method_idsarray of stringRequiredImmutable delivery method assignment captured when the checkout was created.
delivery_selection_requiredbooleanRequiredWhether the order has at least one remaining quote-resolved fulfillment choice that must be selected before payment.
expires_atstringRFC3339 timestamp.
expires_in_secondsintegerThe lifetime the session got. expires_at is its deadline. Omitted for invoice sessions, which take their deadline from the invoice.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential, a customer session, or an invoice access token
gift_card_challengeobjectWhere the buyer completes a gift card challenge for this checkout. Returned on single-session reads, session create and update responses, checkout launch results, and customer verification confirmation results while the session is open and can show the challenge. Omitted from lists, webhooks, expanded resources, and delivery selection results.
inventory_reservation_idsarray of stringImmutable cart hold IDs authorized by the merchant at session creation. Omitted when empty and from checkout-credential responses. Buyer and merchant delivery requests that omit IDs use eligible bound holds; explicit merchant IDs replace the binding for that request. First adopter wins when sessions share a hold. Invalidated or otherwise ended sessions cannot adopt stock, and replacements never inherit the binding. Unused cart units retain their own release and expiration lifecycle.
Not returned with a checkout credential, a customer session, or an invoice access token
invoiceobject or nullPresent only when `expand` includes `invoice`; `null` when expanded and there is no related invoice.
Not returned with a checkout credential, a customer session, or an invoice access token
invoice_idstringID of the invoice a session of type `invoice` collects payment for. Absent for other types.
is_in_recoverybooleanRequiredWhether the checkout is in its payment recovery window after its deadline. The checkout credential can recover only an attempt it started. Merchant reads can also report a merchant-started attempt.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
merchant_iconobjectThe merchant's square icon, shown in browser tabs and compact headers. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_idstringRequiredID of the merchant this resource belongs to.
merchant_logoobjectThe merchant's logo. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_namestringThe merchant's business name, which hosted checkout shows when `theme.title` is unset. Reads `Merchant` when the merchant has not set a business name. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
merchant_supportobjectHow the buyer can reach the merchant for help: the support email, phone, and URL the merchant set. Present on GET and PATCH responses when the merchant set at least one of them. Show it where your checkout tells the buyer to contact the merchant, such as an expired or closed checkout, or your receipt. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential, a customer session, or an invoice access token
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
Not returned with a checkout credential, a customer session, or an invoice access token
order_idstringID of the order the session collects payment for, fixed at creation. Absent when the session has no order.
page_originstringOrigin of the page that renders this headless checkout. Omitted when not set.
pay_to_new_address_requires_verificationbooleanWhether at least one saved card this checkout lists would be refused for the current delivery destination because the paying credential last confirmed a code more than 15 minutes ago. Request a code with purpose pay_to_new_address, without email or channel, and confirm it with this credential before paying. A Flint wallet card can still pay to an address in that wallet while this is true for a store saved card. Pickup and orders that ship nothing never require this verification. Returned only to the checkout credential. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_collectionobjectGuidance for collecting a payment source. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_intent_idsarray of stringIDs of the payment intents for the session's order. Absent when the order has none.
payment_intentsarray of objectPresent only when `expand` includes `payment_intents`: summaries of the payment intents in `payment_intent_ids`.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_linkobject or nullPresent only when `expand` includes `payment_link`; `null` when expanded and there is no related payment link.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_link_idstringID of the payment link the session was started from. Absent when it was not started from a payment link.
payment_link_imageobjectThe current image of the payment link that opened this session. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when that link has an image; other responses and webhooks omit it.
payment_method_saveobjectThe card the buyer saved pending with this checkout's payment, and whether they confirmed it. Present on GET and PATCH responses after a payment that paid the order in full, or that was approved for the merchant to capture later, and saved a card this way. Without a number, confirmation requires an emailed code. A checkout whose payment is approved stays open until the capture. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectConfigured payment options for merchant credentials; currently available payment options for the checkout credential.
platform_feeobjectThe platform fee the partner app requested when it created the session with an install token. Each payment intent the session creates carries its own platform_fee, lowered to fit that payment. Absent when the session has none.
Not returned with a checkout credential, a customer session, or an invoice access token
platform_fee_ruleobjectThe platform fee rule that the session was created with.
Not returned with a checkout credential
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
problemsarray of objectRequiredNamed conditions that affect checkout completion. Follow each problem's remediation action instead of reconstructing delivery lifecycle rules in the client. payment_in_progress means another payment for the order must finish before this checkout can complete. When Flint cannot read the checkout's delivery, the read still succeeds and reports delivery_unreadable; its remediation says whether reading the session again can succeed, and its next action's reason_code names the error.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
recovery_expires_atstring or nullWhen the restricted payment-attempt recovery window ends. `null` when the session has no recovery window.
recovery_payment_attempt_idstringThe payment attempt in the recovery window. Only merchant reads report a merchant-started attempt.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
refundsarray of objectAll buyer-visible refunds on this session’s order, including refunds made by the store. Uses the same buyer projection as /v1/me/refunds. Included on GET single-session reads as an array, with [] when there are none, and omitted from other responses and webhooks. A failed refund with failure_reason refund_abandoned could not be completed: tell the buyer to contact the store to get their money back.
save_payment_method_requires_verificationbooleanWhether saving a new card or using saved cards needs the buyer to confirm their email with a code. A new card can be saved pending with the payment and confirmed on the receipt; using saved cards still needs the code before paying. True when can_save_payment_method is true and the checkout acts for no customer for this credential: the merchant created it without one, and either the buyer has not confirmed an email with this credential, or the customer whose email they confirmed has since changed that email or been deleted. A credential other than the one a confirmation returned, such as the hosted checkout link opened on another device, reads true. Send the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications. False while the checkout acts for a customer, and whenever can_save_payment_method is false. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
save_payment_method_typesarray of enumWhat save_payment_method keeps, present when can_save_payment_method is true: card, a card the buyer types into checkout. Show the save option with that payment method only. A pay request that sends save_payment_method: true with Apple Pay, Google Pay, a bank account, or Affirm, through a confirmation token created with setup_future_usage none, still pays, and its payment attempt's payment_method_save reports not_saved. The values can grow. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
card
setup_collectionobjectGuidance for collecting a payment method to save. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
shop_idstringID of the shop that started checkout.
show_flint_markbooleanWhether Flint's hosted pages show the Powered by Flint mark for this merchant. `false` when the merchant's agreement with Flint removes it. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
statusenumRequiredWhere the session is in its lifecycle. Only an `open` session accepts payment. `terminal_reason` says why a session that is not open ended.
openpaidpartially_paidexpiredclosedinvalidated
subscription_plan_idstringID of the subscription plan a session of type `subscription_plan` signs the buyer up for. Absent for other types.
subscription_termsobjectRenewal terms a subscription checkout commits the buyer to. Frozen when the session's order was created, so later plan changes do not alter them. Absent when the checkout starts no subscription.
superseding_checkout_session_idstringID of the session that replaced this one. Present when `terminal_reason` is `superseded`.
supported_actionsarray of enumLifecycle actions Flint accepts now, computed from stored checkout state without checking the caller's permissions. Contains close while open; empty after payment, closure, or expiry. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
close
surfaceenumRequiredHow the session is presented to the buyer. A hosted session has a `url` on Flint's checkout page; a headless one is rendered on your own page.
hostedheadless
taxobjectThe session's tax settings. Omitted when the session sets none.
terminal_reasonenumWhy the session ended. The checkout credential can still read its own closed or expired session; every other call is refused because the session is not open. order_paid_elsewhere applies only to invalidated sessions when payment succeeds or partially succeeds outside the session. order_mutated applies when an edit closes or completes its order, or ends an invoice, return-resolution, or subscription-plan session. Other merchant edits keep hosted and headless sessions open. A session already past expires_at ends with expired before the edit is applied.
payment_succeededpayment_partially_succeededexpiredclosed_by_merchantorder_mutatedsupersededorder_paid_elsewhereinvoice_paid_elsewhereinvoice_voidedinvoice_uncollectibleinvoice_balance_changed
themeobjectThe theme checkout renders with: your branding settings, with the session's `title`, `primary_color`, and `accent_color` over them. A session sets only those three; the other fields come from branding settings. Omitted when neither sets a value.
tipobjectThe tip options this session offers the buyer.
typeenumRequiredWhat the session collects payment for, fixed at creation.
orderquick_paysubscription_planinvoicepayment_linkshop
updated_atstringRequiredRFC3339 timestamp.
urlstringHosted checkout URL that carries a one-time launch credential. Send the buyer here to pay. Present only for hosted sessions read with a merchant credential that can manage checkout sessions. Launch results include it for hosted sessions: create, payment-link resolve, and invoice and return-resolution checkout. Omitted for headless sessions.
Not returned with a checkout credential
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The requested checkout session.
{
"data": {
"buyer_fields": {
"require_email": true
},
"can_apply_promotion_code": false,
"checkout_session_id": "cs_01KEZF7C00NH3PCFF00TEWN03B",
"client_reference": null,
"created_at": "2026-03-17T14:30:00Z",
"custom_field_answers": [],
"customer_account_url": "https://links.withflintpay.com/account/v1.eyJtZXJjaGFudF9pZCI6Im1lcl8xMjMifQ.example",
"delivery_method_ids": [],
"delivery_selection_required": false,
"gift_card_challenge": {
"url": "https://checkout.withflintpay.com/gift-card-challenge/opaque-frame-token"
},
"is_in_recovery": false,
"merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
"metadata": {
"campaign": "spring_launch"
},
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payments": {
"enabled_payment_options": [
"card",
"apple_pay",
"google_pay"
],
"payment_note": "Thank you for your purchase."
},
"prefill": {},
"problems": [],
"promotion_config": {
"codes_enabled": true
},
"redirects": {
"cancel_url": "https://example.com/canceled",
"success_url": "https://example.com/success"
},
"refunds": [
{
"amount_money": {
"amount": 2500,
"currency": "USD"
},
"created_at": "2026-11-13T12:00:00Z",
"credit_adjustment_money": {
"amount": 0,
"currency": "USD"
},
"failure_reason": "refund_abandoned",
"order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
"payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
"pending_reason": null,
"processed_by": "flint",
"reason": "payment_returned",
"refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
"refunded_tip_money": {
"amount": 0,
"currency": "USD"
},
"status": "failed",
"updated_at": "2026-11-13T12:00:00Z",
"version": 1
}
],
"status": "open",
"supported_actions": [
"close"
],
"surface": "hosted",
"theme": {
"primary_color": "#0f766e",
"title": "Spring Gala Checkout"
},
"type": "quick_pay",
"updated_at": "2026-03-17T14:30:00Z",
"url": "https://checkout.withflintpay.com/checkout/cs_01KEZF7C00NH3PCFF00TEWN03B#checkout_token=cklt_v1.example",
"version": 1
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6K9DDQXWQ9SX35C75Y4FH"
}Update checkout session#
/v1/checkout-sessions/{checkout_session_id}IdempotentRequires scope checkouts.checkout_sessions.write
Rate limit: payment
Updates the mutable fields of a checkout session. A merchant credential can update metadata and external_reference_id, including after the session ends. Send external_reference_id as null to clear it, or metadata as null to clear all metadata. On a session with a subscription_plan_id, either credential can send subscription_terms with the buyer's billing interval and quantity while the session is open and no payment is in progress; a change reprices the signup order and releases the delivery selection. The session's own checkout credential can also send buyer_contact and timezone while the session is open. The buyer_contact field saves the email and phone the buyer entered; send a contact field as null to clear it. The timezone field records the buyer's IANA time zone, which Flint uses for times in the emails it sends the buyer. Saving the same values again changes nothing.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
buyer_contactobjectCheckout session credentials only. Saves the contact the buyer entered while the session is open. A patch object: omitted fields are unchanged, and null clears a field. A merchant credential that sends buyer_contact fails with `INVALID_REQUEST` and a `NOT_ALLOWED` detail on `buyer_contact`.
Not accepted with a bearer token
emailstring or nullEmail for the buyer, such as buyer@example.com. On checkout session updates, null clears the saved email. The local part before @ must be at most 64 octets (UTF-8 bytes).
phonestring or nullPhone for the buyer, in E.164 format, such as +14155551234. On checkout session updates, null clears the saved phone.
expected_versionintegerOptional expected version of this resource. A stale value returns 409 VERSION_CONFLICT with the current version. Retrieve the resource and rebuild the request before retrying.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Omit to leave unchanged; send null to clear.
Not accepted with a checkout credential
metadatamap of string or nullCaller-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 caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
Not accepted with a checkout credential
subscription_termsobjectSubscription plan sessions only. The billing interval and line quantities the buyer chose from the frozen subscription_terms, and the gift recipient when subscription_terms.gifts_enabled is true. Send billing_interval and billing_interval_count together. Accepted from your API key or the checkout credential.
billing_intervalenumUnit of the billing period the buyer chose from `subscription_terms.billing_interval_options`. Send it with `billing_interval_count`; omit both to keep the interval the session already has.
dailyweeklymonthlyyearly
billing_interval_countintegerNumber of `billing_interval` units between charges. Send it with `billing_interval`.
gift_recipientobject or nullWho receives the gift, when subscription_terms.gifts_enabled is true. Replaces the whole recipient; send null to clear it. The buyer stays the purchaser.
line_itemsarray of objectPartial quantities for distinct frozen plan lines. Omitted lines keep their quantities. Checkout credentials may set only the adjustable line, within min_quantity and max_quantity (defaults 1 and 9,999). Merchant credentials may set any line to 1 through 9,999.
timezonestringCheckout credentials only. A valid IANA timezone, such as America/Toronto, used for Flint-sent receipts. Omission keeps the previous observation; null is invalid.
Not accepted with a bearer token
curl -X PATCH https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"buyer_contact": {
"email": "ada@example.com",
"phone": "+14155551234"
}
}'Close checkout session#
/v1/checkout-sessions/{checkout_session_id}/closeIdempotentRequires scope checkouts.checkout_sessions.write
Rate limit: payment
Closes an open checkout session before it naturally expires.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerOptional expected version of this resource. A stale value returns 409 VERSION_CONFLICT with the current version. Retrieve the resource and rebuild the request before retrying.
reason_messagestringYour note explaining why you are closing the checkout session. It is not shown to the buyer.
curl -X POST https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN/close \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"reason_message": "Merchant closed stale session"
}'List checkout verification code requests#
/v1/checkout-sessions/{checkout_session_id}/customer-verificationsRequires a checkout credential
Rate limit: read
Only the session's own checkout credential can read its verification code requests. Only requests whose code hasn't expired are readable until expires_at; an expired, unknown, malformed, deleted, or other session's request returns 404 RESOURCE_NOT_FOUND. Emails are masked on every read. A request reads the same whether or not a code was sent, confirmed, or replaced. Reads send nothing and change no code or attempt counters. Returns requests newest first by created_at descending, then checkout_session_customer_verification_id descending. Default order: created_at descending, then checkout_session_customer_verification_id descending.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
Response · 200
The live code request or page of requests, with masked emails.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
can_use_email_codebooleanWhether an emailed code would open saved details for this buyer in this checkout: cards saved by email at this merchant, or a Flint wallet where the checkout offers one. Offer the emailed code only when true. Set only for channel sms with purpose use_saved_payment_methods.
channelenumRequiredHow the code reached the buyer: email or sms.
emailsms
checkout_session_customer_verification_idstringRequiredID to confirm the code with.
checkout_session_idstringRequiredThe checkout session the code belongs to.
code_routeenumWhose saved number the text used. Present only for channel sms. flint_wallet means the request used the buyer's enrolled Flint wallet number, including when the store has the same number; store means it used a number saved at this business. Describes the request, not a guarantee of access after confirmation. Clients must tolerate unrecognized values.
storeflint_wallet
created_atstringRequiredWhen the code was requested.
emailstringThe address the code is for, lowercased: the email the buyer typed, or for pay_to_new_address and emailed confirm_saved_payment_method codes, the customer's email masked to its first character and domain, such as a•••@example.com. Omitted for a texted confirm_saved_payment_method code. Only the create response carries the email as typed. Reads mask every email this way.
expires_atstringRequiredWhen the code stops working: 15 minutes after the request for an emailed code, and 10 minutes after the text provider first sent a texted code, which a new request within them texts again.
phone_last_digitsstringLast two digits of the number a texted code went to, so the buyer knows which phone to check. Set only for channel sms.
purposeenumRequiredWhy the buyer asked for the code, as sent in the request.
gift_card_purchasesave_payment_methoduse_saved_payment_methodsconfirm_saved_payment_methodpay_to_new_address
supported_actionsarray of enumRequiredLifecycle actions available on this code request. Contains confirm before expires_at; empty once the code expires. A wrong code is refused without revealing whether a code was sent.
confirm
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN/customer-verifications \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_CHECKOUT_AUTH_TOKEN"The live code request or page of requests, with masked emails.
{
"data": [
{
"channel": "email",
"checkout_session_customer_verification_id": "cscv_01K6ZQ4TE3M8Q2N7W5V1R9X0YB",
"checkout_session_id": "cs_01KEZF7C00NH3PCFF00TEWN03B",
"created_at": "2026-03-17T14:30:00Z",
"email": "a•••@example.com",
"expires_at": "2026-03-17T14:45:00Z",
"purpose": "use_saved_payment_methods",
"supported_actions": [
"confirm"
]
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "example",
"request_id": "req_01KWM6RTJCWG082MGAWE2CRJYC"
}Send a checkout verification code#
/v1/checkout-sessions/{checkout_session_id}/customer-verificationsIdempotentRequires a checkout credential
Rate limit: sensitive_write
Sends a six-digit code to prove the buyer controls an email address or mobile phone number, so this checkout can save a card, use saved details, or confirm a saved card. Only the session's own checkout credential can call it. A retry with the same idempotency key returns the same code request without sending another email or text. See the [headless checkout guide](https://developers.withflintpay.com/docs/guides/headless-checkout) for limits, sandbox codes, SMS copy, and what each answer reveals. To link guest purchases, use POST /v1/customer-verifications.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
Send exactly one of these
The buyer confirms their email before funding a gift card purchase. Flint emails a code without saving a payment method.
channelenumHow Flint delivers the code.
email
emailstringRequiredEmail the buyer typed, with no surrounding spaces. Customers are matched by email without regard to case. The local part before @ must be at most 64 octets (UTF-8 bytes).
purposeenumRequiredWhat the buyer is confirming their email or number for.
gift_card_purchase
By email, the default, Flint emails a code to any valid address while the session is open and save_payment_method_requires_verification is true. By auto, accepted only on a checkout whose order starts a subscription, Flint emails a code only when saving the renewal card would require email verification at payment. Otherwise, or past a recognition limit or when no code can be sent, it returns 409 ACTION_NOT_ALLOWED with reason not_offered. Auto reveals whether the email belongs to an existing customer of this merchant, as the payment refusal does. Requests count against the same limits as saved-details recognition; while a code for this purpose still works, a repeat returns it without sending another email. Confirming opens the same access as an explicit email request.
channelenumHow Flint delivers the code.
emailauto
emailstringRequiredEmail the buyer typed, with no surrounding spaces. Customers are matched by email without regard to case. The local part before @ must be at most 64 octets (UTF-8 bytes).
purposeenumRequiredWhat the buyer is confirming their email or number for.
save_payment_method
The buyer asked to use details saved at this merchant. By auto, the default, Flint texts the number saved with the email's details, or emails a code when they have cards saved by email and no number; otherwise it sends nothing and returns 409 ACTION_NOT_ALLOWED with reason not_offered. The response's channel says which. By email, Flint sends a code only when the email has saved details and an active card saved by email or with a number; the response is the same either way. By sms, Flint texts the saved number or returns 409 ACTION_NOT_ALLOWED with reason not_offered and param channel. Auto and sms reveal whether the email has saved details; sms also reveals the number's last two digits. Always offer email alongside sms. A texted code opens only cards saved with that number; an emailed code opens only cards saved by email. Send exactly one of email or remembered_buyer_token. A token request always uses recognition's caps and masks the email, and returns not_offered when nothing is sent. With explicit email, the token has the same send eligibility and email caps as a typed email, forces a resend, and also uses recognition's network caps. With auto it keeps recognition's routing and reuse.
Send exactly one of these
The buyer asked to use details saved at this merchant. By auto, the default, Flint texts the number saved with the email's details, or emails a code when they have cards saved by email and no number; otherwise it sends nothing and returns 409 ACTION_NOT_ALLOWED with reason not_offered. The response's channel says which. By email, Flint sends a code only when the email has saved details and an active card saved by email or with a number; the response is the same either way. By sms, Flint texts the saved number or returns 409 ACTION_NOT_ALLOWED with reason not_offered and param channel. Auto and sms reveal whether the email has saved details; sms also reveals the number's last two digits. Always offer email alongside sms. A texted code opens only cards saved with that number; an emailed code opens only cards saved by email.
channelenumHow Flint delivers the code.
emailsmsauto
emailstringRequiredEmail the buyer typed, with no surrounding spaces. Customers are matched by email without regard to case. The local part before @ must be at most 64 octets (UTF-8 bytes).
purposeenumRequiredWhat the buyer is confirming their email or number for.
use_saved_payment_methods
remembered_buyer_tokenstringUse this remembered identity instead of email, only with purpose use_saved_payment_methods. It never opens saved cards without a right code.
The buyer asked to use details saved at this merchant. By auto, the default, Flint texts the number saved with the email's details, or emails a code when they have cards saved by email and no number; otherwise it sends nothing and returns 409 ACTION_NOT_ALLOWED with reason not_offered. The response's channel says which. By email, Flint sends a code only when the email has saved details and an active card saved by email or with a number; the response is the same either way. By sms, Flint texts the saved number or returns 409 ACTION_NOT_ALLOWED with reason not_offered and param channel. Auto and sms reveal whether the email has saved details; sms also reveals the number's last two digits. Always offer email alongside sms. A texted code opens only cards saved with that number; an emailed code opens only cards saved by email.
channelenumHow Flint delivers the code.
emailsmsauto
emailstringEmail the buyer typed, with no surrounding spaces. Customers are matched by email without regard to case. The local part before @ must be at most 64 octets (UTF-8 bytes).
purposeenumRequiredWhat the buyer is confirming their email or number for.
use_saved_payment_methods
remembered_buyer_tokenstringRequiredUse this remembered identity instead of email, only with purpose use_saved_payment_methods. It never opens saved cards without a right code.
Request a fresh code when pay_to_new_address_requires_verification is true. Send no email, channel, or remembered_buyer_token. The code follows the paying credential's proof, except that a wallet opened by text steps up by email. Returns 409 ACTION_NOT_ALLOWED with reason not_offered when no saved card needs step-up. Confirmation keeps the credential and its proof and refreshes it for 15 minutes.
purposeenumRequiredWhat the buyer is confirming their email or number for.
pay_to_new_address
After a payment that saved a card pending, the buyer confirms it. Without a number, only channel email can finish the save. Channel sms texts the number given with the payment; channel email emails the customer's email only when it matches the payment's email, otherwise returning 409. The response masks the email. Send no email. Available on the paid session, or an open session whose payment is approved for later capture, while payment_method_save.status is pending. A texted code saves the card with the number when the payment created the customer, the buyer confirmed their email in this checkout, or the number already opens their saved details; otherwise payment_method_save.email_confirmation_required becomes true and an emailed code finishes the save. An emailed code alone saves the card by email.
channelenumRequiredHow Flint delivers the code.
emailsms
purposeenumRequiredWhat the buyer is confirming their email or number for.
confirm_saved_payment_method
Response · 200
The code request. A request with channel email reads the same whether or not Flint sent a code.
dataobjectRequiredResource, collection, or operation result returned by this request.
can_use_email_codebooleanWhether an emailed code would open saved details for this buyer in this checkout: cards saved by email at this merchant, or a Flint wallet where the checkout offers one. Offer the emailed code only when true. Set only for channel sms with purpose use_saved_payment_methods.
channelenumRequiredHow the code reached the buyer: email or sms.
emailsms
checkout_session_customer_verification_idstringRequiredID to confirm the code with.
checkout_session_idstringRequiredThe checkout session the code belongs to.
code_routeenumWhose saved number the text used. Present only for channel sms. flint_wallet means the request used the buyer's enrolled Flint wallet number, including when the store has the same number; store means it used a number saved at this business. Describes the request, not a guarantee of access after confirmation. Clients must tolerate unrecognized values.
storeflint_wallet
created_atstringRequiredWhen the code was requested.
emailstringThe address the code is for, lowercased: the email the buyer typed, or for pay_to_new_address and emailed confirm_saved_payment_method codes, the customer's email masked to its first character and domain, such as a•••@example.com. Omitted for a texted confirm_saved_payment_method code. Only the create response carries the email as typed. Reads mask every email this way.
expires_atstringRequiredWhen the code stops working: 15 minutes after the request for an emailed code, and 10 minutes after the text provider first sent a texted code, which a new request within them texts again.
phone_last_digitsstringLast two digits of the number a texted code went to, so the buyer knows which phone to check. Set only for channel sms.
purposeenumRequiredWhy the buyer asked for the code, as sent in the request.
gift_card_purchasesave_payment_methoduse_saved_payment_methodsconfirm_saved_payment_methodpay_to_new_address
supported_actionsarray of enumRequiredLifecycle actions available on this code request. Contains confirm before expires_at; empty once the code expires. A wrong code is refused without revealing whether a code was sent.
confirm
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN/customer-verifications \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_CHECKOUT_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"email": "ada@example.com",
"purpose": "use_saved_payment_methods"
}'Get a checkout verification code request#
/v1/checkout-sessions/{checkout_session_id}/customer-verifications/{checkout_session_customer_verification_id}Requires a checkout credential
Rate limit: read
Only the session's own checkout credential can read its verification code requests. Only requests whose code hasn't expired are readable until expires_at; an expired, unknown, malformed, deleted, or other session's request returns 404 RESOURCE_NOT_FOUND. Emails are masked on every read. A request reads the same whether or not a code was sent, confirmed, or replaced. Reads send nothing and change no code or attempt counters.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
checkout_session_customer_verification_idstringRequiredFlint checkout verification code request ID. Must be a valid ID with prefix cscv_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
The live code request or page of requests, with masked emails.
Same response as Send a checkout verification code.
curl https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN/customer-verifications/cscv_01KEZF7C00XW14W2FCVD5PH3Z9 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_CHECKOUT_AUTH_TOKEN"The live code request or page of requests, with masked emails.
{
"data": {
"channel": "email",
"checkout_session_customer_verification_id": "cscv_01K6ZQ4TE3M8Q2N7W5V1R9X0YB",
"checkout_session_id": "cs_01KEZF7C00NH3PCFF00TEWN03B",
"created_at": "2026-03-17T14:30:00Z",
"email": "a•••@example.com",
"expires_at": "2026-03-17T14:45:00Z",
"purpose": "use_saved_payment_methods",
"supported_actions": [
"confirm"
]
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6RTJCWG082MGAWE2CRJYC"
}Confirm a checkout verification code#
/v1/checkout-sessions/{checkout_session_id}/customer-verifications/{checkout_session_customer_verification_id}/confirmIdempotentRequires a checkout credential
Rate limit: sensitive_write
Checks the code the buyer typed. A right code makes the checkout act for the customer with that email, and creates the customer, with a customer.created event, when none exists. The checkout can then save the buyer's card with save_payment_method on POST /v1/orders/{order_id}/pay, and list and pay with that customer's saved cards. The order's customer does not change until the payment succeeds. Only the checkout_auth_token in the response acts for that customer. Send it as the Bearer credential from then on. Every other credential for the session, including earlier checkout_auth_token values and hosted checkout links, keeps working for the checkout and acts for no customer, so it lists no saved cards and pays with none. A buyer who opens the link on another device confirms an email there to use them, and from then on only that device's new credential acts for a customer. If the response is lost after the code was accepted, the credential you sent still works. Send the same code again with it while the code is valid, which counts as another try and returns a new credential for the same customer, or request a new code. A wrong, expired, or replaced code fails with `INVALID_REQUEST` and an `INVALID_VALUE` detail on `code`, and so does a used code once the checkout was confirmed again, any code after its 5th try, any code for an email past its limit on wrong tries, or a code whose email's customer changed its email or was deleted after the code was sent. If the checkout stops offering saved payment details before the code is confirmed, such as when the merchant turns them off, the request fails with `ACTION_NOT_ALLOWED` and reason `not_offered`. A credential that already acts for a customer fails with `ACTION_NOT_ALLOWED` and reason `already_applied`, and confirming never replaces a customer the merchant named. Once the customer whose email the buyer confirmed changes that email or is deleted, the checkout acts for no customer, and the buyer can confirm the customer's new email or another one. A checkout opened from a checkout reminder link acts for no customer the buyer confirmed earlier, so its buyer confirms an email again. A texted code for saved details binds the checkout the same way, but the new credential opens only the cards saved with that number: it lists and pays with no card saved by email, and reads no customer details. A texted code checks once, so after a lost answer request a new code. A code for purpose pay_to_new_address keeps the credential and its proof, omits checkout_auth_token, and refreshes the last confirmed code for 15 minutes. A code for purpose confirm_saved_payment_method keeps the session's credential, so the response omits checkout_auth_token and carries payment_method_save on the checkout session. A texted code saves the card with the number when the number already opens the customer's saved details or the customer has none yet; otherwise payment_method_save.email_confirmation_required turns true, and an emailed code finishes the save. An emailed code alone saves the card by email. After success, a retry with the same idempotency key and code returns the stored answer and credential to any credential of the session. After failure, a retry checks the code again and counts as another try.
Path parameters
checkout_session_idstringRequiredFlint checkout session ID. Must be a valid ID with prefix cs_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
checkout_session_customer_verification_idstringRequiredThe checkout_session_customer_verification_id the code request returned. Must be a valid ID with prefix cscv_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
codestringRequiredThe six-digit code from the email or the text.
remember_buyerbooleanRemember this buyer after a right code. Defaults to false. Accepted without issuing a token until the required notice email is configured.
remembered_buyer_tokenstringToken this device already holds, if any. A right code for the same email resets its unconfirmed steps; a different email ends it. With remember_buyer, Flint returns a replacement token.
Response · 200
The checkout as the new credential reads it, and that credential, which acts for the buyer's customer; or, for purpose confirm_saved_payment_method, the paid checkout with its payment_method_save.
dataobjectRequiredResource, collection, or operation result returned by this request.
checkout_auth_tokenstringCheckout credential. Send it as Authorization: Bearer <checkout_auth_token>. Present on headless checkout launch and customer binding confirmation. Omitted on hosted checkout launch and when a saved-card confirmation keeps the current credential.
remembered_buyer_tokenstringOne-time identity token returned only when a successful code confirmation remembered the buyer. Store it on your backend or in an HttpOnly cookie. It never opens saved cards.
active_payment_attemptobjectThe payment attempt now collecting this checkout's order, the same attempt as the order's active_payment_attempt. Read it to recover after losing a pay response, and resume it only when is_resumable is true. Omitted when no attempt is active. Pending actions that open a URL are left out; the pay response carries them.
buyer_contactobjectContact the buyer entered in checkout before paying, saved with the session's checkout credential. Separate from merchant-supplied prefill and customer_prefill from the customer record. Omitted until the buyer saves or clears a field. When a checkout session payment omits buyer_contact.email or buyer_contact.phone, Flint uses these values. Flint clears the contact 30 days after the session ends, and when a customer linked to the session is deleted.
buyer_fieldsobjectWhat checkout asks the buyer for. Each field you leave out uses your checkout settings.
can_apply_promotion_codebooleanRequiredWhether to offer promotion-code entry now. True only while the session is open, is not in recovery, and merchant promotion policy allows codes. An explicit promotion_config.codes_enabled wins; null offers entry only when this merchant has an active code promotion whose schedule includes now, in the session's environment. Recomputed on each read. This hint does not change code admission: checkout lifecycle, promotion_config, and merchant policy still apply.
can_save_payment_methodbooleanWhether checkout offers the buyer the option to save the card they type for faster checkout at this merchant. When true, PayOrder accepts save_payment_method: true for one newly collected card. False when the merchant turned checkout.saved_payment_details off, customer accounts are merchant hosted, card is not an available payment option, the checkout collects an invoice, a subscription, or a return, or the checkout acts for no customer and Flint cannot email the buyer a verification code. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
can_save_payment_method_with_phonebooleanWhether the buyer can save the card they type by giving a US or Canadian mobile phone number with the payment, in save_payment_method_phone on POST /v1/orders/{order_id}/pay, and confirming it with a texted code after paying. True while Flint can send texts and either save_payment_method_requires_verification is true, so the number replaces confirming an email before paying, or the checkout acts for the customer whose email the buyer confirmed with this credential, so the number joins that customer's saved details once the buyer confirms it. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
checkout_session_idstringRequiredUnique identifier for this checkout session, prefixed `cs_`.
client_referencestring or nullThe reference the payment link URL or resolve request carried, such as your user ID. `null` when none was sent or checkout did not start from a payment link. Returned only to merchant credentials; omitted for buyer credentials. Set by the buyer's browser, so treat it as a claim, not proof of identity. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
closed_reason_messagestringThe note supplied when the checkout session was closed.
Not returned with a checkout credential, a customer session, or an invoice access token
created_atstringRequiredRFC3339 timestamp.
custom_field_answersarray of one ofThe buyer's answers to the payment link's custom fields, the same as the `custom_field_answers` of the session's order. Read-only. Empty when the session didn't start from a payment link, the buyer answered no custom fields, or the order was created before Flint recorded answers here. Returned only to merchant credentials; omitted for buyer credentials. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
custom_textobjectThe custom text this session shows in checkout.
customerobject or nullPresent only when `expand` includes `customer`; `null` when expanded and there is no related customer.
Not returned with a checkout credential, a customer session, or an invoice access token
customer_account_urlstringThe store's customer account, where the buyer can see this purchase and manage a subscription it starts. A stable link that opens the account wherever the merchant's `customer_account` settings put it; the buyer signs in there if needed. Pass it as Apple Pay's `managementURL` for a subscription. Omitted from webhooks, and when the account can't be resolved.
customer_idstringThe customer of the session's order. Omitted when the order has none. A checkout credential issued for this session acts for this customer. Add expand=customer to include the customer.
customer_prefillobjectContact and default addresses of the customer the checkout acts for, with the recipient name on its default shipping address: the customer the merchant created the session for, or the customer whose email the buyer confirmed in it. Present on GET and PATCH responses while the session is open and acts for a customer. Separate from merchant-supplied prefill and buyer_contact saved by the buyer. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
deliveryobjectCurrent delivery choices for Flint-owned pricing. External pricing reports requires_explicit_quote; reading this field does not request a delivery quote. Omitted when the session is not open, has no order, or Flint cannot read its delivery.
delivery_method_idsarray of stringRequiredImmutable delivery method assignment captured when the checkout was created.
delivery_selection_requiredbooleanRequiredWhether the order has at least one remaining quote-resolved fulfillment choice that must be selected before payment.
expires_atstringRFC3339 timestamp.
expires_in_secondsintegerThe lifetime the session got. expires_at is its deadline. Omitted for invoice sessions, which take their deadline from the invoice.
external_reference_idstringCaller-owned identifier for this resource in an external system.
Not returned with a checkout credential, a customer session, or an invoice access token
gift_card_challengeobjectWhere the buyer completes a gift card challenge for this checkout. Returned on single-session reads, session create and update responses, checkout launch results, and customer verification confirmation results while the session is open and can show the challenge. Omitted from lists, webhooks, expanded resources, and delivery selection results.
inventory_reservation_idsarray of stringImmutable cart hold IDs authorized by the merchant at session creation. Omitted when empty and from checkout-credential responses. Buyer and merchant delivery requests that omit IDs use eligible bound holds; explicit merchant IDs replace the binding for that request. First adopter wins when sessions share a hold. Invalidated or otherwise ended sessions cannot adopt stock, and replacements never inherit the binding. Unused cart units retain their own release and expiration lifecycle.
Not returned with a checkout credential, a customer session, or an invoice access token
invoiceobject or nullPresent only when `expand` includes `invoice`; `null` when expanded and there is no related invoice.
Not returned with a checkout credential, a customer session, or an invoice access token
invoice_idstringID of the invoice a session of type `invoice` collects payment for. Absent for other types.
is_in_recoverybooleanRequiredWhether the checkout is in its payment recovery window after its deadline. The checkout credential can recover only an attempt it started. Merchant reads can also report a merchant-started attempt.
legalobjectThe terms and policy links this session shows the buyer, and whether the buyer must accept the terms.
merchant_iconobjectThe merchant's square icon, shown in browser tabs and compact headers. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_idstringRequiredID of the merchant this resource belongs to.
merchant_logoobjectThe merchant's logo. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when the merchant has one; other responses and webhooks omit it.
merchant_namestringThe merchant's business name, which hosted checkout shows when `theme.title` is unset. Reads `Merchant` when the merchant has not set a business name. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
merchant_supportobjectHow the buyer can reach the merchant for help: the support email, phone, and URL the merchant set. Present on GET and PATCH responses when the merchant set at least one of them. Show it where your checkout tells the buyer to contact the merchant, such as an expired or closed checkout, or your receipt. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
metadatamap of stringStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
Not returned with a checkout credential, a customer session, or an invoice access token
orderobject or nullPresent only when `expand` includes `order`; `null` when expanded and there is no related order.
Not returned with a checkout credential, a customer session, or an invoice access token
order_idstringID of the order the session collects payment for, fixed at creation. Absent when the session has no order.
page_originstringOrigin of the page that renders this headless checkout. Omitted when not set.
pay_to_new_address_requires_verificationbooleanWhether at least one saved card this checkout lists would be refused for the current delivery destination because the paying credential last confirmed a code more than 15 minutes ago. Request a code with purpose pay_to_new_address, without email or channel, and confirm it with this credential before paying. A Flint wallet card can still pay to an address in that wallet while this is true for a store saved card. Pickup and orders that ship nothing never require this verification. Returned only to the checkout credential. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_collectionobjectGuidance for collecting a payment source. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_intent_idsarray of stringIDs of the payment intents for the session's order. Absent when the order has none.
payment_intentsarray of objectPresent only when `expand` includes `payment_intents`: summaries of the payment intents in `payment_intent_ids`.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_linkobject or nullPresent only when `expand` includes `payment_link`; `null` when expanded and there is no related payment link.
Not returned with a checkout credential, a customer session, or an invoice access token
payment_link_idstringID of the payment link the session was started from. Absent when it was not started from a payment link.
payment_link_imageobjectThe current image of the payment link that opened this session. Returned by `GET /v1/checkout-sessions/{checkout_session_id}` when that link has an image; other responses and webhooks omit it.
payment_method_saveobjectThe card the buyer saved pending with this checkout's payment, and whether they confirmed it. Present on GET and PATCH responses after a payment that paid the order in full, or that was approved for the merchant to capture later, and saved a card this way. Without a number, confirmation requires an emailed code. A checkout whose payment is approved stays open until the capture. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
payment_return_urlstringHeadless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.
paymentsobjectConfigured payment options for merchant credentials; currently available payment options for the checkout credential.
platform_feeobjectThe platform fee the partner app requested when it created the session with an install token. Each payment intent the session creates carries its own platform_fee, lowered to fit that payment. Absent when the session has none.
Not returned with a checkout credential, a customer session, or an invoice access token
platform_fee_ruleobjectThe platform fee rule that the session was created with.
Not returned with a checkout credential
prefillobjectContact details and addresses to fill in for the buyer, who can change them. For a customer with saved addresses, Flint fills in any address you leave out, and reads include it. With quick_pay or subscription_plan and automatic tax on, a prefilled address sets the order's tax location. Not changed by what the buyer types; for that, read buyer_contact. customer_prefill is what the checkout credential reads from the customer record.
problemsarray of objectRequiredNamed conditions that affect checkout completion. Follow each problem's remediation action instead of reconstructing delivery lifecycle rules in the client. payment_in_progress means another payment for the order must finish before this checkout can complete. When Flint cannot read the checkout's delivery, the read still succeeds and reports delivery_unreadable; its remediation says whether reading the session again can succeed, and its next action's reason_code names the error.
promotion_configobjectWhether automatic promotions apply to this session and whether the buyer can enter promotion codes.
recovery_expires_atstring or nullWhen the restricted payment-attempt recovery window ends. `null` when the session has no recovery window.
recovery_payment_attempt_idstringThe payment attempt in the recovery window. Only merchant reads report a merchant-started attempt.
redirectsobjectWhere hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.
refundsarray of objectAll buyer-visible refunds on this session’s order, including refunds made by the store. Uses the same buyer projection as /v1/me/refunds. Included on GET single-session reads as an array, with [] when there are none, and omitted from other responses and webhooks. A failed refund with failure_reason refund_abandoned could not be completed: tell the buyer to contact the store to get their money back.
save_payment_method_requires_verificationbooleanWhether saving a new card or using saved cards needs the buyer to confirm their email with a code. A new card can be saved pending with the payment and confirmed on the receipt; using saved cards still needs the code before paying. True when can_save_payment_method is true and the checkout acts for no customer for this credential: the merchant created it without one, and either the buyer has not confirmed an email with this credential, or the customer whose email they confirmed has since changed that email or been deleted. A credential other than the one a confirmation returned, such as the hosted checkout link opened on another device, reads true. Send the code with POST /v1/checkout-sessions/{checkout_session_id}/customer-verifications. False while the checkout acts for a customer, and whenever can_save_payment_method is false. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
save_payment_method_typesarray of enumWhat save_payment_method keeps, present when can_save_payment_method is true: card, a card the buyer types into checkout. Show the save option with that payment method only. A pay request that sends save_payment_method: true with Apple Pay, Google Pay, a bank account, or Affirm, through a confirmation token created with setup_future_usage none, still pays, and its payment attempt's payment_method_save reports not_saved. The values can grow. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
card
setup_collectionobjectGuidance for collecting a payment method to save. Checkout-credential reads include it only while the session is open. Returned only to the checkout credential; never in webhook payloads.
Not returned with a bearer token
shop_idstringID of the shop that started checkout.
show_flint_markbooleanWhether Flint's hosted pages show the Powered by Flint mark for this merchant. `false` when the merchant's agreement with Flint removes it. Returned by `GET /v1/checkout-sessions/{checkout_session_id}`; other responses and webhooks omit it.
statusenumRequiredWhere the session is in its lifecycle. Only an `open` session accepts payment. `terminal_reason` says why a session that is not open ended.
openpaidpartially_paidexpiredclosedinvalidated
subscription_plan_idstringID of the subscription plan a session of type `subscription_plan` signs the buyer up for. Absent for other types.
subscription_termsobjectRenewal terms a subscription checkout commits the buyer to. Frozen when the session's order was created, so later plan changes do not alter them. Absent when the checkout starts no subscription.
superseding_checkout_session_idstringID of the session that replaced this one. Present when `terminal_reason` is `superseded`.
supported_actionsarray of enumLifecycle actions Flint accepts now, computed from stored checkout state without checking the caller's permissions. Contains close while open; empty after payment, closure, or expiry. Always present with merchant credentials.
Not returned with a checkout credential, a customer session, or an invoice access token
close
surfaceenumRequiredHow the session is presented to the buyer. A hosted session has a `url` on Flint's checkout page; a headless one is rendered on your own page.
hostedheadless
taxobjectThe session's tax settings. Omitted when the session sets none.
terminal_reasonenumWhy the session ended. The checkout credential can still read its own closed or expired session; every other call is refused because the session is not open. order_paid_elsewhere applies only to invalidated sessions when payment succeeds or partially succeeds outside the session. order_mutated applies when an edit closes or completes its order, or ends an invoice, return-resolution, or subscription-plan session. Other merchant edits keep hosted and headless sessions open. A session already past expires_at ends with expired before the edit is applied.
payment_succeededpayment_partially_succeededexpiredclosed_by_merchantorder_mutatedsupersededorder_paid_elsewhereinvoice_paid_elsewhereinvoice_voidedinvoice_uncollectibleinvoice_balance_changed
themeobjectThe theme checkout renders with: your branding settings, with the session's `title`, `primary_color`, and `accent_color` over them. A session sets only those three; the other fields come from branding settings. Omitted when neither sets a value.
tipobjectThe tip options this session offers the buyer.
typeenumRequiredWhat the session collects payment for, fixed at creation.
orderquick_paysubscription_planinvoicepayment_linkshop
updated_atstringRequiredRFC3339 timestamp.
urlstringHosted checkout URL that carries a one-time launch credential. Send the buyer here to pay. Present only for hosted sessions read with a merchant credential that can manage checkout sessions. Launch results include it for hosted sessions: create, payment-link resolve, and invoice and return-resolution checkout. Omitted for headless sessions.
Not returned with a checkout credential
versionintegerRequiredPersisted version of this resource's owned state. Expanded resources and external observations can change independently.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/checkout-sessions/cs_01KEZF7C004JRWFW43H037MQRN/customer-verifications/cscv_01KEZF7C00XW14W2FCVD5PH3Z9/confirm \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_CHECKOUT_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"code": "482913"
}'Was this helpful?