Skip to content

Declines and payment attempts

When POST /v1/orders/{order_id}/pay doesn't end in a paid order, you have to decide what to do next: ask for another card, finish 3D Secure, or wait. The wrong choice charges the buyer twice or tells them a payment that went through has failed. Every pay call runs a payment attempt, and the attempt in the response tells you which case you're in: start a new payment, resume the same attempt, or wait for it to finish.

This guide assumes you already collect a card and pay an order as in Embedded payments.

Read the attempt, not the HTTP status#

A declined card is not an API error. Flint never returns 402: every route that starts, confirms, captures, or retries a payment returns its normal 2xx status with the resulting resource, and the outcome is in that resource's state. This sandbox request pays with a test token that declines for insufficient funds:

<!-- docs-test {"scenario":"decline","status":200,"fixtures":{"order":9900}} -->

cURL
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/pay \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: pay-ord_1kmn0aExample-1" \
  -d '{
  "action": "pay",
  "payment_source": {
    "credential_type": "stripe_payment_method",
    "stripe": {
      "payment_method": "pm_card_chargeDeclinedInsufficientFunds"
    }
  },
  "expected_outstanding_money": {
    "amount": 9900,
    "currency": "USD"
  }
}'
Response
{
  "data": {
    "order": {
      "order_id": "ord_1kmn0aExample",
      "status": "open",
      "payment_status": "unpaid",
      "version": 4,
      "settlement_amounts": {
        "paid_money": {"amount": 0, "currency": "USD"},
        "outstanding_money": {"amount": 9900, "currency": "USD"}
      }
    },
    "order_payment_attempt": {
      "order_payment_attempt_id": "opat_1kmn0aExample",
      "status": "failed",
      "is_resumable": false,
      "mode": "payment",
      "expected_outstanding_money": {"amount": 9900, "currency": "USD"},
      "payment_intents": [{
        "payment_intent_id": "pi_1kmn0aExample",
        "status": "requires_payment_method",
        "selected_payment_option": "card",
        "amount_money": {"amount": 9900, "currency": "USD"},
        "tip_money": {"amount": 0, "currency": "USD"},
        "last_payment_error": {
          "code": "insufficient_funds",
          "message": "The payment method has insufficient funds. Ask the customer to use a different payment method.",
          "failed_at": "2026-10-28T18:04:12Z",
          "remediation": {
            "retry": "none",
            "next_steps": "Ask the customer to use a different payment method."
          }
        }
      }],
      "pending_actions": [],
      "gift_card_redemptions": [],
      "last_payment_error": {
        "code": "insufficient_funds",
        "message": "The payment method has insufficient funds. Ask the customer to use a different payment method.",
        "failed_at": "2026-10-28T18:04:12Z",
        "remediation": {
          "retry": "none",
          "next_steps": "Ask the customer to use a different payment method."
        }
      },
      "started_at": "2026-10-28T18:04:11Z",
      "completed_at": "2026-10-28T18:04:12Z"
    }
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

The call returned 200. The outcome is in data.order_payment_attempt:

  • status says where the attempt is. The ten values are in Decide what to do next.
  • is_resumable says whether action: "resume" can move the attempt forward. It is true only when a resume can make progress.
  • payment_intents[] holds the attempt's legs: the payment intents it is trying to settle. Most orders have one leg, and a split payment has several. Each leg has its own status, and a leg that didn't settle carries its own last_payment_error.
  • pending_actions[] is filled only while the status is requires_action. It holds what the browser has to do before you resume.
  • last_payment_error is set on a failed attempt when a payment failed it: a decline, a block, or failed authentication. It repeats the failing leg's error. A partially_succeeded attempt doesn't set it, so in a split payment, read each leg's own last_payment_error.
  • status_reason says why a failed, canceled, or expired attempt ended when no payment failure explains it, such as inventory_unavailable. See Why an attempt ended.
  • expected_outstanding_money is the balance the attempt started against. It stays fixed for the life of the attempt.
  • mode is payment for a charge, setup when a zero-balance subscription order saves a card, and settlement when a zero-balance order completes without a charge.

The HTTP status still tells you something. Handle the three cases differently:

ResponseWhat it meansWhat to do
200 with order_payment_attemptFlint ran the attempt. A decline, a 3D Secure request, or a block by one of your risk rules all land here.Branch on the attempt's status, as in Decide what to do next.
4xxFlint refused the request. For example, the order changed since you quoted it, or another attempt still holds the order. When Flint refuses the credential before sending it to the processor, such as a browser credential that was already used, the attempt that request started ends failed.Fix what the error names. See Errors.
A timeout, a dropped connection, or 503 with reason outcome_unknownYou don't know whether the buyer was charged.Retry with the same key, as in Recover a lost response. Don't start a new payment.

When attempts are limited#

A temporary attempt limit returns 429 RATE_LIMIT_EXCEEDED with Retry-After. Wait at least that many seconds before trying again. A refused attempt has no pending payment, so don't show a processing state or promise a receipt.

If a payment reaches the processor's confirmation limit, Flint immediately cancels that payment and returns 409 ACTION_NOT_ALLOWED with reason payment_attempts_exhausted and remediation.retry none. There is no Retry-After: waiting cannot make that payment reusable. Start a new payment or checkout session. For a payment link, open the link again to start a new checkout. For an order with one payment leg, the refused confirmation's attempt ends failed; no charge remains processing. If another leg of a split payment settled, read the returned attempt and collect only the remaining balance.

Read a payment intent's outcome#

The same rule holds for a payment intent you confirm or capture directly with /v1/payment-intents, and for each leg of an attempt. Read status and last_payment_error in the response body:

statuslast_payment_errorMeaning
requires_payment_methodnullNot attempted yet.
requires_payment_methodSet, code not payment_blockedDeclined or failed. Collect another payment method and confirm again.
requires_payment_methodcode is payment_blockedBlocked by Flint or the processor's risk controls. No money moved. Ask for another payment method.
requires_confirmationnullPayment details are attached, but confirmation was interrupted. Confirm the payment intent again without payment_source. For an order payment, you can also resume the attempt.
requires_actionnullThe buyer has to act, usually for 3D Secure. The confirm result's current_payment_action describes the step, and confirming again without payment_source retrieves it. An order payment's attempt also lists it in pending_actions.
processingnullSubmitted, and Flint is waiting for or confirming the outcome. Wait for the next event or read the payment intent again. Don't start another payment.
requires_capture, succeedednullAuthorized, or paid.
canceled with cancellation_reason payment_returnedThe last failure, or nullFlint couldn't accept the payment, for example because it was completed with a payment method other than the one Flint approved. Money it collected is in captured_money, and Flint returns it through a refund it creates, or a released hold is in released_money. Ask for another payment method without saying why.
canceled without cancellation_reasoncode is payment_blockedFlint couldn't accept the payment and knows of no money to return yet, for example while the charge is still processing. If money turns up, the payment intent moves to payment_returned. Ask for another payment method without saying why.
canceled, expiredThe last failure, or nullFinal. The field keeps the last failure, if there was one.

A payment intent always has last_payment_error, as null or an object with code, message, failed_at, and remediation. On an attempt leg, the field is left out instead of null. Flint follows these rules:

  • Set when a confirmation concludes in failure: a decline, failed authentication, a definitive confirmation failure, a risk block, or an asynchronous failure such as an ACH return before the debit succeeded. The status is then requires_payment_method, or canceled when the processor has permanently canceled the payment.
  • Replaced by the next concluded failure.
  • Cleared when a later confirmation concludes in requires_action, processing, requires_capture, or succeeded. Starting a confirmation doesn't clear it.
  • Kept when the payment intent is canceled or expires, so the last failure stays readable.
  • Not written while the outcome is unknown. If the processor doesn't answer after Flint sends the confirmation, the payment intent is processing with last_payment_error null, and the request returns 200. Flint resolves the outcome itself and records a failure only if the payment failed.
  • Never stale. A delayed failure report doesn't overwrite a payment intent that has already moved on.

The response, a GET, and the payment_intent.* webhooks carry the same last_payment_error for the same failure. current_payment_action is not part of that set: only a confirm result carries it, and reads, lists, and webhooks leave it out.

A declined confirmation is a recorded result. Replaying its Idempotency-Key returns the same declined response and doesn't charge again. To try again after a decline, send a new request with a new key.

remediation.retry is none for every payment failure, and remediation.next_steps depends on code: re-enter the card details for incorrect_cvc and payment_method_unavailable, try again later for processing_error, ask the buyer to update their card for card_details_outdated, and don't try the card again for lost_card, stolen_card, fraudulent, and card_declined_do_not_retry.

Decide what to do next#

An attempt starts in processing and ends in one of five final statuses. Between those, it can stop to wait for the buyer, for you, or for the processor.

Payment attempt statusFinal
  • processing moves to requires_action on buyer step needed
  • processing moves to requires_capture on authorized
  • requires_action moves to processing on continue or timeout
  • requires_capture moves to processing on capture, cancel, or expiry
  • processing moves to succeeded
  • processing moves to partially_succeeded
  • processing moves to failed
  • processing moves to canceled
  • processing moves to expired
status on order payment attempt
Final values do not change again
  • processing
    Flint is collecting this attempt's payments, confirming their outcome, or applying the outcome to the order. Wait for order.paid or the payment intents' events, or read the attempt again. Don't start another payment for the order.
  • requires_action
    The buyer needs to complete a payment or card-saving step. Run each action in pending_actions. For a payment, continue its payment intent with POST /v1/payment-intents/{payment_intent_id}/confirm without payment_source. For setup, continue through order pay with action: "setup" and omit setup_payment_source, or resume the attempt. A checkout credential still continues through the order's resume action. An attempt still waiting 30 minutes after it started is canceled.
  • requires_capture
    Every payment is authorized and waiting for manual capture. Capture or cancel each payment intent before its authorization_expires_at. The attempt holds the order until you act or the authorization expires.
  • succeededFinal
    The attempt collected its full amount.
  • partially_succeededFinal
    Some legs settled and the rest didn't. The order still owes the part that failed. See When only some legs settled.
  • failedFinal
    The payment didn't go through. Each declined leg is back at requires_payment_method with last_payment_error set, and no money moved. With status_reason payment_returned, Flint couldn't accept the payment: money may have moved, and Flint is refunding it. Collect a new credential and start a new attempt.
  • canceledFinal
    Every leg was canceled, by a cancel request or because a 3D Secure challenge was abandoned. Start a new payment.
  • expiredFinal
    An authorization expired before it was captured, or a card-saving attempt was never completed. Start a new payment.

The status tells you what to do. This function covers every status, including any added later:

TypeScript
type NextStep =
  | "done"
  | "authenticate"   // run pending_actions, then continue each payment
  | "wait"           // read the attempt again, or wait for order.paid
  | "capture"        // capture or cancel the authorization
  | "pay_remaining"  // retry only the legs that failed
  | "new_payment";   // collect a new credential and start again

function nextStep(attempt: {status: string}): NextStep {
  switch (attempt.status) {
    case "succeeded":
      return "done";
    case "partially_succeeded":
      return "pay_remaining";
    case "failed":
    case "canceled":
    case "expired":
      return "new_payment";
    case "requires_capture":
      return "capture";
    case "requires_action":
      return "authenticate";
    default:
      // processing and any future status.
      // An open attempt is never a reason to start another payment.
      return "wait";
  }
}

failed is a known outcome, so a new attempt is safe. processing means Flint is still resolving or applying the outcome. It concludes without a merchant resume request. Exceptional unresolved outcomes enter an internal manual_review queue owned by Flint operators. Operator reconciliation is not a caller action; the public status stays processing while it is unresolved. Examples include a processor operation still unresolved after 24 hours, payment creation that exhausted 12 recovery tries, quarantined replay, exhausted order completion or resource release, money that cannot be applied to the order, exhausted invoice updates, and tax or gift-card funding rejections that need correction. Repeated order-completion failures enter operator review after the 11th deferral.

Warning: Wait for a final outcome before starting over

A processing attempt may already have charged the buyer. Flint rejects a second payment with PAYMENT_ATTEMPT_ACTIVE. Start a new payment only from failed, canceled, or expired, and pay only the remainder after partially_succeeded.

Handle a decline#

A declined leg stays on the order at requires_payment_method with last_payment_error set, and the attempt ends failed. Nothing needs canceling. Tell the buyer, collect a new credential, and retry the same leg.

Decline codes#

A payment presented on a reader returns these codes too, including the PIN codes.

last_payment_error.code uses the values below. Flint maps every processor reason onto one of them, so you branch on code and never on processor-specific reasons. The list can grow, so treat a code you don't know like payment_failed.

code on payment error summary
  • card_declined
    The issuer declined the card without a more specific reason below. Ask for another card.
  • card_declined_do_not_retry
    The issuer said not to charge this card again: a stop-payment order, a revoked authorization, a card to pick up, or "do not try again". Don't retry the card, including on a schedule. Show the buyer a plain decline, not the reason. For recurring charges, get new authorization from the buyer and use a different payment method.
  • card_details_outdated
    The card's details have changed, for example a new number or expiry date. Ask the buyer to update their card details, then try again.
  • do_not_honor
    The issuer declined the card without giving a reason. Ask the buyer to contact their bank or use another card.
  • lost_card
    The issuer reports the card lost. Don't retry the card. Show the buyer a plain decline, not the reason, and ask for another card.
  • stolen_card
    The issuer reports the card stolen. Don't retry the card. Show the buyer a plain decline, not the reason, and ask for another card.
  • fraudulent
    The issuer declined the payment as suspected fraud. A block by your risk rules or the processor's fraud screening is payment_blocked instead. Don't retry the card. Show the buyer a plain decline, not the reason, and ask for another card.
  • insufficient_funds
    The card or bank account doesn't have enough funds. Ask for another payment method.
  • expired_card
    The card has expired. Ask the buyer to check the expiry date or use another card.
  • incorrect_cvc
    The security code is wrong. Ask the buyer to enter it again.
  • incorrect_pin
    The PIN is incorrect. Ask the buyer to enter it again on the reader or use another card.
  • pin_try_exceeded
    The card's PIN retry limit was exceeded. Ask for another card or have the buyer contact their bank.
  • pin_required
    A PIN was required but not entered. Ask the buyer to enter it on the reader.
  • payment_method_unavailable
    The details can't be used for this payment: an incorrect card number, expiry date, or postal code, or a card type or currency the processor doesn't support. Ask the buyer to check the details or use another method.
  • processing_error
    The issuer or processor couldn't complete the charge, for example because the issuer was unreachable. The buyer can try the same card again.
  • authentication_required
    The buyer failed or didn't complete 3D Secure. Ask them to try again and finish the challenge, or to use another card.
  • payment_blocked
    One of your Flint risk rules or Stripe's fraud screening blocked the payment. Ask for another payment method without saying why.
  • payment_method_declined
    The provider of a non-card method, such as Affirm, declined the buyer. Ask for another payment method.
  • confirmation_token_account_mismatch
    The confirmation token was created for a different settlement account. Create Stripe Elements with onBehalfOf set to payment_collection.stripe.on_behalf_of, collect a new token, and submit a new request.
  • payment_method_temporarily_unavailable
    The payment method is temporarily unavailable. Ask the buyer to try again later or choose another method.
  • payment_not_completed
    The buyer left a redirect flow, such as Affirm, without finishing it. Ask them to try again or choose another method.
  • payment_action_expired
    A pending buyer action, such as a redirect, expired before the buyer finished it. Start a new attempt.
  • bank_account_closed
    The bank account is closed. Ask for another account or payment method.
  • bank_account_not_found
    The bank couldn't find the account. Ask the buyer to check the account and routing numbers.
  • bank_debit_not_authorized
    The account holder told their bank the debit wasn't authorized. Ask for another payment method.
  • bank_account_restricted
    The account can't accept debits. Ask for another payment method.
  • bank_debit_limit_exceeded
    The debit exceeds a limit on the account. Ask for another payment method.
  • payment_failed
    Any failure without a more specific code, including duplicate-transaction declines and Stripe's generic test-mode decline. Ask the buyer to try again or use another method.

The bank_ codes appear only on ACH debit legs.

Show the buyer a message#

What the buyer sees depends on the credential that read the payment.

  • Your API key or the CLI sees the real code, and message is written for you, not the buyer. Most messages end with an instruction such as "Ask the customer to use a different payment method." Write your own buyer copy from code.
  • A buyer credential, such as a checkout session credential or a customer session on /v1/me, sees lost_card, stolen_card, fraudulent, do_not_honor, and card_declined_do_not_retry as card_declined. Its message is written for the buyer, and its remediation has no next_actions. You can show that message as is.

If you build buyer copy on your server, map the codes yourself. A few codes need specific wording, and a generic decline covers the rest, including lost_card, stolen_card, fraudulent, and card_declined_do_not_retry, whose reasons the buyer shouldn't see:

TypeScript
function buyerMessage(code: string): string {
  switch (code) {
    case "incorrect_cvc":
      return "The security code doesn't match. Check it and try again.";
    case "expired_card":
      return "This card has expired. Check the date or use another card.";
    case "card_details_outdated":
      return "Your card's details have changed. Update them or use another card.";
    case "payment_method_unavailable":
      return "Check your card details, or use another card.";
    case "processing_error":
    case "payment_method_temporarily_unavailable":
      return "Your payment couldn't be processed. Try again in a moment.";
    case "authentication_required":
    case "payment_not_completed":
    case "payment_action_expired":
      return "Your payment wasn't completed. Try again.";
    default:
      return "Your payment was declined. Try another card or payment method.";
  }
}

Retry after a decline#

Collect a new credential in the browser, then send it again. Each try needs a new Idempotency-Key: the first request's key would replay the declined response. Flint reuses the declined leg, so retries don't pile up legs on the order.

Pay the order again. Send action: "pay" with the new payment_source. When the order's one open leg is requires_payment_method, has a last_payment_error, and covers the outstanding balance, Flint reuses it and starts a new attempt on it.

<!-- docs-test {"scenario":"decline","status":200,"expect":{"data.order.payment_status":"paid","data.order_payment_attempt.status":"succeeded"}} -->

cURL
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/pay \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: pay-ord_1kmn0aExample-2" \
  -d '{
  "action": "pay",
  "payment_source": {
    "credential_type": "stripe_payment_method",
    "stripe": {
      "payment_method": "pm_card_visa"
    }
  },
  "expected_outstanding_money": {
    "amount": 9900,
    "currency": "USD"
  }
}'

Or confirm the declined leg. With an API key that has payments.payment_intents.write, confirm the leg's payment intent with the new credential. The request and response are the same as for a standalone payment, and Flint applies the order's effects.

<!-- docs-test {"scenario":"confirm-retry","status":200,"fixtures":{"order":9900,"payment":{"order":true,"confirm":true,"card":"pm_card_chargeDeclinedInsufficientFunds"}},"expect":{"data.status":"succeeded","data.current_payment_action":null}} -->

cURL
curl -X POST https://api.withflintpay.com/v1/payment-intents/pi_1kmn0aExample/confirm \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: confirm-pi_1kmn0aExample-2" \
  -d '{
  "payment_source": {
    "credential_type": "stripe_payment_method",
    "stripe": {
      "payment_method": "pm_card_visa"
    }
  }
}'

