Skip to content

Customer account

/v1/me is the buyer's own view of their account at your store: their profile, saved addresses and cards, orders, payments, deliveries, invoices, subscriptions, Returns, saved gift cards, and account deletion. Use it to build your own customer account, where buyers sign in with your login instead of Flint's hosted account. Build your own account instead covers the store setting that points Flint's email at your pages.

A customer session authorizes every request, and the session decides whose data Flint reads and writes. Flint enforces that on the server, so a bug in your pages can't show one buyer another buyer's order.

How a request reaches Flint#

The session secret is a server-side credential, and Flint has no browser credential for /v1/me. Your backend creates the session when the buyer signs in, keeps the secret, and relays the buyer's account calls:

A buyer opens their ordersResponse
BrowserYour serverFlintSign inPOST /v1/customer-sessionsSession secretOpen ordersGET /v1/me/ordersBuyer's ordersOrders page
  1. Browser sends Sign in to Your server
  2. Your server sends POST /v1/customer-sessions to Flint
  3. Flint returns Session secret to Your server
  4. Browser sends Open orders to Your server
  5. Your server sends GET /v1/me/orders to Flint
  6. Flint returns Buyer's orders to Your server
  7. Your server returns Orders page to Browser

Relay /v1/me through your backend has the server code. Customer sessions covers refresh, sign-out, and rate limits.

CredentialAccepted by
Customer session secret (flint_cses_...), from POST /v1/customer-sessions with your API keyEvery /v1/me route except /v1/me/flint-wallet/cards
Invoice access token, the invoice_token in an invoice's public_urlThat invoice's read, PDF, credit notes, and checkout session

An invoice token can't list invoices or read another one. The Flint wallet routes serve cards saved with Flint in Flint's hosted account, and answer sessions you create with 404.

Sessions you create are full sessions. Flint's hosted account also opens narrower sessions from emailed links, limited to one order, subscription, or Return. A route described as needing a full session refuses those with 404.

The buyer's subscription operations live here, not in Subscriptions. Their operation IDs put Me before the resource, as in listMeSubscriptions and updateMeSubscription, and the SDKs take the session secret as customerToken.

The session decides the customer#

  • customer_id is rejected, not ignored. A customer_id in the query string, or at any depth in a JSON body, returns 400 INVALID_REQUEST with detail code NOT_ALLOWED and param: customer_id.
  • Another buyer's resource returns 404, not 403. An ID that doesn't exist or belongs to another buyer returns 404 RESOURCE_NOT_FOUND, so the namespace never confirms that someone else's ID exists. On the single-record reads of payments, refunds, fulfillments, shipments, packages, and Return resolutions, param and details[0].resource_type name the resource you asked for, so a shipment or package error doesn't reveal its order.
  • expand isn't available. Buyer responses already carry what an account page needs. A subscription read always includes subscription_plan: the plan's current summary, or null for a subscription without a plan.
  • Lists filter only on what the buyer can see. A merchant filter such as external_reference_id, risk_level, or dispute_status returns 400 INVALID_REQUEST with detail code UNKNOWN_FIELD. query is available on GET /v1/me/orders only, where it searches the order ID, order number, buyer note, and line item names.
  • Draft invoices never appear. Lists leave them out, and reading one returns 404.

Payment availability#

A store that cannot take payments keeps its buyer account readable. Restricted and suspended stores still let buyers cancel, pause, keep a subscription, skip a cycle, and change addresses or delivery without a charge. A new payment fails with 409 MERCHANT_NOT_READY and details[0].reason processing_restricted. This includes subscription renewals and retries, invoice and return-balance checkout launches, and plan or quantity changes that charge immediately. A change billed at a later renewal is still allowed, as is resuming paid time or prepaid deliveries without another charge. Buyers can replace a saved card when the payment processor still supports card setup.

For your own account pages, read status from GET /v1/merchant on your server to hide or annotate payment controls before the buyer acts. Show the payment refusal on the action that failed, and keep order history and cancellation controls available. Merchant readiness explains the error and the store's next steps.

A closed store's receipts and order history remain readable. Commerce writes fail with 409 ACTION_NOT_ALLOWED, reason terminal_status. Buyers can still sign in, manage account security, and have an existing receipt sent again.

A narrowed projection, not an alias#

Each /v1/me route returns a buyer schema, such as BuyerOrder or BuyerSubscription, rather than the merchant resource with a filter applied. Reads leave out what only your team should see, and writes accept only what a buyer may do to their own account.

Buyer viewNotable fields left out
Customermetadata, internal_note, external_reference_id, tax_exempt, segment, and receivables. tax_identity is always null.
Ordermetadata, internal_note, external_reference_id, inventory routing and inventory exception fields, and the location_id used to calculate tax. The applied exemption, tax address, and breakdowns stay.
Fulfillmentmetadata, external_reference_id, location_id, device_id, active_hold, free-text outcome.notes, and local delivery's service_area_id and external_delivery_id. Tracking, delivery instructions, the outcome reason, and the courier's name and support phone stay.
Subscriptionmetadata, external_reference_id, supported_actions, cancellation_details.comment, and the order_id and invoice_id inside inventory_wait. inventory_wait.started_at, delivery_hold, and upcoming_delivery_hold stay, so you can warn a buyer before a renewal is held.
Paymentmetadata, external_reference_id, risk, processing_fee_money, merchant_net_money, add_on_fees, and dispute_status.
Refundmetadata and external_reference_id.
Invoicemetadata, external_reference_id, public_url, the collection settings, reminder pause state, written_off_money, and uncollectible_at.
ReturnWho completed, canceled, or overrode it, and internal policy and location IDs. supported_actions lists at most cancel, and completion_blockers lists only what the buyer can clear. See self-serve Returns.
Payment methodfingerprint

The same boundary applies wherever a buyer credential receives one of these resources: a checkout credential, or an order nested in a renewal, delivery selection, or payment result. An idempotent replay of a buyer request returns the buyer view too, including at an older API version. Your API key and your webhooks keep the merchant fields. When your account page needs something the buyer view leaves out, read it on your backend with your API key and decide whether to show it.

Buyer actions#

Orders, subscriptions, invoices, and Returns read through /v1/me carry buyer_actions: every action the resource offers, in a fixed order, each with is_available, is_required, a due_at when there's a deadline, and an unavailable_reason exactly when it isn't available. Flint works it out with the same rules it applies when the request arrives, including your store's buyer_capabilities, so build controls from it instead of reimplementing them. Merchant reads get an empty list.

Resourcekind values, in order
Orderstart_return, resend_receipt. A list of orders leaves out start_return, because only a read of one order checks return eligibility.
Subscriptioncancel, pause, resume, reactivate, update_payment_method, retry_payment, update_delivery, skip, update_billing_interval, update_quantity, swap_items, renew
Invoicepay
Returnwithdraw, ship_items, pay_balance

kind and unavailable_reason can gain values. Ignore a kind you don't recognize, and show a general message for an unknown reason. Show what the buyer can do next explains each reason and how to render the list.

Each subscription change needs its action to be available when the request arrives:

RequestAction
PATCH /v1/me/subscriptions/{subscription_id} with payment_method_idupdate_payment_method
The same PATCH with deliveryupdate_delivery
The same PATCH with billing_interval and billing_interval_count, sent togetherupdate_billing_interval
The same PATCH with quantityupdate_quantity
The same PATCH with cancel_at_period_end: false, to undo a scheduled cancellationreactivate
PATCH /v1/me/subscriptions/{subscription_id}/line-items/{subscription_line_item_id}swap_items
POST to /cancel, /pause, /resume, /skip-cycle, or /renewcancel, pause, resume, skip, or renew
POST /v1/me/subscriptions/{subscription_id}/payment-retriesretry_payment

A PATCH with several changes commits all of them or none. Delivery, billing interval, quantity, and item changes apply from the next renewal. Build cancel and pause controls lists the errors Flint returns when a subscription changed after the buyer loaded your page.

Action options#

An available cancel, pause, or pay_balance action carries the choices it accepts, in a field named after its kind. The retry_payment action carries its options whenever the subscription is past_due, including when it is unavailable:

kindOptions
cancelcancellation_reasons to offer as cancellation_reason_code, in the store's order. An empty list means don't ask, and a reason is always optional. timing says what to send as cancel_immediately: omit it for end_of_period, let the buyer choose for buyer_chooses, and send true for immediately. retention_offer appears when the store offers a pause instead and that pause is available now.
pausemax_pause_duration_cycles. When present, pause_duration_cycles is required, from 1 to this value. When absent, omit pause_duration_cycles to pause until the buyer resumes.
pay_balancereturn_resolution_ids: the Return resolutions the buyer can pay now, oldest first.
retry_paymentremaining_retries and max_retries (currently 3) count retries this billing period, including those the store starts. active_subscription_payment_retry_id is present only while a retry is pending or processing.

timing can gain values. For one you don't recognize, cancel without cancel_immediately, and send true if Flint answers with reason period_end_unavailable.

When retry_payment.unavailable_reason is in_progress, read the retry at GET /v1/me/subscriptions/{subscription_id}/payment-retries/{subscription_payment_retry_id} until it succeeds or fails. A session that can read the subscription can read this retry too. Show processing while it runs, including after a page reload. limit_reached means the buyer has used the period's retries; not_in_state takes precedence during a cancellation, delivery hold, or inventory wait. A read-only link retains the options when the action reports sign_in_required.

inventory_wait means a renewal or prepaid delivery is waiting for stock. The buyer sees started_at only. Flint charges the renewal once it can ship. A prepaid delivery ships without another charge. Show the stock wait before any payment-failed message. It does not require update_payment_method or set its due_at, unless the existing cardless or card-expiry rules require a new card.

Email preferences#

GET /v1/me/email-preferences returns customer_id, the buyer's current email, shipping_updates, checkout_reminders, and the preference version. The buyer changes one or both categories with PATCH /v1/me/email-preferences. A category is true unless the buyer turned it off, and the preference applies to every checkout using that address in this environment, including guest checkouts. A customer without an email has no preferences to read or change; these routes return 404 RESOURCE_NOT_FOUND with an explanation that an email is required.

Your server can read the same shape with GET /v1/customers/{customer_id}/email-preferences, or look up an address with POST /v1/email-preferences/lookup and {"email": "maya@example.com"}. Both use your API key with customers.read. Lookup returns customer_id and version as null for a guest. The merchant routes don't change preferences. If you send your own shipping updates or checkout reminders, honor the corresponding false value and subscribe to customer_email_preferences.updated. See Honor unsubscribes in email you send.

Concurrent changes#

The buyer can have your account open in two tabs, your team can edit the same customer, and an unsubscribe link can change a preference while a page is open. Resources a buyer edits return a version, a positive integer that increases with each committed change. Send the version your form loaded as expected_version:

ResourceRequests that check it
CustomerPATCH /v1/me
Saved addressPATCH /v1/me/addresses/{customer_address_id}, and DELETE with ?expected_version=
Email preferencesPATCH /v1/me/email-preferences
SubscriptionIts PATCH, the line item PATCH, and POST to /cancel, /pause, /resume, /skip-cycle, and /renew
ReturnPOST /v1/me/returns/{return_id}/cancel

expected_version is optional everywhere. A stale value returns 409 VERSION_CONFLICT with the current version in details[0].current_version, and nothing changes. Keep what the buyer entered, read the resource again, show them what changed, and send what they confirm with the new version and a new Idempotency-Key.

Email preferences have one version for both categories, separate from the customer's. An unsubscribe link and a change to the buyer's email both advance it, so a page loaded before an unsubscribe gets VERSION_CONFLICT instead of turning that email back on. Setting a default address advances the new default, the address that lost it, and the customer. Avoid overwriting another change has a worked example.

Order rows from GET /v1/me/orders include active_payment_attempt when a payment is in progress, with the same field visibility as GET /v1/me/orders/{order_id}. Use its status to show a processing payment separately from an unpaid order. Read the single order before offering payment actions; list rows do not carry client actions or payment collection guidance.

Read an invoice document#

GET /v1/me/invoices/{invoice_id} returns the document your invoice page renders. It accepts the buyer's customer session or that invoice's access token. The single read and the invoice in a checkout session result carry the document fields, and GET /v1/me/invoices leaves them out:

FieldContents
issue_rows, balance_rowsThe totals as issued, then what changed since. Render them in order. Rows with is_informational: false sum to the issued total and, when balance rows are present, to outstanding_money.
payment_optionsThe supported online payment methods, including for a future scheduled payment. Check buyer_actions to see whether the buyer can pay now.
collection_modebuyer_initiated, automatic, or external
active_payment_attemptA payment in progress, such as a bank debit that hasn't cleared
payment_option_cost_comparisonA lower-cost option and its estimated savings, when your payment policy shows one
merchant_logo, merchant_icon, theme, show_flint_mark, merchant_supportYour branding and contact details

Build your own invoice page covers the rendering rules, the access token flow, and how token reads set viewed_at.

Payments from the account#

A buyer pays balances through a checkout session, so card details never pass through /v1/me:

  • Invoices. POST /v1/me/checkout-sessions with type: invoice and the invoice_id while the invoice's pay action is available. See Pay an invoice.
  • Return balances. Read each ID in the Return's pay_balance.return_resolution_ids with GET /v1/me/return-resolutions/{return_resolution_id}, show its buyer_payment_amount_money, and create a session with POST /v1/me/checkout-sessions, type: return_resolution and the return_resolution_id. See Pay a Return balance.

Both routes return 201 with a new session and 200 with the open one they reuse. Sessions are hosted unless you ask for headless; Collect an invoice or a return balance covers headless checkout.

Subscription charges use the subscription's saved payment method. /renew charges the next renewal now and requires an Idempotency-Key. It returns 200 even when the payment is declined, so read order_payment_attempt.last_payment_error. POST /v1/me/subscriptions/{subscription_id}/payment-retries starts one collection attempt on a past-due subscription; see Recover a past-due subscription.

To save a new card, POST /v1/me/payment-methods returns a client_setup that the browser confirms with Stripe, and the payment method stays pending until setup succeeds. See Let the buyer add a card.

Account changes that sign the buyer out#

  • Email change. POST /v1/me/email-change-requests sends a code to the buyer's current address, when there is one, and to the new address. The email changes only when /confirm succeeds. A successful confirmation revokes every customer session for the customer, including the one that made the request. Sign the buyer in again with the new email.
  • Account deletion. POST /v1/me/deletion-requests asks your store to delete the account, or returns the request already pending, and your team approves or rejects it. Once approved, the customer's status is deletion_processing, and the account can't be changed or signed in to. Deletion anonymizes the customer: orders, payments, and refunds stay without the buyer's identity. GET /v1/me/deletion-requests and its single-request route return decision_reason, the merchant's explanation for rejection, or null when none was supplied or it has been erased. They also return requested_by (buyer or merchant, with null for an unknown pre-existing source), response_due_at (one calendar month after the request), and decided_at (the latest approve or reject decision, null while pending or unknown for an older request). resolved_at records rejection, completion, or failure, so approval can have decided_at while still processing without resolved_at. See Customer deletion requests.

Review a leaked session#

Buyer requests appear in request logs with a customer_session caller. If a session leaks, revoke the customer's sessions with POST /v1/customers/{customer_id}/sessions/revoke, then review GET /v1/api-request-logs?customer_id=cus_... with an API key that holds developer.request_logs.read. The filter covers requests across the customer's sessions; each log's caller identifies the session.

License keys and devices#

Use GET /v1/me/license-keys to show the buyer's keys for purchases and subscriptions. Use the key's ID with GET /v1/me/license-key-activations to show its devices. A full customer session can deactivate devices and resend key emails. License keys covers when the full key is visible and how to call each action.

Saved gift cards#

A buyer can save a gift card to follow its balance and anonymous history. Saving needs a full customer session and proof of possession: a current code or the private recipient link. It doesn't give the buyer ownership or let them spend the card from the account. Several buyers can save one card, and none of them sees the full code or the other holders. Replacing a code removes saved access until the buyer saves the card again with fresh proof. Save a card in a buyer account has the request rules.

Cards assigned to the buyer by customer_id, including refund and Return store credit, appear automatically in the gift card list, details, and history. Offer Remove only when the card returns can_remove: true.

Next steps#

Build your own customer accountThe full loop: sessions, relaying calls, buyer actions, and every account page.Customer sessionsLifetimes, refresh rotation, failures, and revocation for the credential /v1/me runs on.

POST /v1/me/subscription-previews with mode: "next_renewal" accepts optional delivery, the same complete object as the subscription PATCH. Use it before saving a delivery change to show renewal.total_money, shipping_money, and tax_money. When tax_money is null, tax could not yet be calculated. A full customer session is required. The preview saves nothing and has the same delivery refusals as PATCH. See Preview a charge or change.

When using a preview before fixing delivery_hold, check the subscription's remaining_prepaid_deliveries, which both merchant and buyer responses include. A positive count means the held delivery is already paid: releasing it waives shipping and charges nothing today. next_renewal still estimates the next paid billing cycle. With a zero count, the preview estimates the unpaid held renewal that Flint charges when the saved delivery works.

Buyer subscription changesWhat each buyer subscription action does to billing and delivery.Self-serve ReturnsLet buyers check eligibility, request a Return, and pay or receive a balance.

Email change request status#

POST /v1/me/email-change-requests and its /confirm action return status in place of the removed confirmed boolean. The states are pending, confirmed, canceled, and expired. new_email is nullable: it is erased when the request reaches a terminal state. requested_by is buyer for these requests; merchant requests use merchant or integration. confirmed_at and canceled_at are nullable timestamps. Buyer responses omit supported_actions.

Buyer requests still last 30 minutes and require both emailed codes when a current email exists. A newer buyer or staff request cancels the previous pending one. Staff can help when the buyer cannot open the current inbox, using the customer email change routes.

Cards saved with Flint when changing email#

Staff-started requests always leave cards saved with Flint at their existing email.

An email change applies to this store's customer account. Links in earlier emails stop working after confirmation. Other stores keep the previous email. The Flint account and its saved cards also keep the previous email unless the buyer asks to move them.

