Confirm Checkout Session
Charges the HSA/FSA-eligible portion of a Checkout Session against a single saved payment
method, using the eligibility split computed and persisted when the session was created. The
amount charged is the sum of the eligible portions of the session’s items — never the session
total — so amount_received is expected to be less than amount_total. Collect the remaining
ineligible balance through your own payment flow.
Returns the Checkout Session with its payment_intent expanded. When the eligible portion sums
to $0, or to less than Stripe’s $0.50 minimum, nothing is charged and the response is still a
200 with payment_intent: null — a normal outcome for a partly-eligible order, not an error.
Branch on payment_intent == null to decide whether there is anything to settle with Flex.
capture_method must be automatic. manual is rejected with manual_capture_not_supported
(422): it would authorize the card successfully and then be uncapturable, so it is refused
before any money moves rather than leaving a hold to expire.
An Idempotency-Key header is required. Retry a timeout or a 5xx with the same key; a new
key is a new request and can charge the card a second time. A 4xx and a card decline are both
terminal.
Error codes: idempotency_key_required (400), checkout_session_already_processed /
checkout_session_expired / checkout_session_canceled (400),
checkout_session_not_found / payment_method_not_found / customer_not_found /
eligibility_record_not_found / food_eligibility_not_enabled (404),
eligibility_record_already_charged / idempotency_key_reused (409),
manual_capture_not_supported / payment_method_not_off_session (422),
idempotency_key_in_use / lock_timeout (503 — transient contention: a request with this key
is still in flight, or another request holds the customer or payment method. Retry unchanged
with the same key; a new key may charge the card twice), and a 402 carrying code
and decline_code for a card decline — including authentication_required, which is terminal:
a card demanding 3DS cannot be charged off-session, so fall back to another tender rather than
retrying.
Authorizations
Use a Bearer token to access this API.
Headers
A unique key identifying this attempt. Retry a timed-out or 5xx request with the SAME key — a new key is a new request and can charge the card a second time.
Path Parameters
"fcs_01J9XR8M3K7VZ8N2YB4WJ6T0RA"
Query Parameters
Comma-separated list of related objects to expand in the response.
""
Body
An envelope wrapping a single checkout session object.
An envelope wrapping a single checkout session object.
The checkout session payload.
Response
An envelope wrapping a single checkout session object.
An envelope wrapping a single checkout session object.
The checkout session payload.