Skip to content

Payment methods

A payment method is a card saved to one customer so you can charge it again without asking for the card number. Use it for one-click repeat purchases, automatic invoice collection, and subscription billing. Only cards can be saved, so type is always card. A payment method is not the same as a payment option such as card, affirm, or ach_debit, which is a way to pay that a checkout, invoice, or payment intent offers.

For the full flow, from saving a card to charging it while the customer is away, follow Save a card and charge it later.

How a card gets saved#

Saving a card on its own takes three steps. Flint returns the Stripe.js keys, so you don't need a Stripe account of your own.

  1. Your backend calls POST /v1/payment-methods with the customer_id. The response is a pending payment method with client_setup.stripe.
  2. Your page loads Stripe.js with account_id and publishable_key, mounts the card fields with the client secret, and calls stripe.confirmSetup when the customer submits. Stripe.js runs any 3D Secure check.
  3. Flint receives the processor's confirmation, moves the card to active, fills in card and fingerprint, and sends payment_method.activated.

A successful confirmSetup in the browser doesn't make the card chargeable yet. Wait for payment_method.activated, or read the payment method until status is active.

Cards are also saved in these flows, each sending payment_method.activated:

None of them sets the customer's default card.

consent is a read-only object on payment methods returned by merchant and /v1/me reads and lists. Its text is the wording recorded when the buyer agreed to save the card, and accepted_at is when the payment attempt or Account card setup started. Send save_payment_method_consent_text with save_payment_method: true when paying an order or confirming a payment intent to record the buyer's wording. Flint records the wording itself when the buyer saves a card through Account.

consent is null when Flint has no recorded wording. Expanded payment method summaries omit the field.

Statuses#

status on payment method
Final values do not change again
  • pending
    The save started and the processor hasn't confirmed it, or a buyer saved the card in checkout with a mobile phone number and hasn't confirmed it yet. Not chargeable.
  • active
    The only status you can charge, make the default, or attach to a subscription or invoice.
  • failed
    The bank refused the setup, or a buyer who saved the card in checkout with a mobile phone number didn't confirm it within 24 hours. Not chargeable. After a refused setup, another attempt with the same client secret can still make the same payment method active.
  • expired
    The card's expiration month has passed, by the UTC calendar. Not chargeable and can't be the default. If the card network updates the expiration date, the card returns to active.
  • archivedFinal
    Deleted and detached from the processor. It stays readable by ID but can never be charged again. Save a new card instead.

Treat any status other than active as not chargeable, including values added later. Flint works out expired when you read or list the card, so the expiration month passing doesn't change updated_at or send a webhook. When a bank reissues a card, the network can also update brand, last4, exp_month, and exp_year without changing payment_method_id or sending a webhook, so read the card when you display it.

When Flint may charge a card#

usage limits what a card can pay for:

usageHow it was savedWhat it can pay
off_sessionPOST /v1/payment-methods, an order payment or a payment intent confirmation sent with save_payment_method: true, or subscription signupOrder payments, checkouts, subscriptions, automatic invoices. It can also be the customer's default.
on_sessionThe buyer opted in to faster checkout in hosted checkoutOnly checkouts the buyer completes

Naming an on_session card for a subscription, an automatic invoice, the customer's default, or an order payment made with your API key returns 400 INVALID_REQUEST with detail code NOT_ALLOWED. When a subscription already stores one, collection returns 409 ACTION_NOT_ALLOWED with details[0].reason: configuration_required; give the subscription an off_session card.

The default card#

The default belongs to the customer, not the payment method. Flint never sets one on its own, not even for the customer's first card. Set or clear default_payment_method_id with PATCH /v1/customers/{customer_id}, or with PATCH /v1/me for the signed-in buyer. The card must belong to that customer, be active, and have usage: "off_session". is_default on each payment method reports whether it is the one the customer names.

Changing the default does not move existing subscriptions. Each subscription keeps its payment_method_id. To list the subscriptions still using the old card, list the customer's subscriptions and match that field to the old payment_method_id. Use subscription_id, line_items[].name, status, cancel_at_period_end, and current_period_end_at to identify each subscription and describe whether it renews or is set to end. Change payment_method_id on that subscription to move its future charges, or use its cancel operation.

Changing the default, or deleting the default card, sends customer.updated rather than a payment method event. Choose a default card covers what the default pays for.

List cards you can charge#

GET /v1/payment-methods returns every status except archived, newest first. Name archived in status to include deleted cards. For a card picker or anything that charges without the buyer, filter by status=active and usage=off_session. Add expand=customer to return the customer summary beside customer_id on each card, which also needs the customers.read scope; a key without it gets 403 INSUFFICIENT_SCOPE with param: expand.