Or select the leg explicitly. When several legs are open, or the declined leg no longer covers the balance, pay returns 400 INVALID_REQUEST with detail code REQUIRED and param payment_intents, and details[0].selectable_resources lists the legs. Select the one you want with action: "confirm_payment_intents", or cancel it with POST /v1/payment-intents/{payment_intent_id}/cancel first.

<!-- docs-test {"scenario":"staged-retry","status":200,"fixtures":{"order":9900,"payment":{"order":true,"confirm":true,"card":"pm_card_chargeDeclinedInsufficientFunds"}},"expect":{"data.order.payment_status":"paid","data.order_payment_attempt.status":"succeeded"}} -->

cURL
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/pay \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: pay-ord_1kmn0aExample-3" \
  -d '{
  "action": "confirm_payment_intents",
  "payment_intents": [
    {
      "payment_intent_id": "pi_1kmn0aExample",
      "payment_source": {
        "credential_type": "stripe_payment_method",
        "stripe": {
          "payment_method": "pm_card_visa"
        }
      }
    }
  ],
  "expected_outstanding_money": {
    "amount": 9900,
    "currency": "USD"
  }
}'
  • The credential is new. Send the stripe.payment_method or stripe.confirmation_token the browser just created, or a saved card's payment_method_id, with the matching credential_type. Browser credentials are single-use. A used or expired confirmation token returns ACTION_NOT_ALLOWED with reason confirmation_token_unusable, and a used stripe.payment_method returns reason terminal_status. Stripe's fixed sandbox aliases, such as pm_card_chargeDeclined, are the exception: the same alias works on any number of payments.
  • The balance is checked. Send the order's settlement_amounts.outstanding_money as expected_outstanding_money. If the order changed since you quoted it, the call returns VERSION_CONFLICT before charging: read the order again and show the buyer the new total. The field is required with a checkout session credential, and with an API key when the order has an open checkout session. Confirming the payment intent directly takes no order fence; Flint refuses with VERSION_CONFLICT if the leg no longer equals the balance.
  • The version is new. expected_version is optional. On pay, it is the order's version, taken from the declined response or a fresh read, because starting the declined attempt advanced it. On a payment intent confirm, it is the payment intent's own version.
  • An invoice checkout retries the same way. Send action: "pay" again with the session's checkout credential. Flint reuses the single unconfirmed payment intent when it covers the amount being collected. A processing or authorized payment can't be replaced.

