Skip to content

Buy online, pick up in store (BOPIS): how to build it with multi-location inventory

Buy online, pick up in store, or BOPIS, means the buyer pays on your site and collects the order at a store you choose together. Building it takes five parts: stock counted per store, a store picker that shows only stores with the item, a hold at the chosen store, routing between pickup and shipping, and a ready-for-pickup notice. A payments API like Stripe has none of them, because it has no stores and no stock. On Flint, all five are API calls, and the buyer can only pay for pickup at a store that has the items.
Verified against official documentationReviewed Send a correction (opens in a new tab)

Where to start

Where you areYour path
You want to know what BOPIS involves before you build itWhat BOPIS is, and the five parts
You take payments with Stripe and need pickup at several storesBuild it next to Stripe
Your Stripe pickup option works, but buyers pick stores that are out of stockThe five places BOPIS breaks
You'd rather have stores, stock, and pickup in the payments APIBOPIS on Flint

What BOPIS is

BOPIS (buy online, pick up in store) is an order the buyer pays for online and collects in person. For a seller, it turns every store into a place to collect online orders, with no shipping cost or wait. For a developer, it turns one stock number into one number per store, and a paid order into a job that a specific store has to prepare, announce, and hand over.

TermBuyer paysStock comes from
BOPIS, click and collectOnlineThe chosen store's shelf
Curbside pickupOnlineThe chosen store, brought out to the car
ROPIS (reserve online, pick up in store)At the storeThe chosen store, held until the buyer arrives
Ship to storeOnlineA warehouse, shipped to the store first

Every version needs the same five parts:

  1. Stock per store. "12 in stock" is useless to a buyer who can reach one store. You need a count for each item at each store.
  2. A store picker that reads that stock. List the stores near the buyer that can supply the whole cart, nearest first.
  3. A hold at the chosen store. The units have to be set aside at that store before the card is charged, or two buyers pay for the last one.
  4. Routing. Pickup draws from the chosen store. Shipping draws from wherever your rules say, often a warehouse first.
  5. A pickup lifecycle. Staff need a list of their store's orders, the buyer needs a ready-for-pickup notice, and the handoff has to take the units off the shelf count.

Building BOPIS next to Stripe

Stripe takes the payment and nothing else on that list. Products and Prices have no quantity field. Stripe Terminal has Location objects, which come up in every search for Stripe multi-location inventory, but a Terminal Location groups card readers: it holds an address, a display name, and reader settings, and no stock. A Checkout Session has no store or pickup parameter, and Stripe's fulfillment guide leaves fulfillment to a function you write. So each of the five parts is yours to build.

  1. Keep a count for every item at every store

    SQL
    -- Stripe stores no stock, so every store's count is yours.
    CREATE TABLE store_stock (
      sku       text NOT NULL,
      store_id  text NOT NULL,
      on_hand   integer NOT NULL CHECK (on_hand >= 0),
      held      integer NOT NULL DEFAULT 0,
      PRIMARY KEY (sku, store_id)
    );
    
    CREATE TABLE pickup_holds (
      checkout_session_id text PRIMARY KEY,
      sku        text NOT NULL,
      store_id   text NOT NULL,
      quantity   integer NOT NULL,
      expires_at timestamptz NOT NULL
    );

    Every channel has to write to it: online orders, counter sales (a Stripe Terminal payment carries no stock either), damages, transfers, and shelf counts.

  2. Ask for the store before you create the session

    Stripe Checkout can't ask for a store. Its shipping options are fixed-amount rates, up to five per session, with no location attached. Show your own picker, filtered by the stock table, and carry the store in metadata. The Stripe Checkout local pickup page covers the session setup, the address prompt, and how Stripe Tax treats it.

  3. Hold the units at that store, then open the session

    JavaScript
    // The buyer chose "Pick up at Brooklyn" on your page.
    const held = await db.oneOrNone(
      `UPDATE store_stock SET held = held + $1
       WHERE sku = $2 AND store_id = $3 AND on_hand - held >= $1
       RETURNING on_hand - held AS left`,
      [qty, sku, storeId],
    );
    if (!held) return showOtherStores(sku);
    
    const session = await stripe.checkout.sessions.create({
      mode: "payment",
      line_items: [{ price: priceId, quantity: qty }],
      // 30 minutes is the shortest expiry Stripe allows; the default is 24 hours.
      expires_at: Math.floor(Date.now() / 1000) + 30 * 60,
      metadata: { fulfillment: "pickup", store_id: storeId, sku, qty: String(qty) },
      success_url: "https://example.com/pickup/{CHECKOUT_SESSION_ID}",
    });
    await db.none(
      "INSERT INTO pickup_holds VALUES ($1, $2, $3, $4, to_timestamp($5))",
      [session.id, sku, storeId, qty, session.expires_at],
    );

    On checkout.session.completed, turn the hold into a paid pickup order in the same transaction as an event ID dedupe. On checkout.session.expired, and in a scheduled sweep for the events that never arrive, release it. The Stripe inventory page has that recipe and the five race windows it has to close.

  4. Run the pickup yourself

    JavaScript
    // Your staff screen calls this when the order is on the pickup shelf.
    await db.none("UPDATE pickup_orders SET status = 'ready' WHERE id = $1", [orderId]);
    await email.send(buyer.email, "Your order is ready at Brooklyn", readyTemplate(order));

    Add statuses, a staff screen filtered by store, the ready email, a pickup-by date, and a no-show path that refunds the payment and puts the units back.