Before sending codes, an eligible Flint-hosted account can read GET /v1/me/flint-wallet/cards. When at least one card is returned, offer an unchecked choice to also move the saved cards. Keep the choice until confirmation; don't check the new email for a wallet first.

Send optional move_flint_wallet: true with the codes to POST /v1/me/email-change-requests/{email_change_request_id}/confirm only if the buyer chose to move the cards. Omission and false keep them at the previous email. The confirm result includes flint_wallet_outcome for these sessions when the previous email had saved cards:

OutcomeWhat happened
movedThe cards now belong to the new email.
keptThe cards stayed at the previous email because no move was requested.
new_email_has_walletThe new email already has a Flint wallet, so nothing moved.

Only a customer session from a live email-code sign-in at a Flint-hosted account can send the choice or receive the outcome. A merchant-created session must omit move_flint_wallet, including false; sending it returns 400 INVALID_REQUEST, detail NOT_ALLOWED, at that field. Merchant credentials never learn whether the buyer has a Flint wallet. Creating an email-change request is unchanged.

Resume an email change#

Read GET /v1/me/email-change-requests after a reload to restore the current request's ID, new email, expiry, and whether the current address also needs a code. There is at most one delivered, unexpired pending request, so the result is bounded and has no page token. For example:

HTTP
GET /v1/me/email-change-requests
Authorization: Bearer flint_cses_example

The response's data is an empty array or an array containing the pending request. A wrong code on confirmation returns 400 INVALID_REQUEST, with param identifying current_email_code or new_email_code. If both are wrong, the current address is reported first.

Read GET /v1/me/email-change-requests/{email_change_request_id} when the confirmation response was lost. Confirmation signs the buyer out, so first sign in with the new email. A response with status: "confirmed" confirms completion. Confirmation immediately removes the request's personal data, so new_email is null; read GET /v1/me for the account's current email. For example, read the request ID returned when the change started:

HTTP
GET /v1/me/email-change-requests/cecr_01KWM6XW6EN2YHHPM201ZSXC5V
Authorization: Bearer flint_cses_example

Superseded requests return not found. Sessions limited to an order or subscription cannot read either email-change route.

Preview a subscription item swap#

Call POST /v1/me/subscription-previews with mode: "next_renewal" and an optional swap before updating an item's variant. The preview uses the same offered alternatives, current customer price, and eligibility checks as PATCH /v1/me/subscriptions/{subscription_id}/line-items/{subscription_line_item_id}. It includes recurring promotions, shipping, and tax in data.renewal.total_money. It does not save the swap, reserve inventory, or guarantee a future price. Tax remains null when it cannot yet be calculated.

JSON
{
  "mode": "next_renewal",
  "subscription_id": "sub_01J00000000000000000000000",
  "swap": {
    "subscription_line_item_id": "sli_01J00000000000000000000000",
    "variant_id": "var_01J00000000000000000000000",
    "expected_version": 3
  }
}

swap.expected_version is optional. Pass the version from the subscription read to refuse a preview against newer terms. Omit swap to estimate the saved subscription's next renewal. A scheduled plan change must be removed before swapping an item.

The request schema permits swap or delivery, but rejects a request containing both. Omit both to preview the saved renewal. Preview proposed delivery changes separately.

Read subscription shipping countries#

Before collecting a new delivery address, call POST /v1/me/subscription-previews with mode: "delivery_options" and subscription_id. You may omit destination on the buyer preview to read coverage before the buyer enters an address.

JSON
{
  "mode": "delivery_options",
  "subscription_id": "sub_01J00000000000000000000000"
}

data.shipping_countries lists sorted ISO 3166-1 alpha-2 country codes potentially served by the subscription's shipping and local delivery methods. It reflects their delivery configuration, shipping zones, and rate-table country conditions. Pickup-only methods do not add shipping countries. An empty array means no shipping coverage is available. Use this list to limit or annotate the country selector only when data.shipping_countries_complete is true.

Coverage is an estimate of where methods may serve, not confirmation that a particular address can be served. Postal codes, cart contents, customer eligibility, and carrier rates can still affect availability. Send destination to the same preview to check the full address and obtain available methods and rates before saving it.

Use data.shipping_countries to restrict the country selector only when data.shipping_countries_complete is true. When it is false, a delivery radius may cross a national border without an explicit country restriction. Keep the full country selector available and preview the entered destination to check service. Explicit country and shipping-zone boundaries remain reflected in the list.

Get the current buyer profile#

GET/v1/me

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns the buyer's customer profile.

Response · 200

The requested customer.

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/me \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The requested customer.

JSON
{
  "data": {
    "billing_address": {
      "city": "New York",
      "country": "US",
      "line1": "123 Main St",
      "postal_code": "10001",
      "state": "NY"
    },
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "default_payment_method_id": null,
    "email": "jane@example.com",
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "name": "Jane Doe",
    "phone": "+14155552671",
    "shipping_address": null,
    "status": "active",
    "tax_identity": null,
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM63W8G2YAQ49MM20GEKSFD"
}

Update the current buyer profile#

PATCH/v1/meIdempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. Updates the current buyer's name or phone. Manage billing and shipping addresses through /v1/me/addresses. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

default_payment_method_idstring or null

The active off_session payment method to use by default. Omit to leave unchanged; null clears it.

expected_versioninteger

The customer version you read. A different version refuses the update.

namestring or null

Send null to clear it. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.

phonestring or null

E.164 phone number. Send null to remove it.

Response · 200

The updated customer.

Same response as Get the current buyer profile.

curl -X PATCH https://api.withflintpay.com/v1/me \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "name": "Ada Lovelace",
    "phone": "+14155550123"
  }'

List the current buyer's addresses#

GET/v1/me/addresses

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's saved addresses with their billing and shipping default flags. Default order: created_at descending, then customer_address_id descending.

Query parameters

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.

Response · 200

The customer's addresses.

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/me/addresses \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The customer's addresses.