Why an attempt ended#

When an attempt ends for a reason other than a payment failure, status_reason names it. These values aren't declines: no payment failed, and the order or the payment source usually needs attention rather than the card. Every failed attempt has exactly one of last_payment_error and status_reason. A canceled or expired attempt has status_reason only when it adds something to the status, such as payment_authorization_expired. New values can be added, and a reason Flint can't name is other, so treat a value you don't know like other.

status_reason on order payment attempt
  • inventory_unavailable
    Stock for the order isn't available. Read the order again and show the buyer what changed.
  • order_changed_before_payment
    The order changed after the attempt started and before payment. Read the order again and pay with the new balance.
  • coupon_reservation_failed
    A coupon on the order couldn't be reserved. Read the order again before paying.
  • gift_card_hold_acquisition_failed
    The gift card balance couldn't be reserved. Read the order's gift cards again before paying.
  • zero_balance_hold_acquisition_failed
    What a zero-balance order holds, such as stock, couldn't be reserved.
  • resource_guarantee_failed
    What the payment needed to hold couldn't be reserved.
  • order_payment_customer_mismatch
    The payment's customer isn't the order's customer. Pay with a payment method that belongs to the order's customer.
  • invalid_payment_source
    The payment source can't be used for this payment. Collect another one.
  • payment_method_required
    The attempt needed a payment method and had none. Send a credential.
  • payment_method_activation_pending
    The saved payment method isn't active yet. Pay again after payment_method.activated, or use another method.
  • payment_option_not_allowed
    The order doesn't accept this way to pay. Offer another payment option.
  • payment_option_unavailable
    This way to pay isn't available right now. Offer another payment option.
  • payment_source_binding_failed
    The payment source couldn't be attached to the payment.
  • payment_source_conflict
    Another payment source is already attached to the leg.
  • payment_source_not_updatable
    The leg's payment source can't be changed anymore.
  • payment_source_ownership_mismatch
    The payment source belongs to another customer.
  • payment_confirmation_rejected
    Flint or the processor refused the confirmation request before any payment outcome, for example because the confirmation token expired or was already used. The pay request's error response names the cause.
  • rate_limit_exceeded
    Flint refused confirmation because the card payment rate limit was reached. The processor received no confirmation for this attempt.
  • payment_returned
    Flint couldn't accept the payment, for example because it was completed with a payment method other than the one Flint approved. The leg's payment intent is canceled with cancellation_reason payment_returned. If the leg shows captured_money above zero, the buyer was charged and Flint is refunding it; zero means they weren't charged; absent means the outcome isn't known yet. Tell the buyer the payment couldn't be completed, without saying why, and ask for another payment method.
  • setup_action_unavailable
    The card-saving step the attempt needed isn't available.
  • setup_hold_acquisition_failed
    What a card-saving attempt holds couldn't be reserved.
  • setup_result_incomplete
    The card-saving result was incomplete.
  • tip_allocation_sync_failed
    The tip couldn't be applied to the payment.
  • canceled_on_reader
    The buyer canceled on the reader. Present the payment again when they are ready.
  • reader_unavailable
    The reader went offline or became busy before a card was read. Check the reader, then present the payment again.
  • authorization_canceled
    A cancel request on the authorized PaymentIntent canceled it before capture. Start a new payment attempt to collect again.
  • payment_authorization_canceled
    Flint finalized the attempt from the leg's observed canceled state, for example after a cancellation at the processor or a retried cancel request, instead of in the cancel request itself. Start a new payment attempt to collect again.
  • payment_authorization_expired
    A leg's authorization expired before capture.
  • other
    Any other reason that isn't a payment failure. Read the order again before starting a new payment.