The five places BOPIS breaks

  1. The site says in stock at a store whose shelf is empty#

    A buyer drove to the store for an item the store sold at the counter an hour earlier.

    Each store's count lives in your database, and every sale has to reach it. Online orders arrive through checkout.session.completed, but counter sales, damages, and shelf counts arrive from other systems, if they arrive at all. A Stripe Terminal payment carries no stock either, so nothing in Stripe connects the counter sale to the count your site shows.

    Confirm it

    Pick ten fast-moving items at one store and compare your table with a shelf count. Any difference is a pickup promise you can't keep.

    Fix

    Record every stock change, from every channel, against the same (item, store) row, and hold back a small safety buffer per store for the changes that arrive late.

  2. Stock is checked when the page loads, not held when the buyer pays#

    Two buyers paid for the last unit at the same store. One of them gets a refund and an apology.

    Showing "In stock at Brooklyn" reads a count. It doesn't hold anything. A Checkout Session can stay open for 24 hours by default, so the gap between the read and the charge can be long, and every buyer in that gap passes the same check.

    Confirm it

    Count pickup orders refunded as out of stock. Each one was a check without a hold.

    Fix

    Insert a hold row for (item, store, quantity) in the same transaction as the availability check, set the session's expires_at to the 30-minute minimum, and release holds on checkout.session.expired and with a scheduled sweep.

  3. Stripe Checkout lists five options, and none of them checks stock#

    You added a $0 rate per store and hit the limit at your sixth store.

    A Checkout Session takes up to 5 shipping_options, and a shipping rate's only type is fixed_amount, with no location or stock attached. Listing stores as rates caps you at five, offers stores that are out of stock, and still asks the buyer for a shipping address.

    Confirm it

    Count your stores. Past four, with one shipping rate kept for delivery, the rate trick can't list them all.

    Fix

    Ask for the store on your own page before you create the session, filter the list by your stock table, and carry the store ID in metadata. Our Stripe Checkout local pickup page covers the session setup.

  4. Nobody tells the buyer the order is ready#

    Buyers arrive before the order is pulled, or call the store to ask whether it's ready.

    Stripe's fulfillment guide leaves fulfillment to a function you write, triggered by checkout.session.completed. No Stripe object has a pickup status or a ready state, so nothing sends a ready email when staff pull the order.

    Confirm it

    Ask a store how staff find today's pickups and how buyers learn they're ready.

    Fix

    Model each pickup order with statuses (received, ready, collected, canceled), give staff a list filtered by store, and send your own email when an order moves to ready.

  5. No-shows keep stock off the shelf#

    The store's count says zero while three paid, uncollected orders sit in the back room.

    A paid pickup order keeps its units out of sale until someone decides it isn't coming. Without a due date and a cancel step, those units stay committed indefinitely.

    Confirm it

    List paid pickup orders older than your pickup window that were never collected.

    Fix

    Store a pickup-by date on each order, remind the buyer, and when it lapses, refund the order and put the units back on sale at that store.

    Each of these is work your database does while Stripe sees only the payment. Flint does all five in the API, as the next section shows.

Questions, answered

What does BOPIS mean?

BOPIS stands for buy online, pick up in store. The buyer pays on your website or app, chooses a store, and collects the order there instead of having it shipped. The seller has to show which stores have the item, hold the units at the chosen store, prepare the order, tell the buyer it's ready, and record the handoff.

What is the difference between BOPIS, ROPIS, curbside pickup, and ship to store?

BOPIS: the buyer pays online and collects from the store's own stock. ROPIS (reserve online, pick up in store): the buyer reserves online and pays at the store. Curbside pickup: BOPIS where staff bring the order out to the car. Ship to store: the order ships from a warehouse to the store, so it's ready only after the delivery arrives.