cURL
curl -G https://api.withflintpay.com/v1/payment-methods \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "customer_id=cus_1kmn0aExample" \
  --data-urlencode "status=active" \
  --data-urlencode "usage=off_session" \
  --data-urlencode "expand=customer"
JSON
{
  "data": [
    {
      "payment_method_id": "pm_1kmn0aExample",
      "customer_id": "cus_1kmn0aExample",
      "customer": {
        "customer_id": "cus_1kmn0aExample",
        "name": "Ada Lovelace",
        "email": "ada@example.com",
        "phone": null,
        "status": "active"
      },
      "type": "card",
      "status": "active",
      "usage": "off_session",
      "consent": null,
      "is_default": true,
      "fingerprint": "9f3a6c1e0b7d4a58c2e1f06b3d94a7c5",
      "card": {
        "brand": "visa",
        "last4": "4242",
        "exp_month": 12,
        "exp_year": 2030
      },
      "created_at": "2026-09-22T17:04:05Z",
      "updated_at": "2026-09-22T17:04:09Z"
    }
  ],
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Expand related records covers how expansion batches each page and keeps page tokens valid. fingerprint is the same for every saved copy of one card number at your business, which finds duplicate cards.

With a checkout credential, the list contains only active cards that its saved-card authority permits: a merchant-bound or email-verified customer opens cards saved by email, and an SMS-verified customer opens cards saved with the confirmed number. Omit customer_id to use that authority. Without it, an omitted customer_id returns 409 ACTION_NOT_ALLOWED with reason verification_required and no param. The top-level remediation.next_actions contains create_checkout_session_customer_verification and the session's verification URL. Request a code there with purpose: use_saved_payment_methods, confirm it, and retry listing with the returned checkout credential. Follow the supported email and phone verification flows; if no code is offered, the buyer can continue with a fresh card. An explicit customer the credential cannot access remains 404 RESOURCE_NOT_FOUND.

Delete a card#

DELETE /v1/payment-methods/{payment_method_id} detaches the card from the processor and returns it with status archived. It also clears the customer's default_payment_method_id when it named this card. Deleting an archived card returns it again, still archived, with no second event. pending cards can be deleted too.

A subscription that can still charge the card blocks deletion with 409 RESOURCE_IN_USE. A scheduled cancellation releases the card once its setup fee, payments, unpaid subscription orders, and retries are settled. Change the subscription's payment_method_id, or cancel it and resolve any remaining payment. Delete a card covers what happens to open invoices.

Buyer routes#

A card management page you build calls /v1/me/payment-methods with a customer session instead of your API key. Those routes list, read, save, and delete the signed-in customer's cards with the same statuses, list defaults, and webhooks. The save request takes no customer_id, reads take no expand, responses never include fingerprint, and a card that belongs to another customer returns 404. The Customer account reference lists them, and Let the buyer add a card walks through building one.

Delete a card used by subscriptions#

DELETE /v1/payment-methods/{payment_method_id}, or DELETE /v1/me/payment-methods/{payment_method_id} for a signed-in buyer, archives the card. A subscription that can still charge it prevents deletion. A scheduled cancellation releases the card when no setup fee or other charge remains. Fully prepaid deliveries, including held deliveries, finish without charging the card and do not prevent deletion on their own. Saved-card reads keep a card whose removal is in progress with is_removing: true. Show it as Removing, offer the same delete request as a retry, and exclude it from card selection. New payments, subscriptions, and default changes refuse that card; payments already confirmed can finish. A retry checks current subscription and payment obligations before completing deletion. An unfinished payment attached to the card, or a payment update selecting it, also prevents deletion with 409 ACTION_NOT_ALLOWED, reason unsupported_state. Complete or cancel the payment, or change its card, then retry deletion. Flint also checks stalled removals automatically: it restores cards whose removal never started and finishes removals that already started. A removal left unfinished for 15 minutes is checked without the buyer needing to retry. If an earlier card update timed out, Flint settles the original update before another update, confirmation, or deletion and also retries it automatically. It replays the original request with its original processor idempotency key while that key is retained, so a late update cannot replace a newer card selection. After 24 hours, Flint can use a processor read to reconcile it. While that check is unavailable, 409 OPERATION_IN_PROGRESS asks the caller to try again shortly; retry the same request.

A refusal returns 409 RESOURCE_IN_USE. details[].blocking_resources identifies readable subscriptions, capped at 25, with the scoped total in blocking_resource_count. The detail's reason describes the first visible blocker:

reasonWhat still needs the card
subscription_renewalThe subscription has no scheduled cancellation and can charge again.
subscription_payment_pendingA setup fee, payment, retry, or an incomplete or past-due subscription still needs resolution.
subscription_balance_dueAn open subscription order has an unpaid balance.

Read each named subscription to offer the relevant next action. Change its payment_method_id, or cancel a subscription that has no scheduled cancellation. For one already set to end, show cancel_at_period_end and current_period_end_at, then describe the remaining payment or delivery issue without saying it will renew. next_retry_at, outstanding_money, open_renewal_order_id, delivery_hold, and inventory_wait describe that issue when present. Cancellation does not settle an unpaid order or finish an in-progress payment.

Webhooks#

EventSent when
payment_method.activatedThe card became active. Offer it for new payments when is_removing is false.
payment_method.failedThe save didn't complete: the bank refused it, or a buyer who saved the card with a mobile number in checkout didn't confirm it within 24 hours. Carries the card with status: "failed".
payment_method.archivedThe card was deleted. Carries it with status: "archived" and is_default: false.
payment_method.updatedThe card's details changed without a stored status change, such as new card details from the card network after the bank reissued the card. An expired card the network renews reads as active again with this event. data.previous_attributes holds the fields as they were.

One card can send payment_method.failed and then payment_method.activated when the customer retries in the same form, so act on the latest event or read the card. Each event reports one change, and a repeated provider notification sends nothing. Choosing or clearing a customer's default card sends customer.updated, not a payment method event, so read is_default from the card or default_payment_method_id from the customer.

Errors#

ErrorWhen it happens
409 ACTION_NOT_ALLOWEDThe card isn't active, or is_removing is true; the detail names it with its current status. Reason status_not_reached means a subscription was given a pending card: wait for payment_method.activated, then retry with a new Idempotency-Key. Reason unsupported_state means the card can't be charged as it is, so use or save another card.
400 INVALID_REQUESTDetail code NOT_ALLOWED: the card belongs to another customer, or it's on_session and the request charges without the buyer.
409 RESOURCE_IN_USEA subscription can still charge the card you're deleting. The detail reason identifies the remaining obligation.
409 MERCHANT_NOT_READYCard payments aren't enabled for the environment, so cards can't be saved yet.

Error handling covers the response envelope, and Errors in the saved-card guide lists every case.

Go deeper#

Save a card and charge it laterCollect the card, wait for it to activate, and charge it with the customer present or away.Subscription billingRenew on a schedule with the card a subscription stores.Build your own customer accountLet signed-in buyers add, list, and delete their cards.

The Payment method object#

A customer's saved payment details.

Returned by GET /v1/payment-methods/{payment_method_id} and carried by the endpoints below.

Attributes

cardobject

Brand, expiry and last four digits. Present when `type` is `card`.

consentobject or nullRequired

Recorded consent for the card save. Null when Flint has no recorded wording for this card.

created_atstringRequired

RFC3339 timestamp.

customerobject or null

Present only when `expand` includes `customer`; `null` when expanded and there is no related customer.

Not returned with a checkout credential or a customer session

customer_idstringRequired

Customer this payment method belongs to.

fingerprintstring

A value that is the same for every saved copy of one card number at this merchant and environment, so you can spot duplicates. It doesn't identify the card anywhere else. A card added through Apple Pay or Google Pay can have a different fingerprint from the same card typed in.

Not returned with a checkout credential or a customer session

is_defaultbooleanRequired

Whether this is the customer's default payment method, the one Customer.default_payment_method_id names. Change the default with PATCH /v1/customers/{customer_id}; that sends customer.updated, not a payment method event. Existing subscriptions keep their payment_method_id.

is_removingbooleanRequired

Removal is in progress. Show this card as Removing and offer retry with DELETE /v1/payment-methods/{payment_method_id}, or DELETE /v1/me/payment-methods/{payment_method_id} for buyers. Do not offer it for a new payment, subscription, or default. Flint retries abandoned removals automatically.

merchant_idstringRequired

ID of the merchant this resource belongs to.

originenum

`imported` for a saved card that Flint migrated from another processor account. Omitted for other cards.

Not returned with a checkout credential or a customer session

  • imported
payment_method_idstringRequired

Unique identifier for this payment method, prefixed `pm_`.

saved_withenum

Where the buyer saved this payment method. Returned on /v1/me/payment-methods responses when Flint wallet support is enabled. Accept future values.

  • flint
  • store
statusenumRequired

The saved card lifecycle. Offer the card for a new payment only when status is active and is_removing is false. Treat any other status as not chargeable, including values added later.

  • pending
  • active
  • expired
  • archived
  • failed
typeenumRequired

Kind of payment method.

  • card
updated_atstringRequired

RFC3339 timestamp.

usageenumRequired

When Flint may charge the payment method. off_session payment methods can pay subscriptions, automatic invoices, and other charges without the buyer, and can be a customer's default. on_session payment methods were saved by the buyer in checkout for faster checkout at this merchant; Flint charges them only in checkouts the buyer completes and refuses them for any charge without the buyer and as a default. Payment methods saved before usage existed are off_session.

  • on_session
  • off_session
JSON
{
  "card": {
    "brand": "visa",
    "exp_month": 12,
    "exp_year": 2030,
    "last4": "4242"
  },
  "consent": null,
  "created_at": "2026-03-17T14:30:00Z",
  "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
  "is_default": false,
  "is_removing": false,
  "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
  "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM",
  "status": "active",
  "type": "card",
  "updated_at": "2026-03-17T14:30:00Z",
  "usage": "off_session"
}

List payment methods#

GET/v1/payment-methods

Requires scope payments.payment_methods.read or payments.payment_methods.write

Rate limit: read

Lists payment methods in every status except archived, newest first. Filter by status=active for the cards you can charge. Optionally filter to a customer. Filter by usage off_session to list the payment methods a subscription, automatic invoice, or default payment method can use. Default order: created_at descending, then payment_method_id descending.

Query parameters

customer_idstring

Optional Flint customer ID filter.

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque, 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.

typearray of enum

Filter by payment method 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.

  • card
statusarray of enum

Filter by status. Omitted, the list leaves out archived rows; name archived to include them. 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.

  • active
  • pending
  • expired
  • archived
  • failed
usagearray of enum

Filter by usage: off_session payment methods can be charged without the buyer; on_session ones were saved by buyers for faster checkout. 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.

  • on_session
  • off_session
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

expandarray of enum

Include related objects in the response. Supported expansions: customer. 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. Checkout session credentials cannot use expand on this route.

  • customer

Response · 200

A page of payment methods.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/payment-methods \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

A page of payment methods.

JSON
{
  "data": [
    {
      "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "last4": "4242"
      },
      "consent": null,
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "is_default": false,
      "is_removing": false,
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM",
      "status": "active",
      "type": "card",
      "updated_at": "2026-03-17T14:30:00Z",
      "usage": "off_session"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6RHM82TW4DPEYV0590FV1"
}

Create a payment method#

POST/v1/payment-methodsIdempotent

Requires scope payments.payment_methods.write

Rate limit: external_provider_action

Initiates saving a payment method and returns the client setup payload needed to complete setup on the frontend.

Request body

customer_idstringRequired

The customer to save the payment method for.

typeenum

Kind of payment method to save. card is the only value and the default.

  • card

Response · 201

The initiated payment method setup record and any client-side setup details.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl -X POST https://api.withflintpay.com/v1/payment-methods \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "type": "card"
  }'

Get payment method#

GET/v1/payment-methods/{payment_method_id}

Requires scope payments.payment_methods.read or payments.payment_methods.write

Rate limit: read

Returns a single payment method by ID.

Path parameters

payment_method_idstringRequired

Flint payment method ID. Must be a valid ID with prefix pm_. 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 enum

Include related objects in the response. Supported expansions: customer. Expansion requires payments.payment_methods.read plus customers.read. Limits: at most 10 unique expand paths per request. Checkout session credentials cannot use expand on this route.

  • customer

Response · 200

The requested payment method.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier of this API request, used to correlate logs and support requests.

curl https://api.withflintpay.com/v1/payment-methods/pm_01KEZF7C0034B248TXXE4NXYFZ \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

The requested payment method.

JSON
{
  "data": {
    "card": {
      "brand": "visa",
      "exp_month": 12,
      "exp_year": 2030,
      "last4": "4242"
    },
    "consent": null,
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "is_default": false,
    "is_removing": false,
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM",
    "status": "active",
    "type": "card",
    "updated_at": "2026-03-17T14:30:00Z",
    "usage": "off_session"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6RHM82TW4DPEYV0590FV1"
}

Delete a payment method#

DELETE/v1/payment-methods/{payment_method_id}Idempotent

Requires scope payments.payment_methods.write

Rate limit: external_provider_action

Deletes a saved payment method so it can no longer be used for future payments. Returns the payment method with status archived, including when it was already archived. Subscriptions block deletion until they have a scheduled cancellation and no remaining payment or retry. Paid prepaid deliveries can finish without the card.

Path parameters

payment_method_idstringRequired

Flint payment method ID. Must be a valid ID with prefix pm_. 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 archived payment method.

Same response as Get payment method.

curl -X DELETE https://api.withflintpay.com/v1/payment-methods/pm_01KEZF7C0034B248TXXE4NXYFZ \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Was this helpful?