Finish 3D Secure#

3D Secure covers when banks ask for authentication, require_3ds rules, liability shift, and 3DS test cards.

Pay returns one Flint URL per pending payment or setup action by default. Send client_action_type: "stripe" explicitly for the Stripe.js handoff. Each action keeps its original type and expires when the attempt reaches its 30-minute cancel time. Open every pending URL, then read or resume the same order payment attempt. An explicit type change returns 409 ACTION_NOT_ALLOWED, reason field_locked; a step that cannot open as a URL returns reason provider_action_unsupported and permits continuing with stripe.

With payment_return_url, Flint adds only payment_intent_id for a payment or payment_method_id for setup. Without it, the completion page posts {"type": "flint.payment_action.completed", "payment_intent_id": "pi_..."} or {"type": "flint.payment_action.completed", "payment_method_id": "pm_..."}, with exactly one subject key. Check event.origin against the Flint action URL's origin, and read or resume the attempt to confirm the outcome. Flint's API doesn't return a Stripe client secret for URL actions; Stripe's authentication page can receive it to run the challenge. Flint returns any charge made with a payment method it didn't approve.

Pay replays retain the original domain result with no URL token or Stripe secret. Read the attempt to recover its current permitted action. A checkout credential still withholds actions it isn't authorized to complete.