Does Stripe support buy online, pick up in store?

Stripe processes the payment and leaves stores, stock, and the pickup itself to you. Teams build BOPIS next to Stripe with a stock table per store, a store picker on their own site, holds, and their own ready emails. Flint has stores, stock per store, store search, pickup holds, and ready-for-pickup emails in its API.

Does Stripe track inventory by location?

No. Stripe Products and Prices carry no stock quantity. Stripe Terminal has Location objects, but they group card readers and hold an address and settings, not stock. A count per item per store has to live in your own system.

How do I show which store has an item in stock?

Read the item's stock at each store and show the stores with units available. On Flint, GET /v1/inventory-levels with inventory_item_id and has_available_quantity=true returns one level per store with available_quantity, which already excludes held, committed, damaged, and safety stock. At checkout, the pickup store search marks stores that can't cover the cart as inventory_unavailable.

How do I hold an item at a store until the buyer picks it up?

Once the order is paid, the units should be committed at that store until handoff or cancellation. On Flint, payment commits the stock at the chosen store, and completing the pickup takes it off hand. To hold an item before payment, such as from a product page, create an inventory reservation at that store for up to 24 hours and bind it to the checkout session.

Can one order be picked up at two stores?

Not on Flint. The buyer chooses one store per pickup, and each tracked line needs its full quantity at that store. If no single store has enough, the store search shows those stores as unavailable for pickup and the buyer can choose shipping instead, or you can transfer stock to the store first.

What happens if the buyer never picks up the order?

You decide when to give up. On Flint, set pickup_details.pickup_due_at on the pickup fulfillment for your own reminders, then cancel the fulfillment, which puts the units back on sale at that store, and refund the buyer. Passing the due date changes nothing on its own.

How is tax calculated on a pickup order?

On Flint, when every taxable item is picked up at one store, that store's address is the order's tax location, so automatic tax uses the store rather than a shipping address the buyer typed.

Is there a payments API with multi-location inventory and in-store pickup?

Flint. Stores are Locations with their own stock levels, hosted checkout lets the buyer choose a store that has the items, payment holds and commits the stock at that store, and marking the pickup ready emails the buyer. You can process with your own Stripe account or with processing Flint sets up.

BOPIS on Flint: stores, stock, and pickup in one API

Flint is a payments API with stores and stock built in. Each store is a Location with its own stock levels. Hosted checkout lets the buyer choose a store that has the items, payment holds and commits the units at that store, and marking the order ready emails the buyer. A store that can't cover the cart isn't offered for pickup, so a buyer can't pay to collect something the store doesn't have. You don't write a stock table, a holds table, a sweep job, or a ready email. Flint works with your own Stripe account or with processing Flint sets up.

A pickup order at the Brooklyn storeResponse
BuyerFlintStore staffChoose Pick up, search stores near 11249Brooklyn available, Queens out of stockChoose Brooklyn and payfulfillment.created at Brooklyn, stock committedmark-readyEmail: your order is ready for pickupcomplete at handoff, units leave on hand
  1. Buyer sends Choose Pick up, search stores near 11249 to Flint
  2. Flint returns Brooklyn available, Queens out of stock to Buyer
  3. Buyer sends Choose Brooklyn and pay to Flint
  4. Flint sends fulfillment.created at Brooklyn, stock committed to Store staff
  5. Store staff sends mark-ready to Flint
  6. Flint returns Email: your order is ready for pickup to Buyer
  7. Store staff sends complete at handoff, units leave on hand to Flint

1. Make each store a Location

cURL
curl -X POST https://api.withflintpay.com/v1/locations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Brooklyn store",
    "address": {
      "line1": "120 Kent Avenue",
      "city": "Brooklyn",
      "state": "NY",
      "postal_code": "11249",
      "country": "US"
    },
    "timezone": "America/New_York",
    "inventory_allocation_enabled": true
  }'

inventory_allocation_enabled lets Flint hold and sell stock there. Record stock with inventory adjustments per Location, and Flint keeps one level per item per store, with a ledger entry for every change. Then add a pickup delivery method that lists your stores, directly or through a reusable location set, as in the delivery options guide. Every store in the method needs an address and time zone.

2. Show which store has it

On a product page, read the item's stock at every store from your server:

cURL
curl "https://api.withflintpay.com/v1/inventory-levels?inventory_item_id=invi_1kmn0aMug&has_available_quantity=true" \
  -H "Authorization: Bearer YOUR_API_KEY"
