Payment methods

Payment methods are saved cards linked to a customer. They enable one-click repeat payments, automatic invoice collection, and recurring subscription billing: once a payment method is active, you can charge it by passing its payment_method_id in payment_source when paying an order, or let an automatic invoice or a subscription charge it.

Saving a card is a two-step flow. Creating a payment method starts a setup intent and returns processor details your frontend uses to confirm card collection with Stripe.js. The payment method starts in pending and becomes active once Flint receives setup confirmation; only active payment methods are billable, so wait for status=active before charging or setting a default. A card becomes expired after its expiration month and cannot be charged or set as the default. If its expiration date is updated, it becomes active again. Other statuses are removed and failed. Flint never sets a default card on its own; call set-default to choose one.

usage says when Flint may charge a payment method. Cards saved with this API and cards that start a subscription are off_session: they can pay order payments, subscriptions, and automatic invoices, and can be a customer's default. A card a buyer saves by checking "Save my details for faster checkout" in hosted checkout is on_session: it pays only in checkouts the buyer completes, and every other use returns PAYMENT_METHOD_ON_SESSION_ONLY. List with usage=off_session to show only cards you can charge without the buyer.

Card expiration uses the UTC calendar. The change to expired is calculated when you read or list the card, so the passing of its expiration month does not change updated_at or send a webhook.

Note:

For the end-to-end saved-card flow, including default cards, removal, and charging later, start with Save a card and charge it later.

The Payment method object#

Every field on a payment method, as returned by retrieve and carried by the endpoints below.

Attributes

cardobject
created_atstring

RFC3339 timestamp.

customerobject or null
customer_idstringRequired
merchant_idstring
payment_method_idstringRequired
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
  • pending
  • active
  • expired
  • removed
  • failed
typeenumRequired
  • card
updated_atstring

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"
  },
  "created_at": "2026-03-17T14:30:00Z",
  "customer_id": "cus_123",
  "merchant_id": "mer_123",
  "payment_method_id": "pm_123",
  "status": "active",
  "type": "card",
  "updated_at": "2026-03-17T14:30:00Z",
  "usage": ""
}

List payment methods#

GET/v1/payment-methods

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

Returns saved payment methods for the merchant, optionally filtered to a customer. By default, only active payment methods are returned. Filter by usage off_session to list the payment methods a subscription, automatic invoice, or default payment method can use.

Query parameters

customer_idstring

Optional Flint customer ID filter.

page_sizeinteger

Page size, default 20, max 100.

page_tokenstring

Cursor returned by the previous list response.

typeenum

Filter by payment method type.

  • card
statusenum

Filter by payment method status.

  • active
  • pending
  • expired
  • removed
  • failed
usageenum

Filter by usage: off_session payment methods can be charged without the buyer; on_session ones were saved by buyers for faster checkout.

  • on_session
  • off_session

Response · 200

dataarray of objectRequired
metaobject
next_page_tokenstring
request_idstring
curl https://api.withflintpay.com/v1/payment-methods \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2030,
        "last4": "4242"
      },
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_123",
      "merchant_id": "mer_123",
      "payment_method_id": "pm_123",
      "status": "active",
      "type": "card",
      "updated_at": "2026-03-17T14:30:00Z",
      "usage": ""
    }
  ],
  "next_page_token": "example",
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Save payment method#

POST/v1/payment-methodsIdempotent

Requires scope payments.payment_methods.write

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

Request body

customer_idstringRequired
typeenum
  • card

Response · 201

dataobjectRequired
metaobject
request_idstring
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_123",
    "type": "card"
  }'

Get payment method#

GET/v1/payment-methods/{payment_method_id}

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

Returns a single payment method by ID.

Path parameters

payment_method_idstringRequired

Flint payment method ID.

Query parameters

expandarray of enum

Supported expansions: customer. Expansion requires payments.payment_methods.read plus customers.read. Limits: at most 10 unique expand paths per request; path depth at most 2. Repeat expand, for example expand=customer&expand=customer, or pass one comma-separated value.

  • customer

Response · 200

dataobjectRequired
metaobject
request_idstring
curl https://api.withflintpay.com/v1/payment-methods/pm_01JAAAAAAAAAAAAAAAAAAAAAAA \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": {
    "card": {
      "brand": "visa",
      "exp_month": 12,
      "exp_year": 2030,
      "last4": "4242"
    },
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_123",
    "merchant_id": "mer_123",
    "payment_method_id": "pm_123",
    "status": "active",
    "type": "card",
    "updated_at": "2026-03-17T14:30:00Z",
    "usage": ""
  },
  "request_id": "bce56cba-0827-44aa-bb56-4f200ba15ee6"
}

Remove payment method#

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

Requires scope payments.payment_methods.write

Soft-removes a saved payment method so it can no longer be used for future payments.

Path parameters

payment_method_idstringRequired

Flint payment method ID.

Response · 200

dataobjectRequired
metaobject
request_idstring
curl -X DELETE https://api.withflintpay.com/v1/payment-methods/pm_01JAAAAAAAAAAAAAAAAAAAAAAA \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"
curl -X POST https://api.withflintpay.com/v1/payment-methods/pm_01JAAAAAAAAAAAAAAAAAAAAAAA/set-default \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_API_KEY"

Was this helpful?