When the issuer asks for authentication, the attempt returns requires_action with is_resumable: true and a pending action for each leg that needs it. Embedded payments walks through the browser code. The round trip looks like this:

Resuming after 3D SecureResponse
BrowserYour backendFlintPOST /v1/orders/{order_id}/payrequires_action with pending_actions[]the pending action's client_actionOpen each Flint authentication URLchallenge finishedpay with action: "resume"the attempt's next status
  1. Your backend sends POST /v1/orders/{order_id}/pay to Flint
  2. Flint returns requires_action with pending_actions[] to Your backend
  3. Your backend sends the pending action's client_action to Browser
  4. Browser sends Open each Flint authentication URL to Browser
  5. Browser sends challenge finished to Your backend
  6. Your backend sends pay with action: "resume" to Flint
  7. Flint returns the attempt's next status to Your backend

The attempt in the pay response carries the action:

Response
{
  "order_payment_attempt": {
    "order_payment_attempt_id": "opat_1kmn0aExample",
    "status": "requires_action",
    "is_resumable": true,
    "pending_actions": [{
      "pending_action_id": "pendact_1kmn0aExample",
      "subject": {"payment_intent": {"payment_intent_id": "pi_1kmn0aExample"}},
      "action_type": "payment_authentication",
      "expires_at": "2026-11-11T12:30:00Z",
      "client_action": {
        "type": "url",
        "url": "https://payment-returns.example/payment-returns/actions/pendact_1kmn0aExample/bearer-token"
      }
    }]
  }
}

Open the returned client_action.url as a redirect, popup, or iframe. pending_action_id stays the same across reads of the attempt, so you can use it to avoid running one action twice.

If you explicitly send client_action_type: "stripe", the action carries client_action.stripe instead. Load Stripe.js with that action's publishable_key and pass account_id as stripeAccount only when set. For payments with splits, account_id is null; don't substitute on_behalf_of or the store's connected account. The client secret can also confirm the payment with another card, so use it only with handleNextAction:

JavaScript
import {loadStripe} from "@stripe/stripe-js";

const {publishable_key, account_id, payment_intent} =
  paymentAttempt.pending_actions[0].client_action.stripe;
const stripe = await loadStripe(publishable_key, account_id ? {stripeAccount: account_id} : {});
const {error} = await stripe.handleNextAction({
  clientSecret: payment_intent.client_secret,
});

// Resume whether or not the challenge succeeded. The resume reports the outcome.
const response = await fetch("/checkout/resume", {method: "POST"});
const attempt = await response.json(); // your backend relays data.order_payment_attempt
if (attempt.status === "requires_action" && error) {
  // The challenge never ran, for example because Stripe.js failed to load.
  showMessage(error.message);
}

Then resume from your backend:

<!-- docs-test {"skip":"Requires a completed browser 3DS challenge before continuation; API-only test does not complete authentication."} -->

cURL
curl -X POST https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/pay \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: pay-ord_1kmn0aExample-resume-1" \
  -d '{"action": "resume", "order_payment_attempt_id": "opat_1kmn0aExample"}'

A resume continues the attempt with the legs and credentials it started with. Flint reads the challenge result from Stripe, and the response carries the attempt's next status.

You can continue through the leg's payment intent instead. Confirm it without payment_source, as you would a standalone payment. Flint continues the attempt that holds the leg, reads the challenge result from Stripe, and returns the payment intent. It never starts another attempt. A checkout session credential can confirm its own session’s leg.

<!-- docs-test {"skip":"Requires a completed browser 3DS challenge before continuation; API-only test does not complete authentication."} -->

cURL
curl -X POST https://api.withflintpay.com/v1/payment-intents/pi_1kmn0aExample/confirm \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: continue-pi_1kmn0aExample-pendact_1kmn0aExample" \
  -d '{}'
  • The body is small. Besides order_payment_attempt_id, it accepts expected_outstanding_money, buyer_contact, client_action_type, and payment_return_url, all optional. Omit payment_return_url with a checkout credential. Any other field, such as payment_source, returns 400 INVALID_REQUEST with detail code UNKNOWN_FIELD.
  • The amount is the attempt's. expected_outstanding_money on a resume is compared to the amount fixed on the attempt, not the live balance. A mismatch returns VERSION_CONFLICT.
  • Each resume has its own key. The start request's Idempotency-Key belongs to the start request, and sending it with a resume body returns IDEMPOTENCY_KEY_REUSED.
  • The action is short-lived. A pay response carries pending_actions only while the attempt is requires_action and before its 30-minute cancel time. Replays omit action authority. Otherwise the array is empty. A list filtered by idempotency_key leaves it out too, so read the attempt by ID for the current action.

When the challenge fails or is abandoned#

If the buyer fails the challenge or closes it, resume anyway: the resume returns the attempt as failed, with authentication_required on the leg. Collect another card and retry as after a decline. If you start the retry without resuming first, Flint refreshes the open attempt from Stripe before it judges the new payment, so the retry isn't blocked.

