Overview

Flint is a payments API built around the sale. One HTTP API at https://api.withflintpay.com 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. If you want a working payment before reading further, Accept your first payment gets you there with one curl request and a browser.

QuickstartAccept your first paymentCreate a payment link with one API request, pay it on a Flint-hosted checkout page with a test card, and find the payment in your dashboard. No frontend code.
Your test API key

Sign in and we'll fill your sandbox test key into every code example automatically.

No account yet? Request access, or run flint signup.

Test card

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

The order is the record of the sale#

Every payment in Flint settles against an order. The order holds the line items, discounts, fees, tip, and tax, plus two sets of amounts: what is owed and what has been collected or refunded. Flint computes the totals from what you add to the order.

Money reaches the order through one of the surfaces below. They differ in who starts the payment and when it is due. The order is the same whichever one you pick.

ObjectWhat it isGuide
OrderThe sale: line items, totals, and payment stateWhy Flint is orders-first
ProductWhat you sell. Line items name one of its variants, or a bundle, and get their price from the catalogCatalog setup
Checkout sessionA Flint-hosted payment page for one order and one buyerCheckout sessions
Payment intentOne attempt to collect money, in your own UI with Stripe ElementsEmbedded Payments
Payment linkA reusable URL that creates a new order for each buyer who paysPayment links
InvoiceA bill against an order, with a due date, reminders, and a PDFInvoicing
SubscriptionA plan and a saved payment method that create an order every billing cycleSubscription billing
RefundMoney returned against an orderRefunds
CustomerA buyer with saved payment methods and a hosted account for orders, returns, and subscriptionsCustomer accounts

Whichever surface collected the money, the order is what you read afterward. Its payment_status and settlement_amounts say what has been paid, refunded, and is still outstanding. Refunds, webhooks, reports, and support all key on order_id.

Payment links, checkout sessions, and invoices are the three hosted ways to collect. A payment link shares one URL among many buyers, a checkout session collects from one buyer right now, and an invoice bills a balance that is due later. Payment links vs checkout sessions vs invoices walks through the choice.

If you are coming from Stripe or Square, the shift is that those APIs start from the charge and Flint starts from the order. Migrating from Stripe and Migrating from Square map the objects field by field.

What every request shares#

  • One base URL and a secret key. Every request goes to https://api.withflintpay.com with your key in the Authorization: Bearer header. Every Flint key is secret and belongs on your server. See Authentication.
  • Your key selects test or live. A flint_test_... key runs against a sandbox with its own test data. A flint_live_... key charges real money. Same hostname, same request shapes. In test mode, card 4242 4242 4242 4242 with any future expiry and any CVC completes a checkout.
  • Money is an integer in minor units. {"amount": 2500, "currency": "USD"} is $25.00. See Money & currency.
  • IDs carry a prefix. ord_, cs_, pi_, inv_, and ref_ tell you what an id refers to at a glance.
  • Request bodies are JSON, up to 1 MiB. Send them with Content-Type: application/json. A body over 1,048,576 bytes fails with 413 and the REQUEST_BODY_TOO_LARGE code, so split a larger write into several requests, such as adding an order's line items in batches.
  • Every response uses the same envelope. A success returns your object or array under data, with a request_id and a meta object. Lists add a next_page_token for pagination. A failure returns an error with type, code, message, and a request_id. See Error handling.
  • Writes accept an Idempotency-Key header. Retry with the same key and you get the original result instead of a duplicate. See Idempotency.
  • Webhooks tell your backend what happened. Flint sends a signed POST to your URL and retries until your server confirms receipt. Fulfill from the order.paid event, not from the browser redirect. See Webhooks.

One request shows most of these at once:

cURL
curl -X POST https://api.withflintpay.com/v1/orders \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: order-mug-001" \
  -d '{
    "line_items": [{
      "name": "Ceramic mug",
      "quantity": 1,
      "inventory_requirement": "not_tracked",
      "unit_price_money": {"amount": 2500, "currency": "USD"}
    }]
  }'
Response
{
  "data": {
    "order_id": "ord_1kmn0aExample",
    "status": "open",
    "payment_status": "unpaid",
    "pricing_amounts": {
      "total_money": {"amount": 2500, "currency": "USD"}
    },
    "settlement_amounts": {
      "outstanding_money": {"amount": 2500, "currency": "USD"}
    },
    "line_items": [...]
  },
  "request_id": "0b8f2b26-9c1e-4f6a-8d35-7e4a2c9b1d60",
  "meta": {"api_version": "2026-02-01"}
}

Tools#

  • SDKs. @flintpay/node and flintpay/flint give TypeScript, JavaScript, and PHP integrations typed request and response shapes over every public operation.
  • CLI. Each flint API command maps to a /v1 route, and flint listen forwards your sandbox's webhook events to localhost without a public tunnel.
  • AI agents. A docs MCP server that lets an agent search the Flint docs and pull the request and response schema for any endpoint, a single-file API reference at /SKILL.md, and the OpenAPI spec at /v1/openapi.json.
  • API & agent onboarding. For integrations that provision merchants themselves: create the merchant account and mint its first sandbox key from your backend.

Where to start#

  1. Accept your first payment: create a payment link, pay it with a test card, and find the payment in your dashboard.
  2. Sandboxes & test mode: where your test data lives and what SANDBOX_SELECTION_REQUIRED means.
  3. Pick a surface. Payment links vs checkout sessions vs invoices for hosted collection, or Embedded payments with Stripe Elements for your own UI.
  4. Webhooks: receive order.paid and the other events your integration acts on.
  5. Error handling and Idempotency: retry safely and branch on error codes.
  6. Testing: test cards for declines and 3D Secure, then refunds and renewals against your sandbox.
  7. Going live: finish verification, mint a live key, and cut over.

Was this helpful?