JSON
{
  "data": [
    {
      "inventory_level_id": "invl_1kmn0aBrooklyn",
      "inventory_item_id": "invi_1kmn0aMug",
      "location_id": "loc_1kmn0aBrooklyn",
      "on_hand_quantity": 6,
      "held_quantity": 1,
      "committed_quantity": 2,
      "safety_stock_quantity": 1,
      "available_quantity": 2
    },
    {
      "inventory_level_id": "invl_1kmn0aOakland",
      "inventory_item_id": "invi_1kmn0aMug",
      "location_id": "loc_1kmn0aOakland",
      "on_hand_quantity": 14,
      "held_quantity": 0,
      "committed_quantity": 0,
      "safety_stock_quantity": 0,
      "available_quantity": 14
    }
  ]
}

The response is abridged. available_quantity is already net of what carts are holding, what paid orders own, damaged or quarantined units, and the safety stock you set per store, so you can print "2 left at Brooklyn" without arithmetic. This read holds nothing. To stay current, listen for inventory_level.updated, which fires on every quantity change with the new available quantity.

Flint's hosted checkout does this step for you: the buyer chooses Pick up and gets a store search instead of an address form. In your own checkout, search the stores for the cart in a checkout session:

cURL
curl -X POST https://api.withflintpay.com/v1/delivery-previews \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "pickup_locations",
    "checkout_session_id": "cs_1kmn0aExample",
    "buyer_location": {
      "type": "address",
      "address": { "postal_code": "11249", "country": "US" }
    },
    "maximum_distance": { "value": 25, "unit": "mile" }
  }'
JSON
{
  "data": {
    "mode": "pickup_locations",
    "evaluation_status": "complete",
    "locations": [
      {
        "location": { "location_id": "loc_1kmn0aBrooklyn", "name": "Brooklyn store" },
        "distance_meters": 1843.7,
        "candidate_outcome": { "type": "available" }
      },
      {
        "location": { "location_id": "loc_1kmn0aQueens", "name": "Queens store" },
        "distance_meters": 9210.2,
        "candidate_outcome": { "type": "unavailable", "unavailable_reason": "inventory_unavailable" }
      }
    ]
  }
}

Stores come back nearest first, up to 25, each with a candidate_outcome for this cart. A store that can't cover it reports inventory_unavailable, so you can gray it out or say "Not in stock" before the buyer chooses it. Your storefront can make this call with the checkout session credential. The search itself reserves nothing.

4. Hold the units at the chosen store

Quote pickup at the store the buyer chose:

cURL
curl -X POST https://api.withflintpay.com/v1/delivery-quotes \
  -H "Authorization: Bearer ckat_1kmn0aExample" \
  -H "Content-Type: application/json" \
  -d '{
    "checkout_session_id": "cs_1kmn0aExample",
    "pickup_location_id": "loc_1kmn0aBrooklyn"
  }'

The quote checks that store's stock again. When the buyer selects the pickup option from it, Flint holds the units at that store for the order, and payment commits them. If another buyer took the last unit in between, payment fails with 409 INVENTORY_INSUFFICIENT before the card is charged. The units stay committed at the store until the pickup is completed or canceled, so nothing else can sell them off the pickup shelf.

To hold an item longer, such as a "Reserve at this store" button on a product page, create a reservation at the store. It lasts 15 minutes by default, or until an expires_at up to 24 hours out:

cURL
curl -X POST https://api.withflintpay.com/v1/inventory-reservations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: hold-cart-1842-brooklyn" \
  -H "Content-Type: application/json" \
  -d '{
    "owner": { "key": "cart_1842" },
    "inventory_routing_source": { "type": "fixed_location", "location_id": "loc_1kmn0aBrooklyn" },
    "demands": [{ "inventory_item_id": "invi_1kmn0aMug", "quantity": 2 }],
    "expires_at": "2026-12-03T17:00:00Z"
  }'

Bind it when your server creates the checkout session, and the pickup selection takes over the held units instead of competing with them:

cURL
curl -X POST https://api.withflintpay.com/v1/checkout-sessions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "order",
    "order_id": "ord_1kmn0aExample",
    "delivery_method_ids": ["dmet_1kmn0aPickup", "dmet_1kmn0aShipping"],
    "inventory_reservation_ids": ["invr_1kmn0aExample"]
  }'

When the deadline passes unpaid, Flint releases the hold and sends inventory_reservation.hold_expired. Holding stock outside a Flint order has the full rules.

5. Route pickup and shipping from different places

Pickup always draws on the chosen store's own stock. Shipping follows your routing. With a warehouse and several stores, an allocation policy ranks Locations into priority groups:

cURL
curl -X POST https://api.withflintpay.com/v1/inventory-allocation-policies \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ship from the warehouse, then stores",
    "configuration": {
      "location_groups": [
        { "location_id": "loc_1kmn0aWarehouse", "group_priority": 1 },
        { "location_id": "loc_1kmn0aBrooklyn", "group_priority": 2 },
        { "location_id": "loc_1kmn0aOakland", "group_priority": 2 }
      ],
      "splitting_behavior": "single_location"
    }
  }'

Send {"type": "policy", "inventory_allocation_policy_id": "invp_..."} as the routing source on orders and payment links, or set it once as your default. Shipping orders go to the warehouse while it can supply the whole order, then to the first store that can. For a shipping method to leave from more than one Location, give it an allocated_origin_group origin and the items a delivery profile with inventory_routing, as in Ship from two warehouses. Pickup at Brooklyn still sells Brooklyn's units, even with the warehouse ranked first. Editing a policy only affects future routing: stock already claimed stays where it is.

6. Tell the buyer it's ready

After payment, Flint creates a pickup fulfillment at the store and sends fulfillment.created. Each store's staff screen lists its own work:

cURL
curl "https://api.withflintpay.com/v1/fulfillments?type=pickup&location_id=loc_1kmn0aBrooklyn&status=pending,preparing" \
  -H "Authorization: Bearer YOUR_API_KEY"

When the order is on the pickup shelf, mark it ready. Flint emails the buyer that the order is waiting:

cURL
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_1kmn0aExample/mark-ready \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: ful_1kmn0aExample-ready" \
  -H "Content-Type: application/json" \
  -d '{ "occurred_at": "2026-12-03T15:05:00Z" }'

At the counter, complete it. That records the handoff and takes the units off the store's on-hand count:

cURL
curl -X POST https://api.withflintpay.com/v1/fulfillments/ful_1kmn0aExample/complete \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: ful_1kmn0aExample-complete" \
  -H "Content-Type: application/json" \
  -d '{ "occurred_at": "2026-12-03T17:42:00Z" }'

mark_preparing in between is optional, and every step is safe to retry with its idempotency key. pickup_details carries the store, the buyer's note, and an optional pickup_due_at. Passing the due date changes nothing by itself; for a buyer who never comes, cancel the fulfillment to put the units back on sale at that store, and refund the order.

7. Move stock to the store that needs it

When one store runs low on something another has plenty of, draft a transfer:

cURL
curl -X POST https://api.withflintpay.com/v1/inventory-transfers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "origin_location_id": "loc_1kmn0aOakland",
    "destination_location_id": "loc_1kmn0aBrooklyn",
    "lines": [{ "inventory_item_id": "invi_1kmn0aMug", "requested_quantity": 6 }],
    "note": "Rebalance for weekend pickups"
  }'

depart takes the units off the origin's count, and receive puts them on Brooklyn's shelf, where they're available for pickup immediately. The same transfer works for ship-to-store: move the stock to the store, and pickup there opens up when it arrives.

What to know before you launch

  • Each pickup is collected at one store, and each tracked line needs its full quantity there. A line isn't split across two stores; the store search shows stores that fall short as unavailable.
  • Pickup sells stock that's already at the store. For items that live only in a warehouse, transfer them first.
  • When every taxable item is picked up at one store, that store is the order's tax location.

Stripe and Flint for BOPIS, side by side

Stripe plus your own buildFlint
StoresRows in your database; Terminal Locations hold readers, not stockLocations with addresses, time zones, and stock
Stock per storeA table every channel has to updateLevels per item per Location, derived from a movement ledger
Store pickerYour page, before the session; Checkout lists up to 5 fixed ratesHosted store search, or a search API with each store's stock outcome
Hold at the chosen storeA holds table, an expiry handler, and a sweep jobPlaced at selection, committed at payment, released when unused
Last unit at a storeBoth buyers can be charged unless your hold stops oneOne payment succeeds; the other fails before the charge
Pickup and shipping routingCode you writePickup from the chosen store; shipping by allocation policy
Ready-for-pickup noticeYour statuses and your emailmark-ready emails the buyer
Handoff and no-showsYour decrement, refund, and restock codecomplete takes stock off hand; cancel releases it
Rebalancing storesSpreadsheet edits on both rowsTransfers with depart and receive steps

Selling preorders for a pickup day instead? See preorders with local pickup. The inventory guide, delivery options guide, and fulfillment guide have every field on the requests above.

Sources

All sources accessed December 2, 2026.