If the resume returns requires_action again, let the buyer reopen the returned URL. On the explicit Stripe.js path, show any error from handleNextAction and let them try again.

If the buyer leaves without finishing, the attempt stays at requires_action until 30 minutes after it started. Flint then cancels its legs, the attempt ends canceled, and everything it held on the order is released. Resuming that attempt returns 200 with status canceled. The next payment starts fresh with action: "pay". To release the order sooner, cancel the attempt.

Recover a lost response#

When a pay request times out or the connection drops, you don't know whether the buyer was charged. Never start a new payment. Once Flint has sent a payment to the processor, it answers with the payment as it stands, even if the processor never replied. That answer can be processing: Flint is finding out the outcome and resolves it without another request from you. Wait for the payment's events or read it again. Flint never turns an unknown outcome into a 5xx while it can still write the payment's state.

Send the same request again, with the same body and the same Idempotency-Key. Flint never runs a key twice:

The first requestWhat the retry returns
FinishedIts stored response, with the Idempotency-Replayed: true header.
Is still running409 IDEMPOTENCY_KEY_IN_PROGRESS. Wait for Retry-After, then retry with the same key.
Stopped before it finishedThe result of the same attempt. Flint continues it rather than starting another.

A replayed response shows the payment as it was when the first request finished, and it keeps that state even after the payment concludes. If its status isn't final, such as an attempt that is processing, read the attempt or the payment intent before you act on it, or wait for its events.

Pay always needs an Idempotency-Key, so save the key with your order before the first call. A request without one returns 400 INVALID_REQUEST, and a retry with a new key is a new payment. With the SDKs, a lost response arrives as an SdkError with outcome: "unknown". Handle it the same way.

The same rules hold when you confirm a payment intent directly. The confirm request takes an optional key, so send one you can reproduce, such as confirm:{payment_intent_id}:{attempt}.

Two answers mean Flint couldn't settle the question for you:

  • 503 SERVICE_UNAVAILABLE with reason outcome_unknown means Flint couldn't record the uncertain outcome. Keep the key, don't send another payment, and read the order or the payment intent first.
  • 500 IDEMPOTENCY_RECOVERY_REQUIRED means Flint can't replay the original response. Find the attempt as below.

Find the attempt without retrying#

To check what happened without sending the payment again, list the order's attempts filtered by the original key. Use this read when the retry returns 500 IDEMPOTENCY_RECOVERY_REQUIRED or keeps returning IDEMPOTENCY_KEY_IN_PROGRESS:

<!-- docs-test {"scenario":"decline","status":200,"response":false,"list":true,"recovery":"order_payment_attempt.order_payment_attempt_id","expect":{"request_id":"req_..."}} -->

cURL
curl -G https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/payment-attempts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "idempotency_key=pay-ord_1kmn0aExample-1"
Response
{
  "data": [{
    "order_payment_attempt_id": "opat_1kmn0aExample",
    "status": "processing",
    "is_resumable": true,
    "mode": "payment",
    "expected_outstanding_money": {"amount": 9900, "currency": "USD"},
    "payment_intents": [{
      "payment_intent_id": "pi_1kmn0aExample",
      "status": "requires_confirmation",
      "amount_money": {"amount": 9900, "currency": "USD"},
      "tip_money": {"amount": 0, "currency": "USD"}
    }],
    "pending_actions": [],
    "gift_card_redemptions": [],
    "started_at": "2026-10-28T18:04:11Z"
  }],
  "request_id": "req_01KWM608MR7CAZFETWS1RA3XPG"
}

Pass each attempt in the list to nextStep. The list shows each attempt as it is now, not the response Flint recorded. An empty list doesn't prove the request had no effect: a payment covered entirely by gift cards, or an order with nothing outstanding, can start no attempt. Read the order too.

If you no longer have the key, read the order. active_payment_attempt is the attempt that currently holds the order's payment:

<!-- docs-test {"scenario":"decline","status":200,"response":false,"expect":{"data.payment_status":"paid"}} -->

cURL
curl https://api.withflintpay.com/v1/orders/ord_1kmn0aExample \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "data": {
    "order_id": "ord_1kmn0aExample",
    "status": "open",
    "payment_status": "unpaid",
    "active_payment_attempt": {
      "order_payment_attempt_id": "opat_1kmn0aExample",
      "status": "processing",
      "is_resumable": true
    }
  },
  "request_id": "req_01KWM6CHDJB2VSB573FNFWX0PN"
}

When active_payment_attempt is absent, no attempt is open: the last one finished, or its 30 minutes ran out. Check payment_status, and list the attempts to see how the last one ended. A checkout session read with the session's own credential or a merchant API key also includes active_payment_attempt while one is open, so a headless checkout can recover the same way.

A new payment started while an attempt holds the order is rejected. The error names the open attempt, so even a blind retry leads you back to it:

JSON
{
  "error": {
    "type": "conflict_error",
    "code": "PAYMENT_ATTEMPT_ACTIVE",
    "error_source": "caller",
    "message": "This order already has an active payment attempt. Read active_payment_attempt and resume or resolve it before starting another payment.",
    "request_id": "req_01KWM6QY2WWAXEPRF8CQV3NVPN",
    "doc_url": "https://developers.withflintpay.com/docs/errors#payment_attempt_active",
    "remediation": {
      "retry": "none",
      "next_steps": "Resume, capture, or cancel the active attempt before starting another payment."
    },
    "details": [
      {
        "code": "PAYMENT_ATTEMPT_ACTIVE",
        "message": "This order already has an active payment attempt.",
        "resource_type": "order_payment_attempt",
        "resource_id": "opat_1kmn0aExample",
        "current_status": "processing",
        "supported_actions": ["cancel"]
      }
    ]
  }
}

Wait while an attempt settles#

A processing attempt is waiting for the payment outcome or applying it to the order. A bank debit can take several business days. A card can stay here while Flint resolves a processor timeout or applies settled money and held inventory. Neither case needs a merchant resume request. Exceptional unresolved outcomes are reconciled by Flint operators.

While you wait:

  • Don't start another payment. Money may already have moved. Flint rejects the start with PAYMENT_ATTEMPT_ACTIVE, or with OPERATION_IN_PROGRESS once the attempt is more than 30 minutes old.
  • Don't tell the buyer the payment failed. For a card, keep the spinner up. For a bank debit, tell the buyer the payment is processing.
  • Read the attempt again, starting around 500 ms between reads and backing off to a few seconds. A read that fails or times out says nothing about the payment, so retry the read.

