Skip to content

Stripe vs Order-First Payment APIs: Who Owns the Order?

Stripe charges an amount. An order-first payment API like Flint charges an order. What that changes for refunds, tax, stock, and webhooks, with code.
Comparison15 min readBy Flint Pay, Product & API Team

Stripe is a charge-first payment API. Its core object, the PaymentIntent, needs two things: an amount and a currency. What the buyer bought, which discount applied, how much of the total was tax, and which items came back later all live in your database, and an ID in metadata joins the two records.

An order-first payment API reverses that. You create the order first, with its line items, discounts, and tax, and the API computes the total. Checkout, invoices, and saved-card charges collect money against that order, and refunds, stock, and webhooks all point back to it.

Flint is an order-first payment API, and it runs on Stripe's card processing. So this isn't a contest between two processors. Stripe moves the money either way. The question is which system holds the record of the sale: one you build around Stripe, or one the API already keeps.

At a glance#

First object you createCharge-first (Stripe)A PaymentIntent with an amount, or a Checkout SessionOrder-first (Flint)An order with line items: POST /v1/orders
Who computes the totalCharge-first (Stripe)Your code, or Checkout from the prices you passOrder-first (Flint)Flint, on the server, after discounts and tax
Where the sale lives after paymentCharge-first (Stripe)Your database, joined by an ID in metadataOrder-first (Flint)The order, which keeps line items and balances
Refund one itemCharge-first (Stripe)An amount against a charge or PaymentIntentOrder-first (Flint)A line item and a quantity; Flint works out its discount and tax
Discount codesCharge-first (Stripe)Up to one per Checkout SessionOrder-first (Flint)Codes and automatic promotions that stack by rules you set
StockCharge-first (Stripe)A count you keepOrder-first (Flint)Held when the order is paid, committed on success, released on failure
Fulfillment triggerCharge-first (Stripe)checkout.session.completed, plus the async event for bank paymentsOrder-first (Flint)order.paid, on every surface
Pay later, same saleCharge-first (Stripe)A new invoice rebuilt from the cartOrder-first (Flint)An invoice against the same order_id
Payout reconciliationCharge-first (Stripe)Balance transactions joined to your orders through metadataOrder-first (Flint)Balance transactions that carry order_id

Every Stripe entry comes from Stripe's documentation; the sources are at the end of the post.

What charge-first and order-first mean#

Charge-first: the payment is the record#

In a charge-first API, the central object is a request to move money. Stripe's PaymentIntent requires an amount in the smallest currency unit and a currency, and everything else is optional. Stripe's fulfillment guide lays out what happens after a Checkout payment: your server retrieves the session with its line items, checks payment_status, fulfills, and records that it did. Among the optional jobs it lists are "Save a copy of the payment details and line items in your own database" and "Update inventory or stock records."

That is the charge-first model working as designed. Stripe is the record of the money. You are the record of the sale.

Stripe did once offer an order object. The original Orders API was deprecated in 2019, and the 2022 replacement was removed from the Node SDK in version 11.0.0, released 2022-11-15, alongside the SKU resource. Does Stripe have an Orders API? has the full history.

Stripe does carry line items, in three places#

A fair comparison has to say where Stripe already stores item detail, because developers run into all three:

  • Checkout Sessions take up to 100 line items. After payment, each one reports amount_subtotal, amount_discount, amount_tax, and amount_total, and you can list them from the session.
  • Invoices have line items, and a credit note can target an invoice line item when you refund part of an invoice.
  • PaymentIntents accept amount_details.line_items, up to 200 of them, for Level 2 and Level 3 card data. You supply the product names, unit costs, and tax, and Stripe checks the arithmetic before sending them to the card networks.

None of these is an order you operate on. Checkout's line items are a snapshot of one session. The invoice is a bill, and one-time Checkout payments don't create one by default. The PaymentIntent's line items describe the charge to the card network. And the refund API takes a charge or PaymentIntent and an amount on every path: no parameter names a line item, and nothing on the refund records which item came back.

Order-first: the payment settles against the order#

In Flint, the order holds the sale and two separate sets of numbers:

  • pricing_amounts: what is owed. Subtotal, discounts, tax, tip, and total.
  • settlement_amounts: what has happened to the money. paid_money, refunded_money, and outstanding_money.