JSON
{
  "data": [
    {
      "address": {
        "city": "Austin",
        "country": "US",
        "line1": "12 Main St",
        "postal_code": "78701",
        "state": "TX"
      },
      "created_at": "2026-08-02T16:00:00Z",
      "customer_address_id": "caddr_01KEZF7C00K2Q127FBJAXWB0FP",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "is_default_billing": false,
      "is_default_shipping": true,
      "label": "Home",
      "recipient_name": "Alex Morgan",
      "updated_at": "2026-08-02T16:00:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Create an address for the current buyer#

POST/v1/me/addressesIdempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Saves an address for the buyer. The address becomes a default only when the request sets is_default_billing or is_default_shipping, or later by setting those flags with PATCH, including the buyer's first address. A default address is also the billing or shipping address on the buyer's customer profile. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

addressobjectRequired

The postal address to save.

is_default_billingboolean

Set true to make this the default billing address and remove that default from any other saved address. Defaults to false.

is_default_shippingboolean

Set true to make this the default shipping address and remove that default from any other saved address. Defaults to false.

labelstring

Limited to 100 characters (Unicode code points), counted before surrounding whitespace is trimmed.

phonestring

E.164 phone number. Limited to 30 characters (Unicode code points), counted before surrounding whitespace is trimmed.

recipient_namestringRequired

Limited to 255 characters (Unicode code points), counted before surrounding whitespace is trimmed.

Response · 201

The created address.

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/me/addresses \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "address": {
      "city": "Austin",
      "country": "US",
      "line1": "12 Main St",
      "postal_code": "78701",
      "state": "TX"
    },
    "is_default_shipping": true,
    "label": "Home",
    "recipient_name": "Alex Morgan"
  }'

Get one of the current buyer's addresses#

GET/v1/me/addresses/{customer_address_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's saved addresses.

Path parameters

customer_address_idstringRequired

Flint customer address ID. Must be a valid ID with prefix caddr_. 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 requested address.

Same response as Create an address for the current buyer.

curl https://api.withflintpay.com/v1/me/addresses/caddr_01KEZF7C00K2Q127FBJAXWB0FP \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The requested address.

JSON
{
  "data": {
    "address": {
      "city": "Austin",
      "country": "US",
      "line1": "12 Main St",
      "postal_code": "78701",
      "state": "TX"
    },
    "created_at": "2026-08-02T16:00:00Z",
    "customer_address_id": "caddr_01KEZF7C00K2Q127FBJAXWB0FP",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "is_default_billing": false,
    "is_default_shipping": true,
    "label": "Home",
    "recipient_name": "Alex Morgan",
    "updated_at": "2026-08-02T16:00:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Update one of the current buyer's addresses#

PATCH/v1/me/addresses/{customer_address_id}Idempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Changes the fields you send on one of the buyer's saved addresses. The address field replaces the whole postal address. Send null for phone or label to remove it. Set is_default_billing or is_default_shipping to true to make this address the default, or false to clear a default it holds. Changing a default address also changes the matching address on the buyer's customer profile. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

customer_address_idstringRequired

Flint customer address ID. Must be a valid ID with prefix caddr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

addressobject

Replaces the whole postal address. Send every field you want to keep; omitted optional fields such as line2 are removed.

expected_versioninteger

The `version` of the saved address you last read. The update fails with a conflict if the address has changed since.

is_default_billingboolean

Set true to make this the default billing address and remove that default from any other saved address. Set false to clear this default if this address holds it; no other address becomes the default.

is_default_shippingboolean

Set true to make this the default shipping address and remove that default from any other saved address. Set false to clear this default if this address holds it; no other address becomes the default.

labelstring or null

Limited to 100 characters (Unicode code points), counted before surrounding whitespace is trimmed. Send null to clear it.

phonestring or null

E.164 phone number. Limited to 30 characters (Unicode code points), counted before surrounding whitespace is trimmed. Send null to clear it.

recipient_namestring

Limited to 255 characters (Unicode code points), counted before surrounding whitespace is trimmed.

Response · 200

The updated address.

Same response as Create an address for the current buyer.

curl -X PATCH https://api.withflintpay.com/v1/me/addresses/caddr_01KEZF7C00K2Q127FBJAXWB0FP \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "address": {
      "city": "Austin",
      "country": "US",
      "line1": "12 Main St",
      "postal_code": "78701",
      "state": "TX"
    },
    "expected_version": 1,
    "label": "Home"
  }'

Delete one of the current buyer's addresses#

DELETE/v1/me/addresses/{customer_address_id}Idempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Deletes one of the buyer's saved addresses. Deleting the billing or shipping default leaves the customer with none; Flint doesn't pick another address. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

customer_address_idstringRequired

Flint customer address ID. Must be a valid ID with prefix caddr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Query parameters

expected_versioninteger

Optional address version last read by the caller.

Response · 200

The deleted address snapshot.

Same response as Create an address for the current buyer.

curl -X DELETE https://api.withflintpay.com/v1/me/addresses/caddr_01KEZF7C00K2Q127FBJAXWB0FP \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Create a checkout session for the current buyer#

POST/v1/me/checkout-sessionsIdempotent

Requires a customer session or an invoice access token

Rate limit: payment

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Creates or reuses a hosted or headless checkout session for something the buyer owes. With type return_resolution, it collects the buyer's balance on one of their return resolutions' replacement order. A sandbox return email link can open checkout for the balance on its own return. With type invoice, it collects what is due now on one of the buyer's invoices; an invoice access token works for its own invoice only. The response is 200 when it reuses the open session with the same surface and 201 when it creates one. Omit surface to use hosted; changing surface replaces an idle session and is refused while a payment is in progress. Use redirects to set where the buyer goes after paying or canceling. The return_url field is an alias for redirects.success_url on hosted checkout or payment_return_url on headless checkout and must be an address of the merchant's customer account. A reused session takes a new success destination only until a payment starts, then keeps its existing destination. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

Send exactly one of these

The `return_resolution` variant of `CreateMeCheckoutSessionRequest`.

page_originstring

Origin of the page where you render this headless checkout, such as https://shop.example.com. Only this origin can show the checkout's gift card challenge and receive its result. It does not let the browser call the Flint API. Accepted only when surface is headless. Use HTTPS and a lowercase DNS hostname. Do not include a path, query, fragment, or default port. In test mode, localhost, names ending in .localhost, and 127.0.0.1 also work over HTTP or HTTPS.

payment_return_urlstring

Headless sessions only. Absolute HTTPS URL on your site where Flint sends the buyer after a redirect payment such as Affirm, whatever the outcome; read the session there to show the result. Required when the session offers affirm. It can't contain credentials, a query string, or a fragment. Query strings are deliberately excluded so credentials and provider state cannot cross Flint's payment relay. Put merchant identifiers in the URL path, such as https://shop.example/return/sub_123. Test mode also accepts http loopback URLs. Up to 2,048 characters.

redirectsobject

Where hosted checkout sends the buyer. Not allowed when surface is headless; use payment_return_url.

return_resolution_idstringRequired

One of the buyer's return resolutions with a buyer payment pending on its replacement order. Another buyer's resolution, or an unknown one, returns 404 RESOURCE_NOT_FOUND. An open session with the same surface is reused and returned with 200.

return_urlstring

Where the checkout sends the buyer after paying, such as the invoice's or Return's page in the customer account. Limited to 2048 characters (Unicode code points) before trimming surrounding whitespace. It must be an HTTPS address of the merchant's customer account: /{merchant_id} on Flint's account host, the merchant's active custom account domain, or the host of customer_account.merchant_account_url when the merchant hosts the account. In test mode, any URL on localhost or a loopback IP address (such as 127.0.0.1 or [::1]) is also accepted, over HTTP or HTTPS and on any port. Anything else returns 400 INVALID_REQUEST with an INVALID_VALUE detail on return_url. An alias for redirects.success_url on hosted checkout or payment_return_url on headless checkout; keep them consistent when sending both.

surfaceenum

Defaults to hosted. The same surface reuses the open checkout. A different surface replaces it only while no payment is in progress; otherwise the request returns 409 ACTION_NOT_ALLOWED with reason in_progress.

  • hosted
  • headless
typeenumRequired

What the checkout collects payment for. return_resolution: the buyer's balance on one of their return resolutions; send return_resolution_id. invoice: what is due now on one of the buyer's invoices; send invoice_id.

  • return_resolution

Response · 201

Checkout session created.

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.

Response · 200

The existing open checkout session was returned. Nothing was created.

Same attributes as 201.

curl -X POST https://api.withflintpay.com/v1/me/checkout-sessions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "return_resolution_id": "retres_01KEZF7C00VBZRA9H0NN82A4S9",
    "surface": "hosted",
    "type": "return_resolution"
  }'

List credit notes for one of the current buyer's invoices#

GET/v1/me/credit-notes

Requires a customer session or an invoice access token

Rate limit: read

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Lists issued and voided credit notes on your invoices, newest first. Filter by invoice_id to select one invoice. Default order: issued_at descending, then credit_note_id descending.

Query parameters

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.

invoice_idstring

Filter by the exact source invoice ID.

statusarray of enum

Filter by status. 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.

  • issued
  • voided

Response · 200

A page of buyer-visible credit notes.

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/me/credit-notes \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of buyer-visible credit notes.

JSON
{
  "data": [
    {
      "buyer_tax_identity": null,
      "credit_note_id": "cn_01KEZF7C001MHR3WBEWAFG5DTD",
      "credit_note_number": "CN-1001",
      "invoice_id": "inv_01J00000000000000000000000",
      "issued_at": "2026-03-22T12:01:00Z",
      "line_items": [
        {
          "correction": {
            "quantity": 1,
            "type": "quantity"
          },
          "credit_note_line_item_id": "cnli_01KEZF7C006N101PGMWKNHFD1J",
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "invoice_line_item_id": "invli_01KEZF7C00EEHJQZDWNCY60NBP",
          "name": "Support",
          "subtotal_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 500,
            "currency": "USD"
          },
          "total_money": {
            "amount": 3000,
            "currency": "USD"
          }
        }
      ],
      "memo": null,
      "pending_refund_money": {
        "amount": 0,
        "currency": "USD"
      },
      "reason": "returned_goods",
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "seller_tax_identity": null,
      "status": "issued",
      "tax_currency_conversions": [],
      "total_money": {
        "amount": 3000,
        "currency": "USD"
      }
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Get a credit note for one of the current buyer's invoices#

GET/v1/me/credit-notes/{credit_note_id}

Requires a customer session or an invoice access token

Rate limit: read

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Returns one credit note with its lines, total, and the credit still available to allocate.

Path parameters

credit_note_idstringRequired

Flint credit note ID. Must be a valid ID with prefix cn_. 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 buyer-visible credit note.

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/me/credit-notes/cn_01KEZF7C00N1TRRCVDNY8S471H \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible credit note.

JSON
{
  "data": {
    "buyer_tax_identity": null,
    "credit_note_id": "cn_01KEZF7C001MHR3WBEWAFG5DTD",
    "credit_note_number": "CN-1001",
    "invoice_id": "inv_01J00000000000000000000000",
    "issued_at": "2026-03-22T12:01:00Z",
    "line_items": [
      {
        "correction": {
          "quantity": 1,
          "type": "quantity"
        },
        "credit_note_line_item_id": "cnli_01KEZF7C006N101PGMWKNHFD1J",
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "invoice_line_item_id": "invli_01KEZF7C00EEHJQZDWNCY60NBP",
        "name": "Support",
        "subtotal_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 500,
          "currency": "USD"
        },
        "total_money": {
          "amount": 3000,
          "currency": "USD"
        }
      }
    ],
    "memo": null,
    "pending_refund_money": {
      "amount": 0,
      "currency": "USD"
    },
    "reason": "returned_goods",
    "refunded_money": {
      "amount": 0,
      "currency": "USD"
    },
    "seller_tax_identity": null,
    "status": "issued",
    "tax_currency_conversions": [],
    "total_money": {
      "amount": 3000,
      "currency": "USD"
    }
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Download a credit note for one of the current buyer's invoices#

GET/v1/me/credit-notes/{credit_note_id}/pdf

Requires a customer session or an invoice access token

Rate limit: read

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Returns the credit note document as application/pdf rather than a JSON envelope. The PDF exists from issue onward and shows the credited lines, totals, and the invoice it corrects. It uses your current branding, so a later download can differ in logo or colors, but not in content.

Path parameters

credit_note_idstringRequired

Flint credit note ID. Must be a valid ID with prefix cn_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

A PDF document.

Content type application/pdf

curl https://api.withflintpay.com/v1/me/credit-notes/cn_01KEZF7C00N1TRRCVDNY8S471H/pdf \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A PDF document.

Returns application/pdf.

List the current buyer's deletion requests#

GET/v1/me/deletion-requests

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. Lists the current buyer's deletion requests in the selected merchant environment, newest first by requested_at. Default order: requested_at descending, then customer_deletion_request_id descending.

Query parameters

statusarray of enum

Only return requests in this lifecycle state. 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.

  • pending_review
  • processing
  • completed
  • rejected
  • failed
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.

Response · 200

The matching deletion requests.

dataarray of objectRequired

Deletion requests matching the supplied filters, in the published list order.

metaobject

Metadata about this response, including warnings when present.

next_page_tokenstring

Opaque cursor to pass as page_token to fetch the next page. Omitted when no more results remain.

request_idstringRequired

ID of this API request. Include it when asking Flint to investigate the response.

curl https://api.withflintpay.com/v1/me/deletion-requests \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The matching deletion requests.

JSON
{
  "data": [
    {
      "canceled_subscription_ids": [],
      "customer_deletion_request_id": "cdel_01KEZF7C001SCPDJYR1AA8KQCZ",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "decided_at": null,
      "decision_reason": null,
      "removed_payment_method_ids": [],
      "requested_at": "2026-08-02T16:00:00Z",
      "requested_by": "buyer",
      "response_due_at": "2026-09-02T16:00:00Z",
      "retention_policy": "retain_required_commerce_records",
      "status": "pending_review"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Request deletion of the current buyer's account#

POST/v1/me/deletion-requestsIdempotent

Requires a customer session

Rate limit: sensitive_write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Asks the store to delete the buyer's account, or returns the request already pending. The store approves or rejects it. Deletion anonymizes the customer: orders, payments, and refunds stay without the buyer's identity.

Response · 201

The new deletion request.

dataobjectRequired

The tracked request to review and erase this customer's personal data.

metaobject

Metadata about this response, including idempotency replay and warnings when present.

request_idstringRequired

ID of this API request. Include it when asking Flint to investigate the response.

Response · 200

The customer's existing open deletion request, unchanged. Nothing was created.

Same attributes as 201.

curl -X POST https://api.withflintpay.com/v1/me/deletion-requests \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Get the current buyer's deletion request#

GET/v1/me/deletion-requests/{customer_deletion_request_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns the status of one of the buyer's deletion requests.

Path parameters

customer_deletion_request_idstringRequired

Flint customer deletion request ID. Must be a valid ID with prefix cdel_. 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 tracked deletion request.

Same response as Request deletion of the current buyer's account.

curl https://api.withflintpay.com/v1/me/deletion-requests/cdel_01KEZF7C009P94WEXW5RMRFXAY \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The tracked deletion request.

JSON
{
  "data": {
    "canceled_subscription_ids": [],
    "customer_deletion_request_id": "cdel_01KEZF7C001SCPDJYR1AA8KQCZ",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "decided_at": null,
    "decision_reason": null,
    "removed_payment_method_ids": [],
    "requested_at": "2026-08-02T16:00:00Z",
    "requested_by": "buyer",
    "response_due_at": "2026-09-02T16:00:00Z",
    "retention_policy": "retain_required_commerce_records",
    "status": "pending_review"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List pending email changes#

GET/v1/me/email-change-requests

Requires a customer session

Rate limit: read

Returns the current buyer's delivered, unexpired, unconfirmed email change request in this store. There is at most one pending request, so the response is bounded and has no pagination parameters. Use it to resume entering codes after reloading the account page. After confirmation the request leaves this list and all old sessions are revoked. Sign in with the new email and read GET /v1/me to verify the account's current email if the confirmation response was lost. Default order: created_at descending, then email_change_request_id descending.

Query parameters

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.

Response · 200

Zero or one pending email change request.

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/me/email-change-requests \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Zero or one pending email change request.

JSON
{
  "data": [
    {
      "canceled_at": null,
      "confirmed_at": null,
      "created_at": "2026-08-02T16:00:00Z",
      "current_email_confirmation_required": true,
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "email_change_request_id": "cecr_01KEZF7C00B8VJX4M828K0430H",
      "expires_at": "2026-08-02T16:30:00Z",
      "new_email": "alex.new@example.com",
      "requested_by": "buyer",
      "status": "pending"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Request an email change#

POST/v1/me/email-change-requestsIdempotent

Requires a customer session

Rate limit: sensitive_write

Sends short-lived confirmation codes to the current and new email addresses. If the account has no current email, only the new address must be confirmed. The customer email does not change until confirmation succeeds. Limited to three attempts per 15 minutes, including attempts rejected because the email is already used. A rejected attempt keeps any pending email change request. Over the limit, the request fails with `RATE_LIMIT_EXCEEDED`; wait the whole seconds until the oldest counted attempt leaves the window, at least 1, before trying again.

Request body

new_emailstringRequired

The address to change the email to. Flint emails a six-digit code to it. The local part before @ must be at most 64 octets (UTF-8 bytes).

Response · 200

The pending email change request.

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/me/email-change-requests \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "new_email": "alex.new@example.com"
  }'

Get an email change request#

GET/v1/me/email-change-requests/{email_change_request_id}

Requires a customer session

Rate limit: read

Reads a delivered email change request for the current buyer in this store, including confirmed after a lost confirmation response. Confirmation and expiry scrub the request's personal data, so new_email is null on those reads; GET /v1/me reports the account's current email. Confirmation revokes all old sessions: sign in with the new email before reading a confirmed request. Superseded requests are not found.

Path parameters

email_change_request_idstringRequired

The email change request ID. Must be a valid ID with prefix cecr_. 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 email change request and whether it was confirmed.

Same response as Request an email change.

curl https://api.withflintpay.com/v1/me/email-change-requests/cecr_01KEZF7C00B8VJX4M828K0430H \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The email change request and whether it was confirmed.

JSON
{
  "data": {
    "canceled_at": null,
    "confirmed_at": null,
    "created_at": "2026-08-02T16:00:00Z",
    "current_email_confirmation_required": true,
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "email_change_request_id": "cecr_01KEZF7C00B8VJX4M828K0430H",
    "expires_at": "2026-08-02T16:30:00Z",
    "new_email": "alex.new@example.com",
    "requested_by": "buyer",
    "status": "pending"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Confirm an email change#

POST/v1/me/email-change-requests/{email_change_request_id}/confirmIdempotent

Requires a customer session

Rate limit: sensitive_write

Confirms possession of the current and new email addresses, then atomically updates the customer account in the selected merchant environment. Omit current_email_code only when current_email_confirmation_required is false. A successful confirmation ends the buyer's access to this store on all devices. It revokes the customer's sessions and buyer access grants at this store, including the session that made this request. The buyer stays signed in to Flint and their other stores. Cards saved with Flint stay at the previous email unless a customer session that can access them sends move_flint_wallet: true. Those sessions receive flint_wallet_outcome when the previous email had saved cards. Sign the buyer in again with the new email.

Path parameters

email_change_request_idstringRequired

Flint email change request ID. Must be a valid ID with prefix cecr_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

current_email_codestring

The six-digit code emailed to the current address. Required when `current_email_confirmation_required` is `true`.

move_flint_walletboolean

Also move cards saved with Flint from the previous email to the new email. Defaults to false. Accepted only from customer sessions that can access GET /v1/me/flint-wallet/cards: a live email-code sign-in at a Flint-hosted account. Other sessions may not send this field, even as false.

new_email_codestringRequired

The six-digit code emailed to the new address.

Response · 200

The confirmed email change request.

Same response as Request an email change.

curl -X POST https://api.withflintpay.com/v1/me/email-change-requests/cecr_01KEZF7C00B8VJX4M828K0430H/confirm \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "current_email_code": "123456",
    "new_email_code": "654321"
  }'

Get the current buyer's email preferences#

GET/v1/me/email-preferences

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. Returns which of the merchant's optional email categories the customer's current email receives in the selected merchant environment. A category the buyer never changed is on. Email preferences exist only for a customer with an email: without one, the read fails with `RESOURCE_NOT_FOUND`. Receipts and other transactional email always send.

Response · 200

The customer's email preferences.

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/me/email-preferences \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The customer's email preferences.

JSON
{
  "data": {
    "checkout_reminders": false,
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "email": "buyer@example.com",
    "shipping_updates": true,
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6XW6EN2YHHPM201ZSXC5V"
}

Update the current buyer's email preferences#

PATCH/v1/me/email-preferencesIdempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. Turns the optional email categories in the body on or off for the customer's current email at this merchant in the selected merchant environment, and leaves the others as they are. The setting follows the email address, so it also covers guest checkouts with the same email. A customer without an email has no email preferences, and the change fails with `RESOURCE_NOT_FOUND`.

Request body

checkout_remindersboolean

A reminder after leaving checkout without paying.

expected_versioninteger

The `version` of the preferences you last read. The update fails with a conflict if they have changed since.

shipping_updatesboolean

Emails about shipments and deliveries, such as shipped, out for delivery, and delivered.

Response · 200

The customer's email preferences after the change.

Same response as Get the current buyer's email preferences.

curl -X PATCH https://api.withflintpay.com/v1/me/email-preferences \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "checkout_reminders": false
  }'

List cards saved with Flint for this store#

GET/v1/me/flint-wallet/cardsFlint-hosted account only

Requires a customer session

Rate limit: read

Returns the current buyer's usable wallet cards in newest-first order. Each flint_wallet_card_id is an opaque per-store handle. store_payment_method_id is null until this store holds a copy. Requires a customer session minted from a live email-code buyer login at a Flint-hosted store account, including a login narrowed to a custom domain. Email links, checkout sessions, grants, merchant-created sessions, and API keys can't see the wallet and get a not-found response. Live and sandbox wallets are isolated. The full card collection is returned in one page. Flint wallet support must be enabled. Default order: most recently added card first.

Response · 200

Cards usable at this store.

dataarray of objectRequired

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/me/flint-wallet/cards \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Cards usable at this store.

JSON
{
  "data": [
    {
      "card": {
        "brand": "visa",
        "exp_month": 12,
        "exp_year": 2035,
        "last4": "4242"
      },
      "flint_wallet_card_id": "fwc_YN5NSFVRK5MS4VOE5RPXM4BEXZZZE3UVCNJGTGR4TBV4VOHS6WRA",
      "store_payment_method_id": null
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6PWFJ6W3JS2ZXFA9JGSY3"
}

Set up a Flint wallet card at this store#

POST/v1/me/flint-wallet/cards/{flint_wallet_card_id}/store-setupsFlint-hosted account onlyIdempotent

Requires a customer session

Rate limit: external_provider_action

Records the buyer's consent to save an independent store copy for off-session payments, including subscriptions. Call only after the buyer agrees. Requires a live email-code buyer login and an enabled Flint wallet at a Flint-hosted store account. Supply a flint_wallet_card_id from listMeFlintWalletCards. Confirm client_setup with Stripe.js confirmSetup, then poll GET /v1/me/payment-methods/{payment_method_id} until active before changing a subscription through PATCH /v1/me/subscriptions/{subscription_id} with payment_method_id. Setup may request authentication. Removing the platform card or revoking store consent blocks the copy immediately. An idempotency key is optional and scoped to the store, customer, card handle, and key. Responses are retained for 24 hours. After a copy is revoked, retries with any key bound to that copy are refused. Get new consent and use a new key to create another copy. Retry a lost response with the same key. Concurrent requests for the same card at this store share one copy and setup. A failed off-session charge can still require the buyer to return through the existing card-update link. Accept an empty body or {}. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

flint_wallet_card_idstringRequired

The card's handle at this store. Must be a valid ID with prefix fwc_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 201

The reserved store copy and its client setup.

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/me/flint-wallet/cards/fwc_EKAB7CMBXELKYMJUU2LYLJP5J25FESR6YR5WENVFIUZHTTG3BZWA/store-setups \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the current buyer's fulfillment events#

GET/v1/me/fulfillment-events

Requires a customer session

Rate limit: read

Lists fulfillment events for an order owned by the current buyer, ordered by occurred_at descending. Internal merchant fields are omitted. order_id is required. Default order: occurred_at descending, then fulfillment_event_id descending.

Query parameters

order_idstringRequired

Required buyer-owned order ID.

fulfillment_idstring

Filter by fulfillment ID.

shipment_idstring

Filter by shipment ID.

package_idstring

Filter by package ID.

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.

Response · 200

The buyer-visible fulfillment events.

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/me/fulfillment-events?order_id=ord_01KEZF7C0054GQKJ142A8X367A" \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible fulfillment events.

JSON
{
  "data": [
    {
      "created_at": "2026-05-13T18:30:01Z",
      "event_type": "carrier_scan",
      "fulfillment_event_id": "fev_01KEZF7C00Z60GQ3P071KX5MKK",
      "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
      "occurred_at": "2026-05-13T18:30:00Z",
      "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
      "package_id": "pkg_01KEZF7C008VJBE6BT0CWZT296",
      "shipment_id": "shp_01KEZF7C006DZPA7FGH42HTBY8"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List the current buyer's fulfillments#

GET/v1/me/fulfillments

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists fulfillments for the buyer's orders, newest created first. Default order: created_at descending, then fulfillment_id descending.

Query parameters

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.

order_idstring

Filter by order ID.

statusarray of enum

Filter by buyer-visible status. Held fulfillments match their pre-hold status. 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.

  • pending
  • in_progress
  • ready
  • completed
  • canceled
  • failed
  • scheduled
  • accepted
  • preparing
  • picked
  • packed
  • dispatched
  • no_show
typearray of enum

Filter by fulfillment 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.

  • shipment
  • pickup
  • local_delivery
  • digital
  • service
  • handover
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc

Response · 200

Fulfillments for the order.

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/me/fulfillments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Fulfillments for the order.

JSON
{
  "data": [
    {
      "completed_at": "2026-05-13T14:30:00Z",
      "created_at": "2026-05-13T09:45:00Z",
      "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
      "line_items": [
        {
          "bundle_component_id": null,
          "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
          "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
          "quantity": 1
        }
      ],
      "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
      "order_number": "1001",
      "scheduled_start_at": "2026-05-13T09:00:00Z",
      "shipment_details": {
        "shipped_at": "2026-05-13T10:00:00Z",
        "timezone": "America/Toronto",
        "window_end_at": "2026-05-13T11:00:00Z",
        "window_start_at": "2026-05-13T09:00:00Z"
      },
      "status": "completed",
      "type": "shipment",
      "updated_at": "2026-05-13T14:30:00Z",
      "version": 4
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6KPFD8F8VKZKQ4JWZQWCA"
}

Get one of the current buyer's fulfillments#

GET/v1/me/fulfillments/{fulfillment_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's fulfillments.

Path parameters

fulfillment_idstringRequired

Flint fulfillment ID. Must be a valid ID with prefix ful_. 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 buyer-visible fulfillment.

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/me/fulfillments/ful_01KEZF7C00F24WVSTTWR1FQX5T \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible fulfillment.

JSON
{
  "data": {
    "completed_at": "2026-05-13T14:30:00Z",
    "created_at": "2026-05-13T09:45:00Z",
    "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
    "line_items": [
      {
        "bundle_component_id": null,
        "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
        "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
        "quantity": 1
      }
    ],
    "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
    "order_number": "1001",
    "scheduled_start_at": "2026-05-13T09:00:00Z",
    "shipment_details": {
      "shipped_at": "2026-05-13T10:00:00Z",
      "timezone": "America/Toronto",
      "window_end_at": "2026-05-13T11:00:00Z",
      "window_start_at": "2026-05-13T09:00:00Z"
    },
    "status": "completed",
    "type": "shipment",
    "updated_at": "2026-05-13T14:30:00Z",
    "version": 4
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List a gift card's balance history#

GET/v1/me/gift-card-transactions

Requires a customer session

Rate limit: read

Requires a full customer session. Cards assigned to the buyer by `customer_id`, including refund or Return store credit, appear automatically. Saving any other card requires its current code or private recipient link. Purchase and delivery alone do not grant access. Replacing a code invalidates saved access. Account access reveals only a masked code and grants no spending authority. Lists the full anonymous balance-change history by per-card sequence, descending. Other holders' identities and order references are omitted. Default order: sequence descending; this key uniquely orders the results.

Query parameters

gift_card_idstringRequired

Exact gift card ID. Requires current saved access to this card.

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.

Response · 200

The buyer resource or action result.

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/me/gift-card-transactions?gift_card_id=gc_01KEZF7C00RT1618WYBM1Y94CG" \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer resource or action result.

JSON
{
  "data": [
    {
      "amount_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "balance_after_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "balance_before_money": {
        "amount": 0,
        "currency": "USD"
      },
      "gift_card_id": "gc_01KEZF7C00Z8CQGX4BKKBJ3B5S",
      "gift_card_transaction_id": "gct_01KEZF7C003RB1EP8BHZM729ZK",
      "posted_at": "2026-09-07T12:00:00Z",
      "sequence": 1,
      "transaction_type": "import"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List your gift cards#

GET/v1/me/gift-cards

Requires a customer session

Rate limit: read

Requires a full customer session. Cards assigned to the buyer by `customer_id`, including refund or Return store credit, appear automatically. Saving any other card requires its current code or private recipient link. Purchase and delivery alone do not grant access. Replacing a code invalidates saved access. Account access reveals only a masked code and grants no spending authority. Lists owned and currently saved cards once each. Default order: saved time or creation time for owned cards without current saved access (descending), then gift_card_id descending.

Query parameters

statusarray of enum

Filter by status. 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.

  • pending
  • active
  • frozen
  • closed
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.

Response · 200

The buyer resource or action result.

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/me/gift-cards \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer resource or action result.

JSON
{
  "data": [
    {
      "available_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "balance_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "can_remove": true,
      "created_at": "2026-09-07T12:00:00Z",
      "currency": "USD",
      "gift_card_id": "gc_01KEZF7C00Z8CQGX4BKKBJ3B5S",
      "last4": "1234",
      "last_loaded_at": "2026-09-07T12:00:00Z",
      "last_redeemed_at": null,
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "reserved_money": {
        "amount": 0,
        "currency": "USD"
      },
      "status": "active",
      "updated_at": "2026-09-07T12:00:00Z",
      "version": 2
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Save a gift card to your account#

POST/v1/me/gift-cardsIdempotent

Requires a customer session

Rate limit: sensitive_write

Requires a full customer session. Cards assigned to the buyer by `customer_id`, including refund or Return store credit, appear automatically. Saving any other card requires its current code or private recipient link. Purchase and delivery alone do not grant access. Replacing a code invalidates saved access. Account access reveals only a masked code and grants no spending authority. Idempotency keys are scoped to the buyer, merchant, environment, and operation. A replay cannot restore removed or revoked saved access. Generated and imported codes are accepted. Repeated incorrect codes share a one-hour failure budget per buyer, IP address, and merchant environment. A cooldown returns 429 RATE_LIMIT_EXCEEDED with Retry-After; starting a new customer session does not reset it. Private recipient links remain usable during a code cooldown. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

Send exactly one of these

The `code` variant of `SaveMeGiftCardRequest`.

codestringRequired

The gift card's code. Spaces and hyphens are ignored.

credential_typeenumRequired

The proof that the buyer can use the card: its code, or the private recipient link they received.

  • code

Response · 201

The saved gift card.

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/me/gift-cards \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "code": "0123456789AB1234",
    "credential_type": "code"
  }'

Get a gift card#

GET/v1/me/gift-cards/{gift_card_id}

Requires a customer session

Rate limit: read

Requires a full customer session. Cards assigned to the buyer by `customer_id`, including refund or Return store credit, appear automatically. Saving any other card requires its current code or private recipient link. Purchase and delivery alone do not grant access. Replacing a code invalidates saved access. Account access reveals only a masked code and grants no spending authority.

Path parameters

gift_card_idstringRequired

Flint gift card ID. Must be a valid ID with prefix gc_. 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 buyer resource or action result.

Same response as Save a gift card to your account.

curl https://api.withflintpay.com/v1/me/gift-cards/gc_01KEZF7C00RT1618WYBM1Y94CG \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer resource or action result.

JSON
{
  "data": {
    "available_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "balance_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "can_remove": true,
    "created_at": "2026-09-07T12:00:00Z",
    "currency": "USD",
    "gift_card_id": "gc_01KEZF7C00Z8CQGX4BKKBJ3B5S",
    "last4": "1234",
    "last_loaded_at": "2026-09-07T12:00:00Z",
    "last_redeemed_at": null,
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "reserved_money": {
      "amount": 0,
      "currency": "USD"
    },
    "status": "active",
    "updated_at": "2026-09-07T12:00:00Z",
    "version": 2
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Remove a saved gift card#

DELETE/v1/me/gift-cards/{gift_card_id}Idempotent

Requires a customer session

Rate limit: write

Requires a full customer session. Cards assigned to the buyer by `customer_id`, including refund or Return store credit, appear automatically. Saving any other card requires its current code or private recipient link. Purchase and delivery alone do not grant access. Replacing a code invalidates saved access. Account access reveals only a masked code and grants no spending authority. Removes this buyer's saved access without changing funds or other holders' access. Owned cards and cards without current saved access return 404. Reusing the same idempotency key replays the original removal snapshot without restoring saved access. Idempotency keys are scoped to the buyer, merchant, environment, and operation. A replay cannot restore removed or revoked saved access. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

gift_card_idstringRequired

Flint gift card ID. Must be a valid ID with prefix gc_. 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 buyer resource or action result.

Same response as Save a gift card to your account.

curl -X DELETE https://api.withflintpay.com/v1/me/gift-cards/gc_01KEZF7C00RT1618WYBM1Y94CG \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the current buyer's invoices#

GET/v1/me/invoices

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's invoices. Draft invoices are never returned. Default order: created_at descending, then invoice_id descending.

Query parameters

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.

statusarray of enum

Filter by invoice status. 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.

  • open
  • partially_paid
  • paid
  • voided
  • uncollectible
  • credited
order_idstring

Filter by Flint order ID.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

due_date_fromstring

Inclusive lower bound on due_date, in YYYY-MM-DD format. Compares each invoice calendar date in its timezone (UTC when absent).

due_date_tostring

Exclusive upper bound on due_date, in YYYY-MM-DD format. Compares each invoice calendar date in its timezone (UTC when absent).

is_overdueboolean

Filter by whether an open or partially_paid invoice has an outstanding balance after its due date ends in its timezone (UTC when absent). With a schedule, matches when any entry is overdue.

has_outstanding_balanceboolean

Filter by whether settlement_amounts.outstanding_money is greater than zero.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by invoice_id.

  • created_at
  • updated_at
  • due_date
  • invoice_number
  • settlement_amounts.outstanding_money
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc

Response · 200

A page of invoices.

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/me/invoices \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of invoices.

JSON
{
  "data": [
    {
      "buyer_actions": [
        {
          "is_available": false,
          "is_required": false,
          "kind": "pay",
          "unavailable_reason": "not_in_state"
        }
      ],
      "cc_emails": [
        "owner@example.com"
      ],
      "collection_block_status": "none",
      "created_at": "2026-03-21T15:03:00Z",
      "customer_id": "cus_01J00000000000000000000000",
      "due_date": "2026-03-31",
      "footer": null,
      "invoice_id": "inv_01J00000000000000000000000",
      "invoice_number": "1042",
      "is_overdue": false,
      "issued_at": "2026-03-21T15:04:05Z",
      "late_fees": [],
      "memo": null,
      "merchant_id": "mer_01J00000000000000000000000",
      "order_id": "ord_01J00000000000000000000000",
      "po_number": "PO-1042",
      "pricing_amounts": {
        "additive_tax_money": {
          "amount": 500,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "inclusive_tax_money": {
          "amount": 2000,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 14500,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 2500,
          "currency": "USD"
        },
        "total_money": {
          "amount": 15000,
          "currency": "USD"
        }
      },
      "recipient_email": "buyer@example.com",
      "reference": null,
      "refund_status": "none",
      "schedule_entries": [],
      "scheduled_issue_at": null,
      "service_date": null,
      "settlement_amounts": {
        "credited_money": {
          "amount": 0,
          "currency": "USD"
        },
        "currently_due_money": {
          "amount": 15000,
          "currency": "USD"
        },
        "late_fee_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 15000,
          "currency": "USD"
        },
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "written_off_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "snapshot": {
        "buyer_tax_identity": null,
        "customer_display_name": "Avery Buyer",
        "customer_email": "buyer@example.com",
        "line_items": [
          {
            "base_subtotal_money": {
              "amount": 12000,
              "currency": "USD"
            },
            "discount_money": {
              "amount": 0,
              "currency": "USD"
            },
            "invoice_line_item_id": "invli_01KEZF7C00VXZF3JM0JPANVXWR",
            "modifier_total_money": {
              "amount": 0,
              "currency": "USD"
            },
            "name": "Consulting session",
            "order_id": "ord_01J00000000000000000000000",
            "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
            "product_type": null,
            "quantity": 1,
            "subtotal_money": {
              "amount": 12000,
              "currency": "USD"
            },
            "tax_money": {
              "amount": 2000,
              "currency": "USD"
            },
            "total_money": {
              "amount": 12000,
              "currency": "USD"
            },
            "type": "custom",
            "unit_price_money": {
              "amount": 12000,
              "currency": "USD"
            }
          },
          {
            "base_subtotal_money": {
              "amount": 2500,
              "currency": "USD"
            },
            "discount_money": {
              "amount": 0,
              "currency": "USD"
            },
            "invoice_line_item_id": "invli_01KEZF7C00EEHJQZDWNCY60NBP",
            "modifier_total_money": {
              "amount": 0,
              "currency": "USD"
            },
            "name": "Support",
            "order_id": "ord_01J00000000000000000000000",
            "order_line_item_id": "li_01KEZF7C002F1VGGRYGQYEE05K",
            "product_type": null,
            "quantity": 1,
            "subtotal_money": {
              "amount": 2500,
              "currency": "USD"
            },
            "tax_money": {
              "amount": 500,
              "currency": "USD"
            },
            "total_money": {
              "amount": 3000,
              "currency": "USD"
            },
            "type": "custom",
            "unit_price_money": {
              "amount": 2500,
              "currency": "USD"
            }
          }
        ],
        "merchant_display_name": "Flint Services",
        "seller_tax_identity": null,
        "tax_breakdowns": [
          {
            "calculation_type": "percentage",
            "jurisdiction": {
              "code": "GB",
              "country": "GB",
              "level": "country",
              "name": "United Kingdom"
            },
            "order_id": "ord_01J00000000000000000000000",
            "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
            "percent": 20,
            "price_mode": "inclusive",
            "tax_breakdown_id": "txb_01KEZF7C00W6S9E4B2H82KNH8Z",
            "tax_money": {
              "amount": 2000,
              "currency": "USD"
            },
            "tax_type": "vat",
            "taxability_reason": "standard_rated",
            "taxable_money": {
              "amount": 10000,
              "currency": "USD"
            }
          },
          {
            "calculation_type": "percentage",
            "jurisdiction": {
              "code": "GB",
              "country": "GB",
              "level": "country",
              "name": "United Kingdom"
            },
            "order_id": "ord_01J00000000000000000000000",
            "order_line_item_id": "li_01KEZF7C002F1VGGRYGQYEE05K",
            "percent": 20,
            "price_mode": "additive",
            "tax_breakdown_id": "txb_01KEZF7C0006JR90EZ0NBD9TT9",
            "tax_money": {
              "amount": 500,
              "currency": "USD"
            },
            "tax_type": "vat",
            "taxability_reason": "standard_rated",
            "taxable_money": {
              "amount": 2500,
              "currency": "USD"
            }
          }
        ],
        "tax_currency_conversions": [
          {
            "currency": "GBP",
            "exchange_rate": 0.7367567966,
            "rate_date": "2026-03-01",
            "rate_source": "hmrc",
            "tax_money": {
              "amount": 1842,
              "currency": "GBP"
            },
            "taxable_money": {
              "amount": 9209,
              "currency": "GBP"
            }
          }
        ],
        "tax_reverse_charge": null
      },
      "status": "open",
      "subscription_id": null,
      "updated_at": "2026-03-21T15:04:05Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6ZWVPB6K63PR92WFH5HQ1"
}

Get one of the current buyer's invoices#

GET/v1/me/invoices/{invoice_id}

Requires a customer session or an invoice access token

Rate limit: read

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Returns one of the buyer's invoices. A draft invoice fails with `RESOURCE_NOT_FOUND`.

Path parameters

invoice_idstringRequired

Flint invoice ID. Must be a valid ID with prefix inv_. 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 requested invoice.

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/me/invoices/inv_01KEZF7C00A5GEBMWHEAJFSAR4 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The requested invoice.

JSON
{
  "data": {
    "buyer_actions": [
      {
        "is_available": false,
        "is_required": false,
        "kind": "pay",
        "unavailable_reason": "not_in_state"
      }
    ],
    "cc_emails": [
      "owner@example.com"
    ],
    "collection_block_status": "none",
    "created_at": "2026-03-21T15:03:00Z",
    "customer_id": "cus_01J00000000000000000000000",
    "due_date": "2026-03-31",
    "footer": null,
    "invoice_id": "inv_01J00000000000000000000000",
    "invoice_number": "1042",
    "is_overdue": false,
    "issued_at": "2026-03-21T15:04:05Z",
    "late_fees": [],
    "memo": null,
    "merchant_id": "mer_01J00000000000000000000000",
    "order_id": "ord_01J00000000000000000000000",
    "po_number": "PO-1042",
    "pricing_amounts": {
      "additive_tax_money": {
        "amount": 500,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "inclusive_tax_money": {
        "amount": 2000,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "subtotal_money": {
        "amount": 14500,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "total_money": {
        "amount": 15000,
        "currency": "USD"
      }
    },
    "recipient_email": "buyer@example.com",
    "reference": null,
    "refund_status": "none",
    "schedule_entries": [],
    "scheduled_issue_at": null,
    "service_date": null,
    "settlement_amounts": {
      "credited_money": {
        "amount": 0,
        "currency": "USD"
      },
      "currently_due_money": {
        "amount": 15000,
        "currency": "USD"
      },
      "late_fee_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 15000,
        "currency": "USD"
      },
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "written_off_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "snapshot": {
      "buyer_tax_identity": null,
      "customer_display_name": "Avery Buyer",
      "customer_email": "buyer@example.com",
      "line_items": [
        {
          "base_subtotal_money": {
            "amount": 12000,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "invoice_line_item_id": "invli_01KEZF7C00VXZF3JM0JPANVXWR",
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "name": "Consulting session",
          "order_id": "ord_01J00000000000000000000000",
          "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
          "product_type": null,
          "quantity": 1,
          "subtotal_money": {
            "amount": 12000,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 2000,
            "currency": "USD"
          },
          "total_money": {
            "amount": 12000,
            "currency": "USD"
          },
          "type": "custom",
          "unit_price_money": {
            "amount": 12000,
            "currency": "USD"
          }
        },
        {
          "base_subtotal_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "invoice_line_item_id": "invli_01KEZF7C00EEHJQZDWNCY60NBP",
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "name": "Support",
          "order_id": "ord_01J00000000000000000000000",
          "order_line_item_id": "li_01KEZF7C002F1VGGRYGQYEE05K",
          "product_type": null,
          "quantity": 1,
          "subtotal_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 500,
            "currency": "USD"
          },
          "total_money": {
            "amount": 3000,
            "currency": "USD"
          },
          "type": "custom",
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          }
        }
      ],
      "merchant_display_name": "Flint Services",
      "seller_tax_identity": null,
      "tax_breakdowns": [
        {
          "calculation_type": "percentage",
          "jurisdiction": {
            "code": "GB",
            "country": "GB",
            "level": "country",
            "name": "United Kingdom"
          },
          "order_id": "ord_01J00000000000000000000000",
          "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
          "percent": 20,
          "price_mode": "inclusive",
          "tax_breakdown_id": "txb_01KEZF7C00W6S9E4B2H82KNH8Z",
          "tax_money": {
            "amount": 2000,
            "currency": "USD"
          },
          "tax_type": "vat",
          "taxability_reason": "standard_rated",
          "taxable_money": {
            "amount": 10000,
            "currency": "USD"
          }
        },
        {
          "calculation_type": "percentage",
          "jurisdiction": {
            "code": "GB",
            "country": "GB",
            "level": "country",
            "name": "United Kingdom"
          },
          "order_id": "ord_01J00000000000000000000000",
          "order_line_item_id": "li_01KEZF7C002F1VGGRYGQYEE05K",
          "percent": 20,
          "price_mode": "additive",
          "tax_breakdown_id": "txb_01KEZF7C0006JR90EZ0NBD9TT9",
          "tax_money": {
            "amount": 500,
            "currency": "USD"
          },
          "tax_type": "vat",
          "taxability_reason": "standard_rated",
          "taxable_money": {
            "amount": 2500,
            "currency": "USD"
          }
        }
      ],
      "tax_currency_conversions": [
        {
          "currency": "GBP",
          "exchange_rate": 0.7367567966,
          "rate_date": "2026-03-01",
          "rate_source": "hmrc",
          "tax_money": {
            "amount": 1842,
            "currency": "GBP"
          },
          "taxable_money": {
            "amount": 9209,
            "currency": "GBP"
          }
        }
      ],
      "tax_reverse_charge": null
    },
    "status": "open",
    "subscription_id": null,
    "updated_at": "2026-03-21T15:04:05Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6TB13NVC0F6HDW90YZQTD"
}

Download one of the current buyer's invoices#

GET/v1/me/invoices/{invoice_id}/pdf

Requires a customer session or an invoice access token

Rate limit: read

Accepts a customer session, which limits the request to that customer's invoices, or the access token from this invoice's public link, which limits it to this invoice. The request cannot select a customer_id. Returns the invoice document as application/pdf rather than a JSON envelope.

Path parameters

invoice_idstringRequired

Flint invoice ID. Must be a valid ID with prefix inv_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

A PDF document.

Content type application/pdf

curl https://api.withflintpay.com/v1/me/invoices/inv_01KEZF7C00A5GEBMWHEAJFSAR4/pdf \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A PDF document.

Returns application/pdf.

List the buyer's license key activations#

GET/v1/me/license-key-activations

Requires a customer session

Rate limit: read

Lists devices for one accessible license key, newest first. Supply license_key_id. Order and subscription links can list devices for keys on the resource they open. Released activations remain in the list. Default order: created_at descending, then license_key_activation_id descending.

Query parameters

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.

license_key_idstringRequired

The license key whose activations to list.

statusarray of enum

Filter by one or more activation statuses. 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
  • released

Response · 200

The buyer's resource.

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/me/license-key-activations?license_key_id=lk_01KEZF7C000QD7VJ83G43V0NSN" \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer's resource.

JSON
{
  "data": [
    {
      "buyer_actions": [
        {
          "is_available": true,
          "is_required": false,
          "kind": "release"
        }
      ],
      "created_at": "2026-12-01T17:04:11Z",
      "last_validated_at": null,
      "license_key_activation_id": "lka_01KEZF7C00NZEZVCZW3SRDMHTZ",
      "license_key_id": "lk_01M8E2Q4T6V8X0Z2B4D6F8H0JK",
      "name": "Work laptop",
      "product_id": "prod_01M8E2A1B2C3D4E5F6G7H8J9KM",
      "released_at": null,
      "status": "active",
      "variant_id": "var_01M8E2A1B2C3D4E5F6G7H8J9KN"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Release the buyer's license key activation#

POST/v1/me/license-key-activations/{license_key_activation_id}/releaseIdempotent

Requires a customer session

Rate limit: write

Deactivates a device and frees its slot. Requires a full customer session. Send an empty body or {}. An activation that has already been released returns 409 ACTION_NOT_ALLOWED with reason already_applied. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

license_key_activation_idstringRequired

The activation ID. Must be a valid ID with prefix lka_. 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 buyer's resource.

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/me/license-key-activations/lka_01KEZF7C00NZEZVCZW3SRDMHTZ/release \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the buyer's license keys#

GET/v1/me/license-keys

Requires a customer session

Rate limit: read

Lists the current buyer's issued license keys, newest first, including disabled keys. An order filter includes keys from the subscription that order started. An order or subscription link limits results to that resource. The full assigned key is present for verified Flint sign-ins when the verified email matches the order's buyer email, or the subscription customer's email for a subscription with no starting order. A paying checkout's order link or an uncopied link emailed to the order's buyer can show full keys for that order. Merchant-created sessions and links show only the key suffix. Default order: created_at descending, then license_key_id descending.

Query parameters

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.

order_idstring

Exact order ID, including the starting order of a subscription key.

subscription_idstring

Exact subscription ID.

statusarray of enum

Filter by effective license key status. An active key past its expiry matches expired. 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.

  • pending
  • active
  • disabled
  • expired

Response · 200

The buyer's resource.

  • Cache-Control: Prevents storage of this response.
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/me/license-keys \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer's resource.

JSON
{
  "data": [
    {
      "activation_limit": 3,
      "active_activation_count": 0,
      "buyer_actions": [
        {
          "is_available": true,
          "is_required": false,
          "kind": "resend"
        }
      ],
      "created_at": "2026-12-01T17:04:11Z",
      "customer_id": null,
      "expires_at": null,
      "key": "LUMEN-7K2QX-9RMDT-4W8PC-6HNZB-E3VYJ",
      "key_last4": "3VYJ",
      "license_key_id": "lk_01M8E2Q4T6V8X0Z2B4D6F8H0JK",
      "order_id": "ord_01M8E2P0R2S4T6V8W0X2Y4Z6A8",
      "order_line_item_id": "li_01M8E2P0R2S4T6V8W0X2Y4Z6A9",
      "product_id": "prod_01M8E2A1B2C3D4E5F6G7H8J9KM",
      "source": "generated",
      "status": "active",
      "subscription_id": null,
      "subscription_line_item_id": null,
      "unit_ordinal": 1,
      "updated_at": "2026-12-01T17:04:11Z",
      "variant_id": "var_01M8E2A1B2C3D4E5F6G7H8J9KN",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Resend the buyer's license key email#

POST/v1/me/license-keys/{license_key_id}/resendIdempotent

Requires a customer session

Rate limit: external_provider_action

Queues an email to the order's buyer email, or to the subscription customer when there is no starting order. Returns the key's details with its last four characters. Requires a full customer session. Send an empty body or {}. Pending and disabled keys cannot be resent. Email delivery must be enabled and an address must be on file. Flint accepts one resend per key every 60 seconds across buyer and merchant requests. A sooner request returns 429 with Retry-After.

Path parameters

license_key_idstringRequired

The license key ID. Must be a valid ID with prefix lk_. 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 buyer's resource.

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/me/license-keys/lk_01KEZF7C000QD7VJ83G43V0NSN/resend \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the current buyer's orders#

GET/v1/me/orders

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's orders. Default order: created_at descending, then order_id descending.

Query parameters

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.

closed_reasonarray of enum

Why a closed order closed. Matches orders closed for any reason given. 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.

  • invoice_voided
  • paid
  • closed_by_merchant
  • checkout_expired
  • written_off
  • superseded
  • return_resolution_canceled
  • other
statusarray of enum

Order status: open or closed. Selecting open and closed includes both statuses. 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.

  • open
  • closed
payment_statusarray of enum

Filter by settled collection status. 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.

  • unpaid
  • partially_paid
  • paid
refund_statusarray of enum

Filter by refund progress. 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.

  • none
  • partially_refunded
  • refunded
fulfillment_statusarray of enum

Filter by aggregate order fulfillment status. 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.

  • not_fulfilled
  • partially_fulfilled
  • fulfilled
  • canceled
  • not_applicable
  • closed
order_numberstring

Filter by merchant-visible order number.

has_invoiceboolean

Filter by whether invoice_id is set, including a voided invoice. False includes orders with no invoice.

originarray of enum

Separate subscription renewal purchases (subscription) from orders placed through other channels. 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.

  • virtual_terminal
  • payment_link
  • shop
  • checkout
  • api
  • subscription
  • invoice
querystring

Search across order_id, order number, buyer note, and line item names. Text fields match any part of the value, and %, _ and \ are ordinary characters, not wildcards. IDs match from the start and need the type prefix, such as ord_01.

subscription_idstring

Filter by subscription ID.

subscription_delivery_changedboolean

Filter by whether the subscriber changed delivery after this order was paid.

min_amountinteger

Inclusive lower bound on pricing_amounts.total_money.amount. Requires currency.

max_amountinteger

Inclusive upper bound on pricing_amounts.total_money.amount. Requires currency.

currencystring

ISO 4217 currency for min_amount and max_amount.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by order_id.

  • created_at
  • updated_at
  • settlement_amounts.outstanding_money
  • pricing_amounts.total_money
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

A page of orders.

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/me/orders \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of orders.

JSON
{
  "data": [
    {
      "buyer_actions": [
        {
          "is_available": false,
          "is_required": false,
          "kind": "resend_receipt",
          "unavailable_reason": "not_in_state"
        }
      ],
      "charges": [],
      "checkout_session_ids": [],
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "deferred_promotions": [],
      "discounts": [],
      "fulfillments": [],
      "gift_card_settlements": [],
      "gift_card_tender_enabled": false,
      "gift_cards": [],
      "governing_delivery_selection_id": null,
      "invoice_id": null,
      "line_items": [
        {
          "backordered_quantity": 0,
          "base_subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "bundle_components": [],
          "categories": [],
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "expected_ship_date": null,
          "inventory_snapshot": null,
          "license_key_quantity": 0,
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "modifiers": [],
          "name": "General Admission",
          "order_edit_id": null,
          "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
          "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
          "payment_link_line_item_key": "general-admission",
          "product_type": null,
          "purchased_gift_cards": [],
          "quantity": 2,
          "refundable": {
            "discount_money": {
              "amount": 0,
              "currency": "USD"
            },
            "gross_money": {
              "amount": 0,
              "currency": "USD"
            },
            "quantity": 0,
            "tax_money": {
              "amount": 0,
              "currency": "USD"
            },
            "total_money": {
              "amount": 0,
              "currency": "USD"
            }
          },
          "refunded_money": {
            "amount": 0,
            "currency": "USD"
          },
          "refunded_quantity": 0,
          "release_date": null,
          "removed_quantity": 0,
          "selected_options": [],
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "type": "custom",
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          }
        }
      ],
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
      "order_number": "1001",
      "origin": "payment_link",
      "paid_at": null,
      "payment_intent_ids": [],
      "payment_link_id": "pl_01KEZF7C00FEBVYY6R0DKKQRWX",
      "payment_status": "unpaid",
      "prepayment_order_id": null,
      "pricing_amounts": {
        "additive_tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "charge_money": {
          "amount": 0,
          "currency": "USD"
        },
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "inclusive_tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "requested_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "refund_ids": [],
      "refund_status": "none",
      "return_credit_settlements": [],
      "settlement_amounts": {
        "dispute_lost_money": {
          "amount": 0,
          "currency": "USD"
        },
        "disputed_money": {
          "amount": 0,
          "currency": "USD"
        },
        "net_collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "outstanding_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "overpaid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "paid_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "released_money": {
          "amount": 0,
          "currency": "USD"
        },
        "removed_money": {
          "amount": 0,
          "currency": "USD"
        },
        "settled_tip_money": {
          "amount": 0,
          "currency": "USD"
        },
        "written_off_money": {
          "amount": 0,
          "currency": "USD"
        }
      },
      "status": "open",
      "subscription_delivery_number": null,
      "tax": {
        "enabled": false,
        "mode": "automatic",
        "price_mode": "additive",
        "reverse_charge": null,
        "status": "not_required"
      },
      "tips": [],
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 0
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM68H7DQE9QTPEPRCJ4ZXBZ"
}

Get one of the current buyer's orders#

GET/v1/me/orders/{order_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's orders.

Path parameters

order_idstringRequired

Flint order ID. Must be a valid ID with prefix ord_. 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 requested order.

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/me/orders/ord_01KEZF7C0054GQKJ142A8X367A \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The requested order.

JSON
{
  "data": {
    "buyer_actions": [
      {
        "is_available": false,
        "is_required": false,
        "kind": "start_return",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "resend_receipt",
        "unavailable_reason": "not_in_state"
      }
    ],
    "charges": [],
    "checkout_session_ids": [],
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "deferred_promotions": [],
    "discounts": [],
    "fulfillments": [],
    "gift_card_settlements": [],
    "gift_card_tender_enabled": false,
    "gift_cards": [],
    "governing_delivery_selection_id": null,
    "invoice_id": null,
    "line_items": [
      {
        "backordered_quantity": 0,
        "base_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "bundle_components": [],
        "categories": [],
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "expected_ship_date": null,
        "inventory_snapshot": null,
        "license_key_quantity": 0,
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "modifiers": [],
        "name": "General Admission",
        "order_edit_id": null,
        "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
        "order_line_item_id": "li_01KEZF7C004XP0V220YVMGQ354",
        "payment_link_line_item_key": "general-admission",
        "product_type": null,
        "purchased_gift_cards": [],
        "quantity": 2,
        "refundable": {
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "gross_money": {
            "amount": 0,
            "currency": "USD"
          },
          "quantity": 0,
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "total_money": {
            "amount": 0,
            "currency": "USD"
          }
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_quantity": 0,
        "release_date": null,
        "removed_quantity": 0,
        "selected_options": [],
        "subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "type": "custom",
        "unit_price_money": {
          "amount": 2500,
          "currency": "USD"
        }
      }
    ],
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
    "order_number": "1001",
    "origin": "payment_link",
    "paid_at": null,
    "payment_intent_ids": [],
    "payment_link_id": "pl_01KEZF7C00FEBVYY6R0DKKQRWX",
    "payment_status": "unpaid",
    "prepayment_order_id": null,
    "pricing_amounts": {
      "additive_tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "charge_money": {
        "amount": 0,
        "currency": "USD"
      },
      "discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "inclusive_tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "requested_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "refund_ids": [],
    "refund_status": "none",
    "return_credit_settlements": [],
    "settlement_amounts": {
      "dispute_lost_money": {
        "amount": 0,
        "currency": "USD"
      },
      "disputed_money": {
        "amount": 0,
        "currency": "USD"
      },
      "net_collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "outstanding_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "overpaid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "paid_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "released_money": {
        "amount": 0,
        "currency": "USD"
      },
      "removed_money": {
        "amount": 0,
        "currency": "USD"
      },
      "settled_tip_money": {
        "amount": 0,
        "currency": "USD"
      },
      "written_off_money": {
        "amount": 0,
        "currency": "USD"
      }
    },
    "status": "open",
    "subscription_delivery_number": null,
    "tax": {
      "enabled": false,
      "mode": "automatic",
      "price_mode": "additive",
      "reverse_charge": null,
      "status": "not_required"
    },
    "tips": [],
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 0
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM67Q32H15VBMRXQA9VYRDH"
}

List activity for one of the current buyer's orders#

GET/v1/me/orders/{order_id}/activities

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns a read-only, human-readable history log for an order. Use it to render timelines and debug what happened, not as a source of truth, ledger, or webhook replacement. Read the owning resource for authoritative state: the order for balances and status, the payment for payment state, the refund for refund outcomes, and the checkout session for checkout state. Do not sum balance_delta_money to compute an order balance. Informational rows such as payment_failed, refund_failed, and checkout_session_expired have a zero balance delta. The default order is newest first. Use sort_direction=asc for chronological timeline rendering. A typical chronological log might show created, payment_failed, payment, refund, then refund_failed; each row gives one reference to click through for the authoritative resource. Default order: created_at descending, then order_activity_id descending.

Path parameters

order_idstringRequired

Flint order ID. Must be a valid ID with prefix ord_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Query parameters

page_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.

sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
activity_typearray of enum

Filter by activity 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.

  • created
  • dispute_opened
  • dispute_closed
  • line_item_added
  • line_item_updated
  • line_item_removed
  • discount_applied
  • discount_removed
  • tax_updated
  • requested_tip_added
  • requested_tip_updated
  • requested_tip_removed
  • charge_added
  • charge_updated
  • charge_removed
  • charge_fulfillment_updated
  • order_edited
  • payment_review_opened
  • payment_review_closed
  • order_updated
  • adjustment
  • closed
  • payment
  • payment_failed
  • refund
  • refund_failed
  • checkout_session_created
  • checkout_session_expired
  • checkout_session_invalidated
  • fulfillment_created
  • fulfillment_updated
  • fulfillment_state_changed

Response · 200

A page of order activities.

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/me/orders/ord_01KEZF7C0054GQKJ142A8X367A/activities \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of order activities.

JSON
{
  "data": [
    {
      "activity_type": "payment",
      "balance_delta_money": {
        "amount": -5000,
        "currency": "USD"
      },
      "created_at": "2026-03-17T14:35:00Z",
      "description": "Payment received",
      "order_activity_id": "oact_01KEZF7C0007V3W9TZ95D9HSF9",
      "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
      "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
      "running_balance_money": {
        "amount": 0,
        "currency": "USD"
      }
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6G1WPHEA46S2C88M4G4PC"
}

Download order receipt PDF#

GET/v1/me/orders/{order_id}/receipt-pdf

Requires a customer session

Rate limit: read

Downloads a numbered receipt for an order with collected money, covering successful payment intents and gift card redemptions, including payments and refunds. Orders paid only by manual cash, check, or wire invoice payments return 409 ACTION_NOT_ALLOWED with reason unsupported_state; download the invoice PDF instead. Mixed orders list only successful payment intents and gift card redemptions. Available under either order_receipts email delivery mode. Buyer and seller identity is frozen on the first snapshot write; payments, refunds, and branding are current.

Path parameters

order_idstringRequired

Flint order ID. Must be a valid ID with prefix ord_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

A PDF receipt.

Content type application/pdf

curl https://api.withflintpay.com/v1/me/orders/ord_01KEZF7C0054GQKJ142A8X367A/receipt-pdf \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A PDF receipt.

Returns application/pdf.

Send a receipt for one of the current buyer's orders#

POST/v1/me/orders/{order_id}/send-receiptIdempotent

Requires a customer session

Rate limit: external_provider_action

Queues a receipt email for one of your paid orders to the order's email. Requires Flint-managed receipt delivery. Sending is limited to once every five minutes per order and normalized recipient.

Path parameters

order_idstringRequired

Flint order ID. Must be a valid ID with prefix ord_. 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 receipt was queued. The order is unchanged.

Same response as Get one of the current buyer's orders.

curl -X POST https://api.withflintpay.com/v1/me/orders/ord_01KEZF7C0054GQKJ142A8X367A/send-receipt \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the current buyer's packages#

GET/v1/me/packages

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists packages in the buyer's shipments, newest created first. Default order: created_at descending, then package_id descending.

Query parameters

shipment_idstring

Optional shipment ID filter.

fulfillment_idstring

Optional fulfillment ID filter.

order_idstring

Optional order 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.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

statusarray of enum

Filter by package status. Values within this filter are combined with OR. 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.

  • created
  • packed
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • exception
  • returned
  • voided

Response · 200

Packages for the shipment.

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/me/packages \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Packages for the shipment.

JSON
{
  "data": [
    {
      "carrier": "ups",
      "created_at": "2026-05-13T16:01:00Z",
      "dimensions": {
        "height": 4,
        "length": 8,
        "unit": "inch",
        "width": 6
      },
      "expected_delivery_at": "2026-05-15T18:00:00Z",
      "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
      "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
      "package_id": "pkg_01KEZF7C008VJBE6BT0CWZT296",
      "service_code": "ground",
      "shipment_id": "shp_01KEZF7C006DZPA7FGH42HTBY8",
      "status": "created",
      "tracking_number": "1Z999AA10123456784",
      "tracking_url": "https://track.example.com/1Z999AA10123456784",
      "updated_at": "2026-05-13T16:01:00Z",
      "version": 1,
      "weight": {
        "unit": "pound",
        "value": 1.2
      }
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM60PRCBN7P2G22FQVWQJX8"
}

Get one of the current buyer's packages#

GET/v1/me/packages/{package_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's packages.

Path parameters

package_idstringRequired

Flint package ID. Must be a valid ID with prefix pkg_. 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 buyer-visible package.

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/me/packages/pkg_01KEZF7C00ZZA16BJCEJBWKJ5R \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible package.

JSON
{
  "data": {
    "carrier": "ups",
    "created_at": "2026-05-13T16:01:00Z",
    "dimensions": {
      "height": 4,
      "length": 8,
      "unit": "inch",
      "width": 6
    },
    "expected_delivery_at": "2026-05-15T18:00:00Z",
    "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
    "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
    "package_id": "pkg_01KEZF7C008VJBE6BT0CWZT296",
    "service_code": "ground",
    "shipment_id": "shp_01KEZF7C006DZPA7FGH42HTBY8",
    "status": "created",
    "tracking_number": "1Z999AA10123456784",
    "tracking_url": "https://track.example.com/1Z999AA10123456784",
    "updated_at": "2026-05-13T16:01:00Z",
    "version": 1,
    "weight": {
      "unit": "pound",
      "value": 1.2
    }
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List the current buyer's payments#

GET/v1/me/payment-intents

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's payments. Default order: created_at descending, then payment_intent_id descending.

Query parameters

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.

order_idstring

Filter by order ID.

invoice_idstring

Filter by invoice ID.

statusarray of enum

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

  • requires_payment_method
  • requires_confirmation
  • requires_action
  • processing
  • requires_capture
  • canceled
  • succeeded
  • expired
payment_flowarray of enum

Filter by immutable payment flow. Repeat or comma-separate values. 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.

  • checkout
  • payment_link
  • shop
  • invoice
  • subscription_initial
  • subscription_renewal
  • virtual_terminal
  • api
min_amountinteger

Inclusive lower bound on amount_money.amount. Requires currency.

max_amountinteger

Inclusive upper bound on amount_money.amount. Requires currency.

currencystring

ISO 4217 currency for min_amount and max_amount.

refund_statusarray of enum

Exact match on refund_status. Repeat keys or comma-separate values to match any selected status. Combined with dispute_status, both filters must match. 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.

  • none
  • partially_refunded
  • refunded
sort_byenum

Field to sort by. Defaults to created_at; ties are broken by payment_intent_id.

  • created_at
  • updated_at
  • amount_money
  • captured_money
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

A page of payment intents.

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/me/payment-intents \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of payment intents.

JSON
{
  "data": [
    {
      "amount_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "capture_method": "automatic",
      "created_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "customer_presence": "present",
      "last_payment_error": null,
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "payment_flow": "api",
      "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
      "payment_options": [
        "card",
        "apple_pay"
      ],
      "receipt_email": "buyer@example.com",
      "refund_status": "none",
      "statement_descriptor": null,
      "status": "requires_confirmation",
      "support_reference": "",
      "tip_money": null,
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM67FTG4RXF07YCKSP1E187"
}

Get one of the current buyer's payments#

GET/v1/me/payment-intents/{payment_intent_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's payments.

Path parameters

payment_intent_idstringRequired

Flint payment intent ID. Must be a valid ID with prefix pi_. 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 buyer-visible payment.

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/me/payment-intents/pi_01KEZF7C00G8H9D509YEV22P7R \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible payment.

JSON
{
  "data": {
    "amount_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "capture_method": "automatic",
    "created_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "customer_presence": "present",
    "last_payment_error": null,
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "payment_flow": "api",
    "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
    "payment_options": [
      "card",
      "apple_pay"
    ],
    "receipt_email": "buyer@example.com",
    "refund_status": "none",
    "statement_descriptor": null,
    "status": "requires_confirmation",
    "support_reference": "",
    "tip_money": null,
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List the current buyer's payment methods#

GET/v1/me/payment-methods

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists payment methods in every status except archived, newest first. Filter by status=active for the cards you can charge. 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

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.

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/me/payment-methods \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

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"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6E3AB4TVCKB5DQKWPGG8R"
}

Create a payment method for the current buyer#

POST/v1/me/payment-methodsIdempotent

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Starts saving a payment method for the buyer and returns the client setup to confirm in the browser. The payment method is pending until setup succeeds. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

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/me/payment-methods \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "type": "card"
  }'

Get one of the current buyer's payment methods#

GET/v1/me/payment-methods/{payment_method_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's saved payment methods.

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 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/me/payment-methods/pm_01KEZF7C0034B248TXXE4NXYFZ \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

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 one of the current buyer's payment methods#

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

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. 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. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

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 one of the current buyer's payment methods.

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

List the current buyer's refunds#

GET/v1/me/refunds

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's refunds. Default order: created_at descending, then refund_id descending.

Query parameters

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.

order_idstring

Filter by order ID.

statusarray of enum

Filter by refund status. 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.

  • pending
  • succeeded
  • partially_succeeded
  • failed
min_amountinteger

Inclusive lower bound on amount_money.amount. Requires currency.

max_amountinteger

Inclusive upper bound on amount_money.amount. Requires currency.

currencystring

Exact parent refund amount_money.currency filter, with or without amount bounds. Send a three-letter uppercase ISO 4217 code without surrounding whitespace. Amount bounds require currency.

return_idstring

Filter by linked Return ID.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by refund_id.

  • created_at
  • updated_at
  • amount_money
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

A page of refunds.

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/me/refunds \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of refunds.

JSON
{
  "data": [
    {
      "amount_money": {
        "amount": 1000,
        "currency": "USD"
      },
      "created_at": "2026-03-17T14:30:00Z",
      "credit_adjustment_money": {
        "amount": 0,
        "currency": "USD"
      },
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
      "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
      "payment_refunds": [
        {
          "amount_money": {
            "amount": 1000,
            "currency": "USD"
          },
          "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
          "refunded_tip_money": {
            "amount": 100,
            "currency": "USD"
          },
          "status": "succeeded",
          "succeeded_at": "2026-03-17T14:30:00Z"
        }
      ],
      "pending_reason": null,
      "processed_by": "flint",
      "reason": null,
      "refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
      "refunded_tip_money": {
        "amount": 100,
        "currency": "USD"
      },
      "status": "succeeded",
      "succeeded_at": "2026-03-17T14:30:00Z",
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6RSF9689007TWH82V5B5J"
}

Get one of the current buyer's refunds#

GET/v1/me/refunds/{refund_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's refunds.

Path parameters

refund_idstringRequired

Flint refund ID. Must be a valid ID with prefix ref_. 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 buyer-visible refund.

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/me/refunds/ref_01KEZF7C003DTD59WKYHEXYQ1K \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible refund.

JSON
{
  "data": {
    "amount_money": {
      "amount": 1000,
      "currency": "USD"
    },
    "created_at": "2026-03-17T14:30:00Z",
    "credit_adjustment_money": {
      "amount": 0,
      "currency": "USD"
    },
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
    "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
    "payment_refunds": [
      {
        "amount_money": {
          "amount": 1000,
          "currency": "USD"
        },
        "payment_intent_id": "pi_01KEZF7C0050JFFB0HNCWWV1G3",
        "refunded_tip_money": {
          "amount": 100,
          "currency": "USD"
        },
        "status": "succeeded",
        "succeeded_at": "2026-03-17T14:30:00Z"
      }
    ],
    "pending_reason": null,
    "processed_by": "flint",
    "reason": null,
    "refund_id": "ref_01KEZF7C00H2GAMWD73WZ7K81W",
    "refunded_tip_money": {
      "amount": 100,
      "currency": "USD"
    },
    "status": "succeeded",
    "succeeded_at": "2026-03-17T14:30:00Z",
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

List the current buyer's remembered buyers#

GET/v1/me/remembered-buyers

Requires a customer session

Rate limit: read

Lists every working store-reach remembered buyer for the current customer's email at this business, newest last_used_at first, then remembered_buyer_id descending. At most ten working devices exist for the email, so this bounded list returns every result without pagination. Flint-reach identities are never listed. Requires a full customer session. code_channel is omitted. Default order: last_used_at descending, then remembered_buyer_id descending.

Response · 200

The current buyer's store-reach remembered identities.

dataarray of objectRequired

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/me/remembered-buyers \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The current buyer's store-reach remembered identities.

JSON
{
  "data": [
    {
      "created_at": "2026-08-02T16:00:00Z",
      "email": "m•••@example.com",
      "expires_at": "2026-10-31T16:00:00Z",
      "last_used_at": "2026-08-02T16:05:00Z",
      "remembered_buyer_id": "rbuy_01K00000000000000000000000",
      "supported_actions": [
        "revoke"
      ]
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Forget one of the current buyer's remembered buyers#

POST/v1/me/remembered-buyers/{remembered_buyer_id}/revokeIdempotent

Requires a customer session

Rate limit: sensitive_write

Ends one working store-reach remembered buyer for the current customer's email at this business. Returns its final masked resource with no supported actions and without code_channel. Flint-reach identities, another business's identities and ended identities return 404 RESOURCE_NOT_FOUND. Saved cards stay saved. Requires a full customer session. Accepts an empty body or {}.

Path parameters

remembered_buyer_idstringRequired

Remembered buyer to forget. Must be a valid ID with prefix rbuy_. 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 current buyer's store-reach remembered identities.

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/me/remembered-buyers/rbuy_01KEZF7C006G3NNTKE2C2ZTVM0/revoke \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Preview Return eligibility or resolution amounts for the current buyer#

POST/v1/me/return-previews

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Preview return eligibility or resolution amounts without creating a Return or reserving quantity. Set mode to eligibility or resolution and send the matching input object.

Request body

Send exactly one of these

The `eligibility` variant of `BuyerCreateReturnPreviewRequest`.

eligibilityobjectRequired

The eligibility check. Present when `mode` is `eligibility`.

modeenumRequired

Which preview to run.

  • eligibility

Response · 200

Successful response.

dataone ofRequired

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/me/return-previews \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "eligibility": {
      "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0",
      "selection": {
        "line_items": [
          {
            "order_line_item_id": "li_01KEZF7C00XM6VK5KNWVC3T907",
            "requested_quantity": 1,
            "return_reason_id": "rrsn_01KEZF7C005274REWXTZRJ4BM0"
          }
        ],
        "selection_type": "line_items"
      }
    },
    "mode": "eligibility"
  }'

Get one of the current buyer's Return resolutions#

GET/v1/me/return-resolutions/{return_resolution_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns a buyer-visible Return resolution, including the amount the buyer needs to pay. Use the checkout_session action to pay its balance.

Path parameters

return_resolution_idstringRequired

Flint return resolution id. Must be a valid ID with prefix retres_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

Successful response.

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/me/return-resolutions/retres_01KEZF7C00C7RZJN31W9SGMEQ3 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Successful response.

JSON
{
  "data": {
    "adjustments": [],
    "buyer_payment_amount_money": {
      "amount": 1500,
      "currency": "USD"
    },
    "buyer_refund_amount_money": {
      "amount": 0,
      "currency": "USD"
    },
    "confirmed_at": "2026-09-09T00:00:00Z",
    "created_at": "2026-09-08T00:00:00Z",
    "credit_adjustment_money": {
      "amount": 0,
      "currency": "USD"
    },
    "deduction_money": {
      "amount": 0,
      "currency": "USD"
    },
    "execution_blockers": [],
    "fulfilled_at": "2026-09-09T00:00:00Z",
    "line_items": [
      {
        "quantity": 1,
        "release_timing": "after_receipt",
        "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
        "return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
        "return_resolution_id": "retres_01KEZF7C00VBZRA9H0NN82A4S9",
        "return_resolution_line_item_id": "retresli_01J00000000000000000000000",
        "returned_total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      }
    ],
    "metadata": {},
    "pricing_basis": "original_price",
    "replacement_line_items": [
      {
        "discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "name": "Linen shirt, large",
        "quantity": 1,
        "return_replacement_line_item_id": "retrepli_01J00000000000000000000000",
        "return_resolution_id": "retres_01KEZF7C00VBZRA9H0NN82A4S9",
        "subtotal_money": {
          "amount": 6500,
          "currency": "USD"
        },
        "tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "total_money": {
          "amount": 6500,
          "currency": "USD"
        },
        "unit_price_money": {
          "amount": 6500,
          "currency": "USD"
        }
      }
    ],
    "replacement_total_money": {
      "amount": 6500,
      "currency": "USD"
    },
    "resolution_type": "exchange",
    "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
    "return_resolution_id": "retres_01KEZF7C00VBZRA9H0NN82A4S9",
    "returned_total_money": {
      "amount": 5000,
      "currency": "USD"
    },
    "status": "completed",
    "updated_at": "2026-09-09T00:00:00Z",
    "version": 2
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6VJA2F3XPY7CB6E1HSNSJ"
}

List the current buyer's Returns#

GET/v1/me/returns

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's Returns. Filter by order, return number, reason, status, decision, merchandise, resolution, or creation and update time. Default order: created_at descending, then return_id descending.

Query parameters

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

decision_statusarray of enum

Filter by decision status. 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.

  • pending
  • approved
  • partially_approved
  • declined
idempotency_keystring

Filter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.

merchandise_statusarray of enum

Filter by merchandise status. 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.

  • not_required
  • awaiting_handoff
  • in_transit
  • partially_received
  • inspection_required
  • partially_inspected
  • inspection_review_required
  • disposition_required
  • resolved
  • exception
order_idstring

Filter by order id.

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.

resolution_statusarray of enum

Filter by resolution status. 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.

  • not_selected
  • pending
  • partially_completed
  • requires_action
  • completed
  • failed
return_numberstring

Filter by return number.

return_reason_idstring

Filter by return reason id.

statusarray of enum

Filter by status. 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.

  • requested
  • open
  • completed
  • declined
  • canceled
updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

Successful response.

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/me/returns \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Successful response.

JSON
{
  "data": [
    {
      "buyer_actions": [
        {
          "is_available": true,
          "is_required": false,
          "kind": "withdraw"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "ship_items",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "pay_balance",
          "unavailable_reason": "not_in_state"
        }
      ],
      "completion_blockers": [],
      "completion_mode": "automatic",
      "created_at": "2026-09-07T00:00:00Z",
      "decision_status": "pending",
      "financial_summary": {
        "collected_money": {
          "amount": 0,
          "currency": "USD"
        },
        "credit_adjustment_money": {
          "amount": 0,
          "currency": "USD"
        },
        "deduction_money": {
          "amount": 0,
          "currency": "USD"
        },
        "due_from_buyer_money": {
          "amount": 0,
          "currency": "USD"
        },
        "due_to_buyer_money": {
          "amount": 0,
          "currency": "USD"
        },
        "refunded_money": {
          "amount": 0,
          "currency": "USD"
        },
        "replacement_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "returned_discount_money": {
          "amount": 0,
          "currency": "USD"
        },
        "returned_subtotal_money": {
          "amount": 5000,
          "currency": "USD"
        },
        "returned_tax_money": {
          "amount": 0,
          "currency": "USD"
        },
        "returned_total_money": {
          "amount": 5000,
          "currency": "USD"
        }
      },
      "handoff_requirements": [],
      "idempotency_key": null,
      "initiated_by": "buyer",
      "line_items": [
        {
          "accepted_quantity": 0,
          "allowed_resolution_types": [
            "refund",
            "exchange"
          ],
          "approved_quantity": 0,
          "available_resolution_quantity": 0,
          "bundle_components": [],
          "buyer_note": "I changed my mind.",
          "canceled_quantity": 0,
          "created_at": "2026-09-07T00:00:00Z",
          "declined_quantity": 0,
          "dispositioned_quantity": 0,
          "eligibility": {
            "allowed_resolution_types": [
              "refund",
              "exchange"
            ],
            "eligible_quantity": 1,
            "policy_adjustment_proposals": [],
            "reason": "eligible_under_policy",
            "reason_message": "Eligible under the return policy.",
            "return_shipping_payer": null,
            "status": "eligible"
          },
          "fulfillment_id": "ful_01KEZF7C003HMXBX7F9B69B7AY",
          "handed_off_quantity": 0,
          "inspected_quantity": 0,
          "is_inspection_required": false,
          "is_policy_overridden": false,
          "merchandise_status": "not_required",
          "modifiers": [],
          "name": "Linen shirt",
          "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0",
          "order_line_item_id": "li_01KEZF7C00XM6VK5KNWVC3T907",
          "received_quantity": 0,
          "rejected_quantity": 0,
          "requested_quantity": 1,
          "requested_resolution_type": "refund",
          "resolution_status": "not_selected",
          "resolved_quantity": 0,
          "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
          "return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
          "return_reason_handle": "changed_mind",
          "return_reason_id": "rrsn_01KEZF7C005274REWXTZRJ4BM0",
          "return_reason_name": "Changed mind",
          "return_required_quantity": 0,
          "return_resolution_ids": [],
          "return_value": {
            "discount_money": {
              "amount": 0,
              "currency": "USD"
            },
            "subtotal_money": {
              "amount": 5000,
              "currency": "USD"
            },
            "tax_money": {
              "amount": 0,
              "currency": "USD"
            },
            "total_money": {
              "amount": 5000,
              "currency": "USD"
            },
            "unit_price_money": {
              "amount": 5000,
              "currency": "USD"
            }
          },
          "review_required_quantity": 0,
          "selected_options": [],
          "status": "requested",
          "updated_at": "2026-09-07T00:00:00Z"
        }
      ],
      "merchandise_status": "not_required",
      "metadata": {},
      "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0",
      "resolution_status": "not_selected",
      "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
      "return_number": "1001",
      "return_resolution_ids": [],
      "status": "requested",
      "updated_at": "2026-09-07T00:00:00Z",
      "version": 1
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Create a Return for the current buyer#

POST/v1/me/returnsKey required

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Requests a Return for one of the buyer's orders. An active return policy must cover each line and leave the requested quantity eligible, or the request fails with `ACTION_NOT_ALLOWED` and reason `not_offered`. Check can_buyer_request with POST /v1/me/return-previews first. The buyer's reason must be active and apply to the line, and a policy that sends the request to review leaves the Return waiting for the store's decision. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Request body

line_itemsarray of objectRequired

The lines to check or return, each naming an order line item.

order_idstringRequired

ID of the Order to return items from.

Response · 201

Successful response.

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/me/returns \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "buyer_note": "I changed my mind.",
        "order_line_item_id": "li_01KEZF7C00XM6VK5KNWVC3T907",
        "requested_quantity": 1,
        "requested_resolution_type": "refund",
        "return_reason_id": "rrsn_01KEZF7C005274REWXTZRJ4BM0"
      }
    ],
    "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0"
  }'

Get one of the current buyer's Returns#

GET/v1/me/returns/{return_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's Returns.

Path parameters

return_idstringRequired

Flint return id. Must be a valid ID with prefix ret_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 200

Successful response.

Same response as Create a Return for the current buyer.

curl https://api.withflintpay.com/v1/me/returns/ret_01KEZF7C00PG93650ZKVQNGF7X \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Successful response.

JSON
{
  "data": {
    "buyer_actions": [],
    "completion_blockers": [],
    "completion_mode": "automatic",
    "created_at": "2026-09-07T00:00:00Z",
    "decision_status": "pending",
    "financial_summary": {
      "collected_money": {
        "amount": 0,
        "currency": "USD"
      },
      "credit_adjustment_money": {
        "amount": 0,
        "currency": "USD"
      },
      "deduction_money": {
        "amount": 0,
        "currency": "USD"
      },
      "due_from_buyer_money": {
        "amount": 0,
        "currency": "USD"
      },
      "due_to_buyer_money": {
        "amount": 0,
        "currency": "USD"
      },
      "refunded_money": {
        "amount": 0,
        "currency": "USD"
      },
      "replacement_total_money": {
        "amount": 0,
        "currency": "USD"
      },
      "returned_discount_money": {
        "amount": 0,
        "currency": "USD"
      },
      "returned_subtotal_money": {
        "amount": 5000,
        "currency": "USD"
      },
      "returned_tax_money": {
        "amount": 0,
        "currency": "USD"
      },
      "returned_total_money": {
        "amount": 5000,
        "currency": "USD"
      }
    },
    "handoff_requirements": [],
    "idempotency_key": null,
    "initiated_by": "buyer",
    "line_items": [
      {
        "accepted_quantity": 0,
        "allowed_resolution_types": [
          "refund",
          "exchange"
        ],
        "approved_quantity": 0,
        "available_resolution_quantity": 0,
        "bundle_components": [],
        "canceled_quantity": 0,
        "created_at": "2026-09-07T00:00:00Z",
        "declined_quantity": 0,
        "dispositioned_quantity": 0,
        "eligibility": {
          "allowed_resolution_types": [
            "refund",
            "exchange"
          ],
          "eligible_quantity": 1,
          "policy_adjustment_proposals": [],
          "reason": "eligible_under_policy",
          "reason_message": "Eligible under the return policy.",
          "return_shipping_payer": null,
          "status": "eligible"
        },
        "fulfillment_id": "ful_01KEZF7C003HMXBX7F9B69B7AY",
        "handed_off_quantity": 0,
        "inspected_quantity": 0,
        "is_inspection_required": false,
        "is_policy_overridden": false,
        "merchandise_status": "not_required",
        "modifiers": [],
        "name": "Linen shirt",
        "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0",
        "order_line_item_id": "li_01KEZF7C00XM6VK5KNWVC3T907",
        "received_quantity": 0,
        "rejected_quantity": 0,
        "requested_quantity": 1,
        "requested_resolution_type": "exchange",
        "resolution_status": "not_selected",
        "resolved_quantity": 0,
        "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
        "return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
        "return_reason_handle": "changed_mind",
        "return_reason_id": "rrsn_01KEZF7C005274REWXTZRJ4BM0",
        "return_reason_name": "Changed mind",
        "return_required_quantity": 0,
        "return_resolution_ids": [],
        "return_value": {
          "discount_money": {
            "amount": 0,
            "currency": "USD"
          },
          "subtotal_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "tax_money": {
            "amount": 0,
            "currency": "USD"
          },
          "total_money": {
            "amount": 5000,
            "currency": "USD"
          },
          "unit_price_money": {
            "amount": 5000,
            "currency": "USD"
          }
        },
        "review_required_quantity": 0,
        "selected_options": [],
        "status": "requested",
        "updated_at": "2026-09-07T00:00:00Z"
      }
    ],
    "merchandise_status": "not_required",
    "metadata": {},
    "order_id": "ord_01KEZF7C00RWKW7JDYTZ5A6ET0",
    "resolution_status": "not_selected",
    "return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
    "return_number": "1001",
    "return_resolution_ids": [],
    "status": "requested",
    "updated_at": "2026-09-07T00:00:00Z",
    "version": 1
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6BBGJCBSBQGB43TQD9RAK"
}

Cancel one of the current buyer's Returns#

POST/v1/me/returns/{return_id}/cancelIdempotent

Requires a customer session

Rate limit: write

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Cancel a Return before any merchandise or value work commits. Cancellation is refused once a receipt, inspection, disposition, or resolution exists. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

return_idstringRequired

Flint return id. Must be a valid ID with prefix ret_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

reasonenum

The buyer withdrew the Return request. Defaults to buyer_request when omitted.

  • buyer_request
reason_messagestring

Optional detail about why the buyer withdrew the Return.

Response · 200

Successful response.

Same response as Create a Return for the current buyer.

curl -X POST https://api.withflintpay.com/v1/me/returns/ret_01KEZF7C00PG93650ZKVQNGF7X/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "reason": "buyer_request"
  }'

Revoke the current customer session#

POST/v1/me/session/revokeIdempotent

Requires a customer session

Rate limit: sensitive_write

Signs out the current customer session using its current server-held secret, including after expiry, after revocation, or after its parent buyer session or grant ended. Repeating the call preserves revoked_at. A secret rotated away by refresh is invalid. Flint Account buyer sessions remain independent.

Response · 200

The revoked customer session, without credentials.

dataobjectRequired

The customer session, including its status and credential expiry times.

metaobject

Metadata about this response, including idempotency replay and warnings when present.

request_idstringRequired

ID of this API request. Include it when asking Flint to investigate the response.

curl -X POST https://api.withflintpay.com/v1/me/session/revoke \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

List the current buyer's shipments#

GET/v1/me/shipments

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists shipments for the buyer's orders and Returns, newest created first. Default order: created_at descending, then shipment_id descending.

Query parameters

order_idstring

Optional order ID filter.

fulfillment_idstring

Optional fulfillment 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.

return_idstring

Filter by linked Return ID.

handed_off_afterstring

Inclusive lower bound on handed_off_at.

handed_off_beforestring

Exclusive upper bound on handed_off_at.

created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

statusarray of enum

Filter by package-derived shipment status. Values within this filter are combined with OR. 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.

  • created
  • packed
  • shipped
  • in_transit
  • out_for_delivery
  • delivered
  • delivery_attempted
  • exception
  • returned
  • voided

Response · 200

Shipments for the fulfillment.

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/me/shipments \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

Shipments for the fulfillment.

JSON
{
  "data": [
    {
      "created_at": "2026-05-13T15:59:00Z",
      "direction": "outbound",
      "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
      "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
      "package_count": 1,
      "shipment_id": "shp_01KEZF7C006DZPA7FGH42HTBY8",
      "shipped_at": "2026-05-13T16:10:00Z",
      "status": "shipped",
      "updated_at": "2026-05-13T16:10:01Z",
      "version": 4
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6CWG0VP44G0HE2XX53VAF"
}

Get one of the current buyer's shipments#

GET/v1/me/shipments/{shipment_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's shipments.

Path parameters

shipment_idstringRequired

Flint shipment ID. Must be a valid ID with prefix shp_. 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 buyer-visible shipment.

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/me/shipments/shp_01KEZF7C00Q2AFXWXHMCDR3F68 \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer-visible shipment.

JSON
{
  "data": {
    "created_at": "2026-05-13T15:59:00Z",
    "direction": "outbound",
    "fulfillment_id": "ful_01KEZF7C009TD0XN8YPHHHXQFR",
    "order_id": "ord_01KEZF7C006M16GC2D8HRRC30T",
    "package_count": 1,
    "shipment_id": "shp_01KEZF7C006DZPA7FGH42HTBY8",
    "shipped_at": "2026-05-13T16:10:00Z",
    "status": "shipped",
    "updated_at": "2026-05-13T16:10:01Z",
    "version": 4
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Preview subscription#

POST/v1/me/subscription-previews

Requires a customer session

Rate limit: write

Estimates a buyer's next subscription renewal, an offered plan change, or a quantity change, or lists delivery methods and rates for a proposed destination, without changing the subscription. plan_change uses the selected plan_change_options entry's billing_starts and the same checks and pricing as change-plan, including unused paid item credit when billing starts now or prorated_now. quantity_change accepts the change-quantity inputs with billing_starts prorated_now and returns the charge change-quantity would collect now, with the same refusals: only adjustable lines within min_quantity and max_quantity, and only eligible digital lines. next_renewal includes recurring promotions, shipping, and tax for the next charged cycle. Its optional swap applies a proposed subscription_line_item_id and variant_id with the same eligibility and current pricing as the buyer line-item update, without saving it. The optional swap.expected_version fences the version. Omit delivery when proposing a swap. Tax is null when tax can't be calculated yet; a tax service failure returns 502 EXTERNAL_SERVICE_ERROR. Requires a full buyer session. In delivery_options, shipping_countries lists countries potentially served by the subscription shipping and local delivery methods; omit destination on the buyer preview to read coverage before entering an address. Other address, cart, customer and rate checks still apply. A preview does not reserve inventory or guarantee a future shipping rate.

Request body

Send exactly one of these

The `delivery_options` variant of `CreateMeSubscriptionPreviewRequest`.

destinationone of

Address to evaluate each method against: one of the customer's saved addresses or a new address.

modeenumRequired

Selects the delivery options preview.

  • delivery_options
subscription_idstringRequired

ID of the subscription to list delivery methods for.

Response · 200

Subscription result.

dataone ofRequired

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/me/subscription-previews \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "delivery": {
      "delivery_method_id": "dmet_01K1P6G4M7H2N8Q9R3S5T6V7WX",
      "destination": {
        "customer_address_id": "caddr_01KEZF7C00K2Q127FBJAXWB0FP",
        "type": "customer_address"
      },
      "type": "shipment"
    },
    "mode": "next_renewal",
    "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW"
  }'

List the current buyer's subscriptions#

GET/v1/me/subscriptions

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Lists the buyer's subscriptions. Subscriptions without a next_billing_at never match next_billing_after or next_billing_before, and sort last with sort_by=next_billing_at in either direction. subscription_plan is always included without expand: the plan's current summary, or null when the subscription has no plan. Default order: created_at descending, then subscription_id descending.

Query parameters

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.

statusarray of enum

Filter by subscription status. 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.

  • trialing
  • active
  • paused
  • past_due
  • canceled
  • incomplete
  • scheduled
billing_schedule_ownerarray of enum

Separate subscriptions scheduled by Flint (flint) from those whose billing dates the store supplies (external). 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.

  • flint
  • external
cancel_at_period_endboolean

When true, returns subscriptions scheduled to cancel at the end of the current period that are not yet canceled. When false, returns every other subscription.

delivery_method_idstring

Filter by the subscription's selected delivery method.

hold_reasonarray of enum

Find subscriptions needing a new delivery method, address, or rate by the current delivery_hold reason. Does not match upcoming delivery issues. 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.

  • method_unavailable
  • destination_not_served
  • rate_unavailable
subscription_plan_idstring

Filter by Flint subscription plan ID.

sort_byenum

Field to sort by. Defaults to created_at; ties are broken by subscription_id.

  • created_at
  • updated_at
  • next_billing_at
sort_directionenum

Sort direction. Defaults to desc.

  • asc
  • desc
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

next_billing_afterstring

Inclusive lower bound on next_billing_at.

next_billing_beforestring

Exclusive upper bound on next_billing_at.

needs_attentionboolean

Load subscriptions needing your attention. True matches subscriptions with a delivery hold, an upcoming delivery hold, or a delivery-action-required pause, plus past_due subscriptions and active or incomplete subscriptions whose billing date passed more than 24 hours ago without payment. False is the exact complement. Other filters still apply.

Response · 200

A page of subscriptions.

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/me/subscriptions \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of subscriptions.

JSON
{
  "data": [
    {
      "billing_anchor_day": 15,
      "billing_interval": "monthly",
      "billing_interval_count": 1,
      "billing_schedule_owner": "flint",
      "buyer_actions": [
        {
          "is_available": true,
          "is_required": false,
          "kind": "cancel"
        },
        {
          "is_available": true,
          "is_required": false,
          "kind": "pause"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "resume",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "reactivate",
          "unavailable_reason": "not_in_state"
        },
        {
          "due_at": "2026-04-17T14:30:00Z",
          "is_available": true,
          "is_required": true,
          "kind": "update_payment_method"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "retry_payment",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "update_delivery",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "skip",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "update_billing_interval",
          "unavailable_reason": "store_policy"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "update_quantity",
          "unavailable_reason": "store_policy"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "swap_items",
          "unavailable_reason": "store_policy"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "change_plan",
          "unavailable_reason": "store_policy"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "cancel_plan_change",
          "unavailable_reason": "not_in_state"
        },
        {
          "is_available": false,
          "is_required": false,
          "kind": "renew",
          "unavailable_reason": "not_in_state"
        }
      ],
      "cancel_at_period_end": false,
      "completed_cycles": 0,
      "created_at": "2026-03-17T14:30:00Z",
      "current_period_end_at": "2026-04-17T14:30:00Z",
      "current_period_start_at": "2026-03-17T14:30:00Z",
      "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
      "deliveries_per_period": 1,
      "delivery_interval": null,
      "delivery_interval_count": null,
      "end_after": null,
      "expires_at": null,
      "gift_recipient": null,
      "line_items": [
        {
          "allow_quantity_adjustment": false,
          "base_subtotal_money": {
            "amount": 4500,
            "currency": "USD"
          },
          "modifier_total_money": {
            "amount": 0,
            "currency": "USD"
          },
          "name": "Membership",
          "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
          "quantity": 1,
          "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
          "subscription_line_item_id": "sli_01KEZF7C00VQ081BX7W2T96R71",
          "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
          "subtotal_money": {
            "amount": 4500,
            "currency": "USD"
          },
          "type": "variant",
          "unit_price_money": {
            "amount": 4500,
            "currency": "USD"
          },
          "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
        }
      ],
      "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
      "next_billing_at": "2026-04-17T14:30:00Z",
      "next_delivery_at": null,
      "next_retry_at": null,
      "paused_delivery_hold": null,
      "payment_method_due_at": null,
      "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM",
      "plan_change_options": [],
      "promotions": [],
      "prorate_first_period": false,
      "recurring_subtotal_money": {
        "amount": 4500,
        "currency": "USD"
      },
      "remaining_cycles": null,
      "remaining_prepaid_deliveries": 0,
      "resume_requested_at": null,
      "scheduled_cancel_at": null,
      "scheduled_plan_change": null,
      "scheduled_promotions": [],
      "scheduled_resume_at": null,
      "status": "active",
      "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
      "subscription_plan": {
        "billing_interval": "monthly",
        "billing_interval_count": 1,
        "created_at": "2026-03-17T14:30:00Z",
        "currency": "USD",
        "line_items": [
          {
            "allow_quantity_adjustment": false,
            "name": "Membership",
            "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
            "quantity": 1,
            "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
            "swap_variant_ids": [],
            "swap_variants": [],
            "type": "variant",
            "unit_price_money": {
              "amount": 2500,
              "currency": "USD"
            },
            "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
          }
        ],
        "name": "Monthly Membership",
        "status": "active",
        "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
        "updated_at": "2026-03-17T14:30:00Z"
      },
      "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
      "terms_type": "subscription_plan",
      "updated_at": "2026-03-17T14:30:00Z",
      "version": 0
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6QYF5VGB7TJ7M7YJES8FB"
}

Get one of the current buyer's subscriptions#

GET/v1/me/subscriptions/{subscription_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Returns one of the buyer's subscriptions. subscription_plan is always included without expand: the plan's current summary, or null when the subscription has no plan.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. 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 requested subscription.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The requested subscription.

JSON
{
  "data": {
    "billing_anchor_day": 15,
    "billing_interval": "monthly",
    "billing_interval_count": 1,
    "billing_schedule_owner": "flint",
    "buyer_actions": [
      {
        "is_available": true,
        "is_required": false,
        "kind": "cancel"
      },
      {
        "is_available": true,
        "is_required": false,
        "kind": "pause"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "resume",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "reactivate",
        "unavailable_reason": "not_in_state"
      },
      {
        "due_at": "2026-04-17T14:30:00Z",
        "is_available": true,
        "is_required": true,
        "kind": "update_payment_method"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "retry_payment",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "update_delivery",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "skip",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "update_billing_interval",
        "unavailable_reason": "store_policy"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "update_quantity",
        "unavailable_reason": "store_policy"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "swap_items",
        "unavailable_reason": "store_policy"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "change_plan",
        "unavailable_reason": "store_policy"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "cancel_plan_change",
        "unavailable_reason": "not_in_state"
      },
      {
        "is_available": false,
        "is_required": false,
        "kind": "renew",
        "unavailable_reason": "not_in_state"
      }
    ],
    "cancel_at_period_end": false,
    "completed_cycles": 0,
    "created_at": "2026-03-17T14:30:00Z",
    "current_period_end_at": "2026-04-17T14:30:00Z",
    "current_period_start_at": "2026-03-17T14:30:00Z",
    "customer_id": "cus_01KEZF7C003ACYXT6Q5EQZ78EE",
    "deliveries_per_period": 1,
    "delivery_interval": null,
    "delivery_interval_count": null,
    "end_after": null,
    "expires_at": null,
    "gift_recipient": null,
    "line_items": [
      {
        "allow_quantity_adjustment": false,
        "base_subtotal_money": {
          "amount": 4500,
          "currency": "USD"
        },
        "modifier_total_money": {
          "amount": 0,
          "currency": "USD"
        },
        "name": "Membership",
        "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
        "quantity": 1,
        "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
        "subscription_line_item_id": "sli_01KEZF7C00VQ081BX7W2T96R71",
        "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
        "subtotal_money": {
          "amount": 4500,
          "currency": "USD"
        },
        "type": "variant",
        "unit_price_money": {
          "amount": 4500,
          "currency": "USD"
        },
        "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
      }
    ],
    "merchant_id": "mer_01KEZF7C00MPP0T9S0KH5BB4CC",
    "next_billing_at": "2026-04-17T14:30:00Z",
    "next_delivery_at": null,
    "next_retry_at": null,
    "paused_delivery_hold": null,
    "payment_method_due_at": null,
    "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM",
    "plan_change_options": [],
    "promotions": [],
    "prorate_first_period": false,
    "recurring_subtotal_money": {
      "amount": 4500,
      "currency": "USD"
    },
    "remaining_cycles": null,
    "remaining_prepaid_deliveries": 0,
    "resume_requested_at": null,
    "scheduled_cancel_at": null,
    "scheduled_plan_change": null,
    "scheduled_promotions": [],
    "scheduled_resume_at": null,
    "status": "active",
    "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
    "subscription_plan": {
      "billing_interval": "monthly",
      "billing_interval_count": 1,
      "created_at": "2026-03-17T14:30:00Z",
      "currency": "USD",
      "line_items": [
        {
          "allow_quantity_adjustment": false,
          "name": "Membership",
          "product_id": "prod_01KEZF7C00027JTCXQ7TQF86X8",
          "quantity": 1,
          "subscription_plan_line_item_id": "spli_01KEZF7C00CEPTZ7FN2H9F4SF9",
          "swap_variant_ids": [],
          "swap_variants": [],
          "type": "variant",
          "unit_price_money": {
            "amount": 2500,
            "currency": "USD"
          },
          "variant_id": "var_01KEZF7C00SDPKNHP9DAVYBQZ9"
        }
      ],
      "name": "Monthly Membership",
      "status": "active",
      "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
      "updated_at": "2026-03-17T14:30:00Z"
    },
    "subscription_plan_id": "plan_01KEZF7C00S177Q3KK6BKXGXV7",
    "terms_type": "subscription_plan",
    "updated_at": "2026-03-17T14:30:00Z",
    "version": 0
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6D9Q35HGA0B1DFFN82FN6"
}

Update subscription#

PATCH/v1/me/subscriptions/{subscription_id}Idempotent

Requires a customer session

Rate limit: write

Updates payment_method_id, cancel_at_period_end: false, scheduled_plan_change: null, delivery and billing interval when the matching buyer action is available. If a retained card is unusable, undoing cancellation requires a usable replacement in payment_method_id; otherwise ACTION_NOT_ALLOWED has reason payment_method_required. Send billing_interval and billing_interval_count together. Mixed changes commit atomically. A scoped card-update session may send only payment_method_id and expected_version. Send expected_version to reject concurrent changes. A card whose setup hasn't finished fails with `ACTION_NOT_ALLOWED` and reason `status_not_reached`. Once setup finishes, send a new request with a new idempotency key. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

billing_intervalenum

New billing interval unit. Send it with `billing_interval_count`; the pair must be one the subscription's `billing_interval_options` offer. It applies from the next renewal that has not been paid, and it is refused while a plan change is scheduled. Not accepted as null.

  • daily
  • weekly
  • monthly
  • yearly
billing_interval_countinteger

Number of `billing_interval` units between charges, from 1 to 365. Send it with `billing_interval`. Not accepted as null.

cancel_at_period_endenum

Send `false` to undo a scheduled cancellation. `true` isn't accepted: schedule a cancellation with POST /v1/me/subscriptions/{subscription_id}/cancel. Not accepted as null.

  • false
deliveryobject

Replaces the whole saved delivery preference. The delivery method must be one the subscription's plan offers. Not accepted as null.

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

payment_method_idstring

ID of the saved payment method to charge for renewals. It must belong to the subscription's customer, be active, and allow charges without the buyer present. Not accepted as null.

scheduled_plan_changeenum or null

Send null to cancel a scheduled plan change and keep the current plan. Omit to leave it unchanged. Schedule or replace through change-plan.

  • null

Response · 200

The updated subscription.

Same response as Get one of the current buyer's subscriptions.

curl -X PATCH https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "payment_method_id": "pm_01KEZF7C00WX8CKEVFDMRMYMBM"
  }'

Cancel one of the current buyer's subscriptions#

POST/v1/me/subscriptions/{subscription_id}/cancelIdempotent

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Cancels a subscription and records who asked, why, and when in cancellation_details. With cancel_immediately: true it ends now. Otherwise, trialing ends at trial_end_at, active at current_period_end_at (or now when a renewal delivery hold has expired), and past_due at next_retry_at instead of that retry. Scheduled, incomplete, paused, and past_due without next_retry_at require cancel_immediately: true or fail with `ACTION_NOT_ALLOWED` and reason `period_end_unavailable`. Paid deliveries extend a scheduled cancellation to the last paid delivery when it is later. A merchant can cancel immediately without an automatic refund. A buyer cannot cancel immediately while prepaid deliveries remain and period-end cancellation is available; the refusal reason is `prepaid_deliveries_remaining`. Read scheduled_cancel_at for the scheduled end time. A buyer's cancellation follows the store's customer_account.buyer_capabilities. Send expected_version to reject a concurrent change. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

cancel_immediatelyboolean

When true, ends the subscription now. Otherwise, schedules cancellation at trial_end_at while trialing, current_period_end_at while active, or next_retry_at while past_due, instead of that charge. An active subscription with an expired renewal delivery hold ends now. A scheduled, incomplete, or paused subscription, or a past_due subscription without next_retry_at, requires cancel_immediately: true; otherwise returns 409 ACTION_NOT_ALLOWED with reason period_end_unavailable. A buyer may cancel immediately when the store allows buyer_chooses or no scheduled cancellation time is available. Under end_of_period, a trial continues until trial_end_at.

cancellation_commentstring

Free text about the cancellation, up to 500 characters after surrounding spaces are trimmed. Recorded in cancellation_details.comment, which only merchant credentials read.

cancellation_reason_codeenum

Optional. Why the subscription is being canceled. When the store lists customer_account.buyer_capabilities.cancellation_reasons, a reason a buyer sends must be one of them; merchant credentials may send any code. Recorded in cancellation_details.reason_code.

  • too_expensive
  • missing_features
  • switched_service
  • unused
  • customer_service
  • too_complex
  • low_quality
  • other
expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

Response · 200

The canceled subscription state.

Same response as Get one of the current buyer's subscriptions.

curl -X POST https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/cancel \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "cancel_immediately": false,
    "cancellation_reason_code": "too_expensive"
  }'

Change subscription plan#

POST/v1/me/subscriptions/{subscription_id}/change-planKey required

Requires a customer session

Rate limit: external_provider_action

Changes to a plan in the subscription's plan_change_options. Flint uses that option's billing_starts: now charges a new period with credit for unused paid item time and changes the plan only when payment succeeds; prorated_now charges the difference for the rest of the current period, keeps the period and anchor, and requires an unchanged interval; next_renewal changes the plan immediately without charging and keeps the current period and next billing date. Omit the interval pair to keep the current interval when the target plan offers it, otherwise use the target default. Requires a full buyer session and Idempotency-Key. Send expected_version to reject a concurrent change. Retry with the same key to recover the same result. Returns 200 including on decline, with the unchanged subscription, a closed unpaid order, and a failed order_payment_attempt. Inspect order_payment_attempt.last_payment_error before trying again. The order and order_payment_attempt are null when billing starts at the next renewal. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

billing_intervalenum

Send with billing_interval_count to choose a target plan option. Omit both to keep the current interval if the target offers that pair, otherwise use the target plan's default interval and count.

  • daily
  • weekly
  • monthly
  • yearly
billing_interval_countinteger

Required when billing_interval is sent; billing_interval is required when this field is sent.

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

subscription_plan_idstringRequired

The target subscription plan.

Response · 200

The subscription and any immediate billing outcome, including a declined payment.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/change-plan \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "billing_interval": "monthly",
    "billing_interval_count": 1,
    "expected_version": 1,
    "subscription_plan_id": "plan_01KEZF7C00H4XP3KVYSYYWA181"
  }'

Change subscription quantity#

POST/v1/me/subscriptions/{subscription_id}/change-quantityKey required

Requires a customer session

Rate limit: external_provider_action

Changes the frozen adjustable subscription line within its min_quantity and max_quantity. Requires a full buyer session and Idempotency-Key. period_end schedules quantities for the next billing boundary using scheduled_plan_change; PATCH scheduled_plan_change to null to cancel. prorated_now charges the difference now for an eligible digital line and keeps the period and billing anchor. Physical quantities require period_end. Refuses with plan_change_scheduled while another change is pending. Retry with the same key to recover the original result. Returns 200 on decline with unchanged subscription; inspect order_payment_attempt.last_payment_error. The order and order_payment_attempt are null for period_end or zero net charge. Send expected_version to reject concurrent changes. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

billing_startsenumRequired

period_end schedules the new quantities for the next billing boundary; prorated_now charges the difference now for an eligible digital line.

  • period_end
  • prorated_now
expected_versioninteger

Reject the request if the subscription version has changed.

line_itemsarray of objectRequired

The frozen adjustable subscription line and its quantity, within min_quantity and max_quantity. Omitted lines keep their quantities.

Response · 200

The subscription and any immediate billing outcome, including a declined payment.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/change-quantity \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "billing_starts": "period_end",
    "expected_version": 1,
    "line_items": [
      {
        "quantity": 2,
        "subscription_line_item_id": "sli_01KEZF7C00VQ081BX7W2T96R71"
      }
    ]
  }'

Swap subscription variant#

PATCH/v1/me/subscriptions/{subscription_id}/line-items/{subscription_line_item_id}Idempotent

Requires a customer session

Rate limit: write

Swaps a subscription line to an offered variant for future renewals. Requires a full buyer session. Send expected_version to reject concurrent changes. The replacement must remain deliverable to the subscription destination. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

subscription_line_item_idstringRequired

Subscription line item ID. Must be a valid ID with prefix sli_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

variant_idstringRequired

ID of the variant to swap the line to. It must be the line's own variant or one of the swap variants its plan line allows. The line keeps its quantity and is priced from the variant's catalog price for the subscription's customer.

Response · 200

Subscription result.

Same response as Get one of the current buyer's subscriptions.

curl -X PATCH https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/line-items/sli_01KEZF7C00PPWVJ2N321V84ASA \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1,
    "variant_id": "var_01KEZF7C00RRMRMT530BRR5T71"
  }'

Pause one of the current buyer's subscriptions#

POST/v1/me/subscriptions/{subscription_id}/pauseIdempotent

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Pauses a subscription immediately. pause_duration_cycles counts delivery intervals on prepaid subscriptions and billing intervals otherwise; omit it for an indefinite pause. A pause with a duration resumes automatically at scheduled_resume_at. Repeating the stored pause length returns the paused subscription; a different length returns ACTION_NOT_ALLOWED with reason field_locked and param pause_duration_cycles and requires resuming first. A buyer's pause follows the store's customer_account.buyer_capabilities. Send expected_version to reject a concurrent change. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

pause_duration_cyclesinteger

Billing cycles to pause for, at least 1. Omit it to pause until the subscription is resumed. A pause with a duration resumes automatically at scheduled_resume_at. Repeating the same pause length returns the paused subscription; changing the length requires resuming first. When the store's customer_account.buyer_capabilities.pause.max_cycles is set, a buyer must send a value from 1 to that limit.

Response · 200

The paused subscription.

Same response as Get one of the current buyer's subscriptions.

curl -X POST https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/pause \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "pause_duration_cycles": 2
  }'

List payment retries for one of the current buyer's subscriptions#

GET/v1/me/subscriptions/{subscription_id}/payment-retries

Requires a customer session

Rate limit: read

Returns a subscription's manual payment retries, newest first. Default order: created_at descending, then subscription_payment_retry_id descending.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Query parameters

page_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.

idempotency_keystring

Filter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns only resources created in your caller namespace, plus resources created before caller scoping under the original key. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect. A match can show `idempotency_key: null` when that request sent no key, Flint created the resource, the reader isn't the caller that created it (another app install, a buyer, or the merchant reading an app's or buyer's record), or the caller that created an older record is unknown.

Response · 200

A page of the current buyer's retry attempts.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/payment-retries \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

A page of the current buyer's retry attempts.

JSON
{
  "data": [
    {
      "created_at": "2026-04-17T14:31:00Z",
      "idempotency_key": null,
      "status": "pending",
      "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
      "subscription_payment_retry_id": "spr_01KEZF7C00S62WNPD7F6JKSQC7",
      "updated_at": "2026-04-17T14:31:00Z"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}

Retry the failed payment on one of the current buyer's subscriptions#

POST/v1/me/subscriptions/{subscription_id}/payment-retriesKey required

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. Starts one manual collection attempt on a past-due subscription. Send no body, or an empty object. Poll the returned retry for the outcome. While cancellation is scheduled, a new buyer retry fails with `ACTION_NOT_ALLOWED` and reason `cancellation_scheduled`, with `current_status` `past_due`. First use PATCH /v1/me/subscriptions/{subscription_id} with cancel_at_period_end false to keep the subscription; retry_payment becomes available again if the other retry conditions allow it. Only one retry may be in progress at a time. Buyers can start a retry while fewer than 3 retries have been created for the current billing period, counting the store's retries too. subscription_card_update email-link sessions can start retries. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Response · 201

The durable retry attempt.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/payment-retries \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{}'

Get a payment retry for one of the current buyer's subscriptions#

GET/v1/me/subscriptions/{subscription_id}/payment-retries/{subscription_payment_retry_id}

Requires a customer session

Rate limit: read

Uses the customer identity fixed by the customer session. Returns one durable manual subscription payment retry.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

subscription_payment_retry_idstringRequired

Flint subscription payment retry ID. Must be a valid ID with prefix spr_. 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 retry attempt.

Same response as Retry the failed payment on one of the current buyer's subscriptions.

curl https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/payment-retries/spr_01KEZF7C00YXMSBXGYEMYDD0AA \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The retry attempt.

JSON
{
  "data": {
    "created_at": "2026-04-17T14:31:00Z",
    "idempotency_key": null,
    "status": "pending",
    "subscription_id": "sub_01KEZF7C00XFDKARBRFQGP4ZCW",
    "subscription_payment_retry_id": "spr_01KEZF7C00S62WNPD7F6JKSQC7",
    "updated_at": "2026-04-17T14:31:00Z"
  },
  "meta": {
    "api_version": "2026-09-07"
  },
  "request_id": "req_01KWM6QH71CPMT36PXDQXGCWAK"
}

Renew subscription now#

POST/v1/me/subscriptions/{subscription_id}/renewKey required

Requires a customer session

Rate limit: external_provider_action

Starts a new billing period now and schedules the next charge one billing interval later. Ships the renewal when the subscription has delivery. For subscriptions without delivery, Flint credits unused paid item time against the charge. Available while the subscription is active on a Flint-owned billing schedule (billing_schedule_owner is flint), is not set to cancel at the end of its period, is not in a trial, and has no delivery hold or renewal in progress. The subscription's payment method must be active and allow off-session charges. Requires a full buyer session and an idempotency key. Send expected_version to reject concurrent changes. Retry with the same key to recover the same attempt. Returns the subscription, renewal order, and payment attempt, including when the payment is declined. Inspect order_payment_attempt.last_payment_error for a failed payment. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

Response · 200

Subscription result.

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/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/renew \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1
  }'

Resume one of the current buyer's subscriptions#

POST/v1/me/subscriptions/{subscription_id}/resumeIdempotent

Requires a customer session

Rate limit: external_provider_action

Uses the customer identity fixed by the customer session. The request cannot select a customer_id. Asks Flint to resume a paused subscription. The request is accepted while the subscription is still paused, with `resume_requested_at` set. Flint then makes it active, or past_due while an overdue period is collected, and sends subscription.resumed. While prepaid deliveries remain, resuming makes no charge and shifts later deliveries and the next charge by the length of the pause. If Flint can't resume it, it stays paused, resume_requested_at clears, and Flint sends subscription.updated. Any other status fails with `ACTION_NOT_ALLOWED`. To undo a scheduled cancellation, PATCH the subscription with cancel_at_period_end set to false. When the store cannot accept payments, a new payment fails with 409 MERCHANT_NOT_READY and reason processing_restricted. Changes billed at a future renewal remain available. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Flint subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

Response · 202

The paused subscription with its pending resume request.

  • Retry-After: Whole seconds to wait before retrying or polling again, at least 1.

Same response as Get one of the current buyer's subscriptions.

curl -X POST https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/resume \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1
  }'

Skip subscription cycle#

POST/v1/me/subscriptions/{subscription_id}/skip-cycleIdempotent

Requires a customer session

Rate limit: write

While prepaid deliveries remain, defers the next delivery and next charge by one delivery interval without consuming a delivery. Otherwise skips the next renewal without charging or shipping and moves the next billing date forward by one billing interval while preserving billing_anchor_day, including in shorter months. Available when buyer skipping is enabled and the subscription is active on a Flint-owned billing schedule (billing_schedule_owner is flint), is not set to cancel at the end of its period, and is under the store's consecutive skip limit. Requires a full buyer session. Send expected_version to reject concurrent changes. A closed store is read-only: commerce changes fail with 409 ACTION_NOT_ALLOWED and reason terminal_status. Receipts and order history remain readable.

Path parameters

subscription_idstringRequired

Subscription ID. Must be a valid ID with prefix sub_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.

Request body

expected_versioninteger

Version last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.

Response · 200

Subscription result.

Same response as Get one of the current buyer's subscriptions.

curl -X POST https://api.withflintpay.com/v1/me/subscriptions/sub_01KEZF7C00BVRE8YDBXQB74BBM/skip-cycle \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_version": 1
  }'

List the current buyer's tickets#

GET/v1/me/tickets

Requires a customer session

Rate limit: read

Lists the event tickets on the buyer's orders, newest first, with each ticket's admission code for showing its QR code. Voided tickets are listed without an admission code. Admission codes go only to buyers Flint verified: a buyer session whose email Flint confirmed (hosted sign-in or the paid checkout's sign-in), on orders whose buyer_email is that email, or an order link from the paying checkout or emailed to the order's buyer_email. Merchant access links, customer sessions created with an API key, and checkout links a merchant reads or requests after payment list the tickets without admission codes; use rotate-code to deliver tickets yourself. Default order: created_at descending, then ticket_id descending.

Query parameters

order_idstring

Only tickets belonging to this order. Another buyer's order returns no tickets.

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.

Response · 200

The buyer's tickets.

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/me/tickets \
  -H "Flint-Version: 2026-09-07" \
  -H "Authorization: Bearer YOUR_CUSTOMER_SESSION_TOKEN"

The buyer's tickets.

JSON
{
  "data": [
    {
      "admission_code": "0123456789ABCDEF",
      "attendee_name": null,
      "checked_in_at": null,
      "created_at": "2026-07-03T14:30:00Z",
      "event": {
        "location": "Pier 57, New York",
        "name": "Spring Gala",
        "starts_at": "2026-05-12T19:00:00Z",
        "timezone": "America/New_York"
      },
      "order_id": "ord_01KEZF7C00JBKMARG3P06Z224B",
      "status": "issued",
      "ticket_id": "tkt_01J00000000000000000000000",
      "ticket_number": "GAL001",
      "tier_name": "General admission"
    }
  ],
  "meta": {
    "api_version": "2026-09-07"
  },
  "next_page_token": "example",
  "request_id": "req_01KWM6TE63VRVPCMCMA65Y34ER"
}

Was this helpful?