<!-- docs-test {"scenario":"decline","status":200,"response":false,"expect":{"data.status":"succeeded"}} -->

cURL
curl https://api.withflintpay.com/v1/orders/ord_1kmn0aExample/payment-attempts/opat_1kmn0aExample \
  -H "Authorization: Bearer YOUR_API_KEY"

Payment attempts have no webhook events of their own. To skip polling, fulfill from the order.paid webhook. It fires once the order is fully paid, however the payment got there. Check the order's dispute_status before you fulfill (access rules).

When only some legs settled#

An order paid with several legs, such as two cards, confirms them together in one attempt. If some legs settle and others don't, the attempt ends partially_succeeded. The attempt is final, and the order still has a balance:

Response
{
  "order": {
    "order_id": "ord_1kmn0aExample",
    "status": "open",
    "payment_status": "partially_paid",
    "pricing_amounts": {
      "total_money": {"amount": 9900, "currency": "USD"}
    },
    "settlement_amounts": {
      "paid_money": {"amount": 6000, "currency": "USD"},
      "outstanding_money": {"amount": 3900, "currency": "USD"}
    }
  },
  "order_payment_attempt": {
    "order_payment_attempt_id": "opat_1kmn0aExample",
    "status": "partially_succeeded",
    "is_resumable": false,
    "payment_intents": [
      {
        "payment_intent_id": "pi_1kmn0aCardA",
        "status": "succeeded",
        "amount_money": {"amount": 6000, "currency": "USD"},
        "tip_money": {"amount": 0, "currency": "USD"}
      },
      {
        "payment_intent_id": "pi_1kmn0aCardB",
        "status": "requires_payment_method",
        "amount_money": {"amount": 3900, "currency": "USD"},
        "tip_money": {"amount": 0, "currency": "USD"},
        "last_payment_error": {
          "code": "insufficient_funds",
          "message": "The payment method has insufficient funds. Ask the customer to use a different payment method.",
          "failed_at": "2026-10-28T18:04:12Z",
          "remediation": {
            "retry": "none",
            "next_steps": "Ask the customer to use a different payment method."
          }
        }
      }
    ]
  }
}

The first card paid $60.00 of the $99.00 total, so settlement_amounts.outstanding_money is the $39.00 still owed.

Don't retry the original amount. That would charge the buyer again for the legs that settled. Instead:

  1. Keep the settled legs. They are already applied to the order, so there is nothing to replay or reverse.

  2. Tell the buyer which part failed. Read each leg's status and last_payment_error. A generic "payment failed" is wrong here, because part of the payment went through.

  3. Retry only the failed leg. It is back at requires_payment_method, and its amount is the remaining balance. Collect a new credential and select the leg with confirm_payment_intents, as in Retry after a decline, with expected_outstanding_money at the new balance.

order.partially_paid fires the first time the order becomes partly paid, and order.paid fires once the rest settles.

Look up past attempts#

Attempts stay readable after they finish. When a buyer says their payment failed, look here.

  • GET/v1/orders/{order_id}/payment-attemptsRequired API key scopes: commerce.orders.read or commerce.orders.writeReference for GET /v1/orders/{order_id}/payment-attempts

    Every attempt on the order, newest first. page_size defaults to 20 and can be up to 100. Pass next_page_token as page_token for the next page, as in Pagination. idempotency_key filters to the attempts one pay request started.

  • GET/v1/orders/{order_id}/payment-attempts/{order_payment_attempt_id}Required API key scopes: commerce.orders.read or commerce.orders.writeReference for GET /v1/orders/{order_id}/payment-attempts/{order_payment_attempt_id}

    One attempt, with each leg's status and last_payment_error, and its pending_actions.

A decline followed by a successful retry shows two attempts. A finished attempt keeps its legs as they were when it ended, so the first attempt still shows the decline after the same leg succeeds in the second. A checkout session credential can read only the attempts its own session started.

Cancel an attempt#

Cancel an attempt to end it now instead of waiting out its 30 minutes. For example, the buyer walked away from 3D Secure and you want the inventory back on sale, or you want to back out of a zero-balance setup attempt.

POST/v1/orders/{order_id}/payment-attempts/{order_payment_attempt_id}/cancelRequired API key scope: commerce.orders.writeReference for POST /v1/orders/{order_id}/payment-attempts/{order_payment_attempt_id}/cancel

Ends the attempt, cancels each of its legs, and releases what it held on the order. Returns the order and the canceled attempt.

  • cancellation_reason is optional: requested_by_customer (the default), duplicate, fraudulent, or abandoned. A checkout session credential can send only requested_by_customer or abandoned.
  • The legs are gone. Their payment intents are canceled and can't be reused, so the next payment starts with action: "pay" and a new leg.
  • Holds are released. That covers held inventory, coupon and promotion redemptions, payment link capacity, and the delivery selection.
  • Only an open attempt can be canceled. Canceling a finished attempt returns ACTION_NOT_ALLOWED with reason terminal_status, except that repeating a cancel returns the canceled attempt unchanged. If a leg already settled, the cancel returns ACTION_NOT_ALLOWED with reason payment_collected. Refund that money instead.
  • A processing bank debit can't be canceled. If a leg is an ACH debit in processing, the cancel returns 409 ACTION_NOT_ALLOWED with reason in_progress. details[0] names the leg's payment intent in resource_type and resource_id, with current_status processing. Wait for the debit to succeed or fail, and refund it if it succeeds.

To release one authorized leg and keep the rest, cancel that leg with POST /v1/payment-intents/{payment_intent_id}/cancel, as in Manual capture.

Webhooks#

The pay response already tells your backend the outcome. Webhooks carry the same facts to systems that weren't part of the request:

  1. What happens: The issuer asks for 3D Secure
  2. Flint sends: payment_intent.requires_action
    Your pay response already carries the pending action, so the browser flow doesn't wait for this.
  3. What happens: A card declines
  4. Flint sends: payment_intent.payment_failed
    One per declined leg, carrying last_payment_error.
  5. What happens: A retry succeeds
  6. Flint sends: payment_intent.succeeded
    One per settled leg. Each carries order_id and its captured_money.
  7. Flint sends: order.paid
    Once, when the order is fully paid. Fulfill from this event, after you check dispute_status.