Everything that moves money attaches to the order. A checkout session is one buyer's hosted page for it. A payment intent is one attempt in your own UI with Stripe Elements. An invoice bills its balance with a due date. A payment link creates a new order for each buyer, and each subscription renewal is an order too, so a renewal refunds and reports like any other sale. Why Flint is orders-first walks one order from creation to paid.

The same sale, both ways#

Here is one order to follow through both models. The buyer is in Austin, Texas, where the combined sales tax rate is 8.25%:

LinePrice10% codeTaxable8.25% tax
2 stoneware mugs at $24.00$48.00-$4.80$43.20$3.56
1 pour-over kettle$68.00-$6.80$61.20$5.05
Order total$116.00-$11.60$104.40$8.61

The buyer pays $113.01. A week later, one mug comes back.

On Stripe#

Checkout computes the discount and, with Stripe Tax on, the tax. When the webhook arrives, your handler fetches the session's line items and writes them to your own tables, because the fulfillment guide leaves that to you. The handler has to be safe to run twice for the same session, even at the same moment, since Stripe can deliver the event more than once.

When the mug comes back, the arithmetic is yours. The mug line reports amount_subtotal 4800, amount_discount 480, and amount_tax 356 for two units, so one mug is 2400 - 240 + 178 = 2338 cents. Then:

cURL
curl https://api.stripe.com/v1/refunds \
  -u "sk_test_...:" \
  -d payment_intent=pi_3Example \
  -d amount=2338 \
  -d reason=requested_by_customer

Stripe records a $23.38 refund on the payment. Recording that it was one mug, so nobody refunds the same mug again or restocks it twice, is a write to your own database. If your code refunds the $24.00 shelf price instead, the buyer gets back 62 cents more than they paid for the mug. Add 8.25% to the shelf price and you're $2.60 over. If the line's tax had come to an odd number of cents, your code would also decide which unit gets the extra cent.

On Flint#

Create the order with the lines, the code, and the buyer's address. Flint applies the promotion, splits it across the lines, and calculates each line's sales tax after the discount. "fulfillment": {"requirement": "none"} keeps the example to payment and refunds; Delivery options covers lines that ship:

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-cart-5521" \
  -d '{
    "external_reference_id": "cart-5521",
    "line_items": [
      {
        "type": "custom",
        "name": "Stoneware mug",
        "quantity": 2,
        "unit_price_money": {"amount": 2400, "currency": "USD"},
        "fulfillment": {"requirement": "none"},
        "tax": {"taxable": true, "line_item_tax_category": "physical_goods"}
      },
      {
        "type": "custom",
        "name": "Pour-over kettle",
        "quantity": 1,
        "unit_price_money": {"amount": 6800, "currency": "USD"},
        "fulfillment": {"requirement": "none"},
        "tax": {"taxable": true, "line_item_tax_category": "physical_goods"}
      }
    ],
    "discounts": [{"promotion": {"promotion_code": "SAVE10"}}],
    "tax": {
      "enabled": true,
      "calculation": {"mode": "automatic", "price_mode": "additive"},
      "location": {
        "address_source": "provided",
        "address_type": "shipping_address",
        "address": {
          "line1": "500 E Cesar Chavez St",
          "city": "Austin",
          "state": "TX",
          "postal_code": "78701",
          "country": "US"
        }
      }
    }
  }'

Open a hosted checkout for it with POST /v1/checkout-sessions and "order_id", or collect the card in your own page with Stripe Elements. When the mug comes back, name the line and the quantity:

cURL
curl -X POST https://api.withflintpay.com/v1/refunds \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: refund-cart-5521-mug" \
  -d '{
    "refund_type": "targets",
    "order_id": "ord_1kmn0aExample",
    "reason": "customer_changed_mind",
    "line_items": [
      {"order_line_item_id": "li_1kmn0aExample", "quantity": 1}
    ]
  }'

The refund comes back with the arithmetic already done:

Response
{
  "line_item_allocations": [
    {
      "order_line_item_id": "li_1kmn0aExample",
      "quantity": 1,
      "refunded_money": {"amount": 2338, "currency": "USD"},
      "tax_refund_mode": "automatic",
      "automatic_refund": {
        "subtotal_money": {"amount": 2400, "currency": "USD"},
        "discount_money": {"amount": 240, "currency": "USD"},
        "tax_money": {"amount": 178, "currency": "USD"},
        "total_money": {"amount": 2338, "currency": "USD"}
      }
    }
  ]
}

The mug line now shows refunded_quantity: 1, and the order's refund_status is partially_refunded while its payment_status stays paid. Refunding more mugs than the line has left fails with 409 LIMIT_EXCEEDED, so the same mug can't be refunded twice. Refunds covers amount refunds, restocking fees, and store credit, and Stripe partial refunds works through the discount and tax math in more detail.

What changes after the payment#

The first payment looks about the same in both models. The differences show up in everything that happens to the sale afterward.

Fulfillment: assemble the sale, or read it#

Stripe's fulfillment guide asks for a function that survives repeat and concurrent calls, retrieves the session with its line items, checks the payment status, fulfills, and records that it did. For bank payments it also has to listen for checkout.session.async_payment_succeeded, because the session completes before the money settles. Here is that function with the database writes filled in, next to the whole handler on Flint:

TypeScript
import Stripe from "stripe";

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);

export async function POST(request: Request) {
  const event = stripe.webhooks.constructEvent(
    await request.text(),
    request.headers.get("stripe-signature")!,
    process.env.STRIPE_WEBHOOK_SECRET!,
  );

  if (
    event.type === "checkout.session.completed" ||
    event.type === "checkout.session.async_payment_succeeded"
  ) {
    await fulfillCheckout(event.data.object.id);
  }
  return new Response(null, { status: 200 });
}

// must be safe to call twice, even at the same time, for one session
async function fulfillCheckout(sessionId: string) {
  const session = await stripe.checkout.sessions.retrieve(sessionId, {
    expand: ["line_items"],
  });
  if (session.payment_status === "unpaid") return;

  await db.transaction(async (tx) => {
    if (await tx.orders.findBySession(sessionId)) return; // already done

    const order = await tx.orders.insert({ sessionId, total: session.amount_total });
    for (const line of session.line_items!.data) {
      await tx.orderLines.insert({
        orderId: order.id,
        priceId: line.price!.id,
        quantity: line.quantity,
        discount: line.amount_discount, // kept for the partial refund later
        tax: line.amount_tax,
      });
      await tx.stock.decrement(line.price!.id, line.quantity!); // your count, not Stripe's
    }
    await tx.fulfillments.insert({ orderId: order.id, status: "pending" });
  });
}

order.paid fires when the order becomes paid on any surface: a checkout session, a payment link, an invoice, or a direct API payment. One handler covers them all. The webhook event catalog lists the other order events, such as order.partially_paid and order.refunded, and Which Stripe webhook event should you trust? covers the Stripe side.

Discounts and tax: computed once, stored per line#

A Checkout Session accepts up to one coupon or promotion code, so a second code, or a code on top of an automatic sale, is logic you write before the session exists. Flint promotions cover codes and automatic offers, and each one's combines_with and stacking_mode decide what it stacks with. POST /v1/discount-previews shows the result before you apply it.

Sales tax on Flint is part of the order. Automatic US sales tax applies to each line's price after its discounts, and every line records its own tax_money, which is what a refund later reverses. You can also send rates from your own tax engine. Either way, Flint calculates and reports the tax; registering and filing stay with you, as they would with any payment provider.

Stock: a counter, or a hold on the order#

Stripe's Product object has no stock field, so a store on Stripe keeps its own count and decides when to decrement it. Decrement in the webhook and two buyers can pay for the last unit. Decrement when checkout opens and the unit is gone for as long as the session stays open, 24 hours by default.

Flint tracks inventory per location. When you pay an order, Flint holds the stock, commits it when the payment succeeds, and releases it if the payment fails. If nothing can serve the order, the payment fails with 409 INVENTORY_INSUFFICIENT before any money moves. Stripe inventory tracking lists the race windows a hand-built counter has to cover.

Pay later: rebuild the sale, or invoice it#

