Skip to content
Developer documentation

Every payment settles against an order

One HTTP API takes card, Apple Pay, Google Pay, Affirm, and ACH debit payments on a Flint-hosted checkout page or inside your own UI. The same API sends invoices, bills subscriptions, and handles the refunds, returns, and disputes that follow. The order records what was sold, what was paid, and what is still owed.

Base URL

https://api.withflintpay.com

Test and live requests share one host. The key decides the mode.

Authentication

Authorization: Bearer flint_test_…

A flint_test_ key runs against a sandbox with its own data. A flint_live_ key charges real money. Keys belong on your server. See Authentication.

Test card

4242 4242 4242 4242

Any future expiry, any CVC. Works on every test-mode checkout. See Testing for declines and 3D Secure.

Start building

How a payment flows

Your backend creates an order, then a checkout session for it, and sends the buyer to the session's hosted page. Flint collects the payment and posts a signed order.paid event to your webhook endpoint. Fetch the order and fulfill from that event, not from the browser redirect: a buyer can close the tab before the redirect fires.

Payment links, embedded payments, invoices, and subscriptions change how the money is collected. They all end in the same paid order. Its payment_status and settlement_amounts report what was paid, refunded, and is still outstanding, and refunds, webhooks, and reports all key on the order id.

Hosted checkout, order to paidResponse
Your backendFlintBuyerPOST /v1/ordersorder, payment_status unpaidPOST /v1/checkout-sessionscheckout_session.urlredirect to checkout_session.urlpays on the hosted checkout pageorder.paid webhookGET /v1/orders/{order_id}payment_status paid
  1. Your backend sends POST /v1/orders to Flint
  2. Flint returns order, payment_status unpaid to Your backend
  3. Your backend sends POST /v1/checkout-sessions to Flint
  4. Flint returns checkout_session.url to Your backend
  5. Your backend sends redirect to checkout_session.url to Buyer
  6. Buyer sends pays on the hosted checkout page to Flint
  7. Flint sends order.paid webhook to Your backend
  8. Your backend sends GET /v1/orders/{order_id} to Flint
  9. Flint returns payment_status paid to Your backend

Tools

Every guide shows the HTTP request. These drive the same API from code, a terminal, or an AI agent.

Typed clients for Node.js and PHP, generated from the OpenAPI contract. Both carry your secret key, so they belong on a server.

npm install @flintpay/node
composer require flintpay/flint

Each API command maps to a /v1 route. flint listen forwards your sandbox's webhook events to localhost without a public tunnel.

npm install -g @flintpay/cli

An AI agent connected to it searches the Flint docs and pulls the request and response schema for any endpoint. Read-only, and no API key is involved.

https://developers.withflintpay.com/mcp

One file with every endpoint, field, and lifecycle for an assistant's context window, and the OpenAPI 3.1 spec for code generation.

https://developers.withflintpay.com/SKILL.md
https://api.withflintpay.com/v1/openapi.json

Guides

Grouped by the job you are doing.

Open the docs

Checkout and payment links

Hosted collection surfaces and how to choose between them.

Order pricing

Tips, fees, tax, and discounts on the order.

Headless

Own the checkout, the buyer account, or both, on your own domain.

Returns

Take merchandise back, and settle what the buyer is owed.

Catalog and fulfillment

Model what you sell, track stock per location, then ship, hand over, or deliver what was paid for.

Invoicing and subscriptions

Bill a balance that is due later, correct it without moving money, and run plans, renewals, and failed-payment recovery.

Customer accounts

Where buyers track orders, manage subscriptions, and start returns.

Reliability

Webhooks, retries, and failure handling.

Operations

Run Flint in production: money movement and disputes.

Migrations

Field-by-field maps from Stripe and Square objects to Flint's.

Agents and partner apps

Build agentic integrations, and partner apps that merchants install on their Flint account.

API reference

Every resource, endpoint by endpoint, with request and response shapes.

Open the reference