There is no order-level payment-failed event. Handle payment_intent.payment_failed for every payment, then route on the owner links in data.object, such as order_id. Choosing the right event names the one event to fulfill from. Webhooks covers signature checks and durable handling.

Errors#

These are the errors specific to retrying and recovering a payment. Error handling covers the envelope and the codes every route shares.

  • HTTP 409
    VERSION_CONFLICTRefresh, then retry
    expected_outstanding_money doesn't match the order's balance (on a resume, the amount fixed on the attempt), or expected_version doesn't match the order's current version. Read the order again and show the buyer the current amount before paying.
  • HTTP 400
    Read details[0]. Detail code REQUIRED with param expected_outstanding_money: a checkout session credential, or an API key on an order with an open checkout session, left out the balance. Send the balance the buyer approved. Detail code REQUIRED with param payment_intents: a one-shot pay was sent while the order has a declined leg. Select a leg from selectable_resources with confirm_payment_intents. Detail code UNKNOWN_FIELD: the body has a field the action doesn't accept, such as payment_source on a resume, and param names it.
  • HTTP 409
    Another attempt holds the order. details[0] carries its resource_type, resource_id, current_status, and supported_actions. For requires_capture, the actions are capture and cancel, plus resume only when the attempt was recorded as resumable. Take a supported action or wait instead of starting a new payment.
  • HTTP 409
    OPERATION_IN_PROGRESSRetry the same request
    A payment still holds the order, for example a bank debit more than 30 minutes old waiting on the bank. details[0].blocking_resources names the blocking resource when Flint knows it: the attempt, a checkout session, an invoice, or a payment intent. Wait, read the order again, and retry after the payment finishes.
  • HTTP 409
    Read details[0].reason. payment_attempts_exhausted: the payment reached its confirmation limit. Start a new payment or checkout; reopening a payment link starts a new checkout. unsupported_state: the attempt you tried to resume is past its 30 minutes or waiting for capture, so do what its status allows. terminal_status: the browser credential was already used, so collect a new one; or the attempt you tried to cancel already finished. payment_collected: a leg of the attempt you tried to cancel already settled, so refund it instead, or a different attempt already paid the order you tried to resume. in_progress: a leg is an ACH debit still processing, so wait for it to succeed or fail.
  • HTTP 409
    IDEMPOTENCY_KEY_IN_PROGRESSRetry the same request
    A pay request with this key is still running. See Replay, conflict, or in progress.
  • HTTP 409
    A start request's key was sent with a resume, or with another changed body. Give each pay request its own key, as Replay, conflict, or in progress describes.
  • HTTP 500
    Flint can't safely recover the original request's outcome. Find the attempt and read the order before you decide anything. Don't send the payment under a new key until you have confirmed the first one had no effect. Recovery reads covers what a result proves.
  • HTTP 409
    The merchant account can't take payments yet, for example while it's under review or isn't set up. details[0].reason says which. See Merchant readiness.
  • HTTP 503
    PAYMENT_PROCESSING_UNAVAILABLERetry the same request
    Payment processing is temporarily unavailable for this account. Retry with the same key and backoff.

Test it#

In a sandbox, these test cards produce each outcome. Use any future expiry date and any CVC.

CardAttempt statusLeg last_payment_error.code
4000 0000 0000 0002failedcard_declined
4000 0000 0000 9995failedinsufficient_funds
4000 0000 0000 0069failedexpired_card
4000 0000 0000 0127failedincorrect_cvc
4000 0000 0000 0119failedprocessing_error
4000 0000 0000 9987failedlost_card
4000 0000 0000 9979failedstolen_card
4100 0000 0000 0019failedpayment_blocked

and both return requires_action with a 3D Secure challenge. Complete the challenge and resume, and the attempt succeeds. Fail it and resume, and the attempt ends failed with authentication_required. Test both branches. To see what any other card number does, paste it into the test card lookup.

To pay from a terminal or test suite without a browser, use the test tokens in Testing. To rehearse a lost response, send a pay request twice with the same Idempotency-Key and body. The second response carries Idempotency-Replayed: true.

A decline on a paid-order edit's balance#

A pending paid-order edit collects through its own payment intent's confirm route. A decline leaves the edit pending and the order unchanged. Confirm that intent again with a new credential. When the bank asks for authentication, complete current_payment_action and confirm again. To give up, cancel the edit; this releases its holds and cancels its payment intent. An unpaid edit expires 24 hours after creation. Processing payments and payment reviews defer expiry until they resolve.

Investigate repeated declines#

A burst of declines across cards can indicate card testing. Flint applies hourly failure budgets and returns 429 with Retry-After when one is exhausted. Pause an attacked payment link and use your block lists after checking the attempt details.

Merchant reads of a payment intent include failed_attempt_count and failed_attempts. The count includes recorded payment failures, including issuer declines and processor blocks, even after a successful retry. The array contains the newest 50 failures, newest first. Each entry identifies the attempt and its decline code, plus the card brand, last four digits, issuing country, buyer IP, email, and merchant-scoped card fingerprint when those values were recorded. A processor block has decline code payment_blocked. Older attempts may have less evidence.

Use GET /v1/payment-intents?has_failed_attempts=true&status=requires_payment_method to find payments that have failed and still need payment details. Add payment_link_id to find payments for one link, including hosted pay, headless pay, and orders your server paid. The decline_code, card_fingerprint, buyer_ip_address, card_last4, and card_brand filters can narrow the results; combined evidence filters must match the same failed attempt. has_failed_attempts=false finds payments without a recorded failure. List cursors remain bound to these filters.

The fingerprint in failed_attempts.card_fingerprint is the value accepted by risk card-fingerprint lists. Use it to block a confirmed attacker card; last four digits alone cannot identify a card. buyer_email is the email used for risk evaluation when that attempt began. buyer_ip_address is the canonical address supplied by a trusted API-key relay, or the request address for a checkout credential. These fields and filters require merchant credentials and are withheld from buyer credentials.

A payment link's sales_summary.attempted_payment_count counts all recorded card attempts, including retries and pending attempts. failed_payment_count counts failed card attempts. A successful retry preserves the earlier failures. Read these counts with GET /v1/payment-links/{payment_link_id}?expand=sales_summary, then use card-testing protection and block lists to respond to an attack.

Was this helpful?