A buyer opens checkout, then asks to be invoiced. On Stripe, the Checkout Session and the invoice are separate objects, so the invoice is built again from the cart. On Flint, close the open checkout session and create the invoice with the same order_id. The line items, discount, and balance carry over. A merchant-created order also stays open when a checkout session expires, so you can hand the buyer a fresh session without rebuilding the sale.

Reconciliation: metadata joins, or order IDs#

A Stripe payout is one deposit made of many balance transactions. Matching it to your orders means walking those transactions back through each charge to the metadata key your code wrote at checkout. Stripe metadata holds 50 keys of up to 500 characters each, and Stripe's own guidance for anything larger is to keep it in your database and store the ID.

On Flint, a balance transaction carries order_id when the money belongs to an order. List a payout's transactions with payout_id and expand=order, and each row arrives with its order. Their net_money adds up to the payout amount. Reconciliation has the queries.

Support: one place to answer "what happened?"#

"Did the replacement ship?" "Why was I refunded $23.38 and not $24?" On a charge-first stack, the answer is split between Stripe's dashboard and your admin tools. A Flint order answers it from one object, with five status fields that each answer one question:

FieldQuestionValues
statusCan the order still change?open, closed
payment_statusHas the money arrived?unpaid, partially_paid, paid
fulfillment_statusHave the goods left?not_applicable, not_fulfilled, partially_fulfilled, fulfilled, canceled, closed
refund_statusHas money gone back?none, partially_refunded, refunded
inventory_exception_statusDid stock fail after payment?paid_inventory_failed, resolved

Buyers see the same record in the hosted buyer account: orders, tracking, returns, invoices, and saved cards. Statuses and supported actions lists every value and which ones are final.

Where each model fits#

Order-first fits when the sale outlives the payment. That covers physical goods, carts with discount codes, partial refunds and returns, invoices that may be paid later, subscriptions that ship, and support teams who answer "what did I buy?" every day. Each of those reads from or writes to the order, so keeping the order inside the payment API removes a second system you'd otherwise build and keep in sync.

Charge-first fits when the payment is the whole job. Donations, account top-ups, and a single digital product with no stock or partial refunds don't need an order, and when an ERP or order management system you already run owns the sale, the payment only has to move money.

Flint covers that case too. Create a payment intent with an amount and nothing else:

cURL
curl -X POST https://api.withflintpay.com/v1/payment-intents \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: pi-topup-311" \
  -d '{
    "amount_money": {"amount": 5000, "currency": "USD"},
    "payment_options": ["card"]
  }'

An orderless intent keeps the purchase context in your system, with external_reference_id and metadata as the link back. You can make the call per flow: orders for the store, plain intents for top-ups, on one account and one set of keys.

Stripe's strengths are real and mostly about breadth: a lower headline card rate, businesses onboarded in many countries, and products such as Connect for multi-party payouts. Flint is built for US businesses that sell their own goods and services online and get paid out in USD.

What it costs#

Flint charges 3.79% + 35¢ per card payment, with no monthly fee. The rate covers Stripe's processing and includes checkout, payment links, orders, the catalog and inventory, discounts, fulfillment, returns, refunds, the buyer account, and reporting. Invoices and subscriptions are 0.40% of the payments they collect, and automatic tax is 0.50% on payments that carry tax. ACH debit is 1.00% with a $1 minimum.

Stripe's standard US card rate is 2.9% + 30¢. Billing is 0.7% of Billing volume on pay as you go, Invoicing starts at 0.4% per paid invoice, and Stripe Tax Basic is 0.5% per no-code transaction or 50¢ per API transaction where you're registered. Those prices don't include the order tables, stock counts, refund allocation, and reconciliation jobs a store builds around them. The Flint vs Stripe comparison goes through each of those need by need, and Flint pricing lists every fee.

Moving from charge-first to order-first#

You can switch one flow at a time, and your frontend keeps Stripe.js and Stripe Elements for card entry:

  1. Recreate the catalog with POST /v1/products, with options and variants, and keep the Stripe product ID in metadata during the cutover.
  2. Replace Checkout Sessions with an order and a checkout session for it, or a quick_pay_item session when there is one line. Replace Payment Links with Flint payment links.
  3. Move fulfillment from checkout.session.completed to order.paid, and verify Flint's webhook signatures in place of Stripe's.
  4. Move subscribers by saving a card on Flint and creating the subscription with an imported billing start, so nobody is charged twice for the period Stripe already billed.

Migrating from Stripe maps every Stripe object to its Flint equivalent, and Stripe alternatives, ranked compares Flint with Square, PayPal, Adyen, and merchants of record.

FAQ#

What is an order-first payment API?#

A payment API where the order is the first object you create and the payment settles against it. The order holds the line items, discounts, tax, and the running balance, and checkouts, invoices, refunds, and webhooks all reference it. Flint is an order-first payment API that runs on Stripe's processing.

What is the difference between charge-first and order-first payments?#

A charge-first API, such as Stripe's PaymentIntents, takes an amount and a currency and records whether the money moved. The record of what was sold lives in your own database. An order-first API takes the sale itself, computes the total on the server, and keeps the order, so a refund can name a line item and a webhook can carry the order.

Does Stripe have an orders API?#

Not today. Stripe deprecated its original Orders API in 2019 and removed the 2022 replacement, with the SKU resource, from stripe-node 11.0.0 in November 2022. Stripe's fulfillment guide has you save line items in your own database after each Checkout payment. The Stripe Orders API history has the details.

Can Stripe refund a single line item?#

Not directly. A Stripe refund takes a charge or PaymentIntent and an amount, so refunding one item means computing that item's price minus its share of the discount plus its tax, and recording the refunded quantity yourself. Credit notes can target invoice line items, but only for invoices. Flint refunds take an order_line_item_id and a quantity and return the allocation. See how to refund a line item in Stripe.

Does Flint use Stripe?#

Yes. Stripe processes every card payment on Flint, and card details go from the buyer's browser to Stripe, so neither your server nor Flint sees card numbers. Flint sets up and runs the processing account for each business, so you sign up once and hold one set of API keys.

Can I use Flint without creating orders?#

Yes. POST /v1/payment-intents with an amount creates an orderless payment that you collect with Stripe Elements on your own page. Hosted checkout always collects an order, but a checkout session with quick_pay_item creates a one-line order from a name and an amount, so you never call the Orders API yourself.

Is an order-first API slower to integrate than Stripe Checkout?#

The first payment takes one more call: create the order, then open a checkout session for it. In exchange, the order tables, duplicate-safe fulfillment writes, stock counts, and refund math from the Stripe handler above don't get written at all. Accept your first payment runs the whole loop against a sandbox.

Sources#

Everything attributed to Stripe above comes from its documentation and pricing page, checked on 2026-10-24.

  • Create a PaymentIntent: amount and currency are required; amount_details.line_items takes up to 200 items for Level 2 and Level 3 card data.
  • Create a refund: a refund names a Charge or PaymentIntent and an optional amount; no parameter names a line item.
  • Fulfill orders: the fulfillment function's required steps, possible repeat and concurrent calls, saving line items and updating stock as your code's job, and the async event for delayed payment methods.
  • Retrieve a Checkout Session's line items: per-line amount_subtotal, amount_discount, amount_tax, and amount_total.
  • Create a Checkout Session: up to 100 line items; sessions expire after 24 hours by default.
  • Add discounts: "Checkout Sessions currently support up to one coupon or promotion code."
  • Create a credit note: credit notes adjust a finalized invoice and can target invoice line items.
  • Metadata: 50 keys, 40-character keys, 500-character values, and larger data kept in your own database.
  • stripe-node migration guide for v11: "Remove Orders resource" and "Remove SKU resource" in 11.0.0, 2022-11-15.
  • Stripe pricing: 2.9% + 30¢ for domestic cards, Billing at 0.7%, Invoicing from 0.4%, and Stripe Tax Basic.

Build it#

Why Flint is orders-firstOne order from creation to paid, and how checkout sessions, payment intents, and invoices attach to it.Migrating from StripeEach Stripe object mapped to its Flint equivalent, one payment flow at a time.RefundsRefund an order in full, by amount, by line item, or to store credit.Orders APIEvery order field and mutation route.

Flint's sandbox is free and needs no credit card. Create the mug-and-kettle order above, pay it with test card 4242 4242 4242 4242, and refund one mug to see the allocation come back. The order-first payments API page shows what the order carries on every surface.