Checkout
Litestore prices the cart, holds stock while the shopper pays and creates the order once payment is confirmed, and a few checks help when checkout fails.
Checkout is the process that turns a shopper's cart into a paid order. Litestore prices the cart, reserves stock while the shopper pays, and creates the order once the payment is confirmed.
- Linen shirt × 2
- $96.00
- Wool beanie
- $24.00
- SUMMER15
- −$18.00
- Shipping, Standard
- $6.00
- Tax
- $8.16
- Total
- $116.16
Checkout pages
The cart is on the storefront, at:
/cartOn this page, the shopper applies a discount code, picks a shipping rate and sees the tax.
The shopper pays on Stripe's hosted checkout page, and Stripe then sends them back to:
/cart/successStripe is the only payment provider Litestore is connected to. Without it, shoppers can still browse and add items to the cart, but they can't start checkout.
Litestore uses four records for a checkout:
Cart
CartItem
OrderIntent
OrderCheckout flow
Cart
On the storefront, they add items, apply a code and pick a shipping rate.
Checkout start
Litestore reserves the stock and the coupon slot. It calculates the discounts, shipping and tax, and saves a frozen quote.
Payment
The shopper pays on Stripe's checkout page.
Payment confirmation
Litestore turns the frozen quote into an order. It never recalculates the order from the current cart or catalog.
Most of the work happens in the second step, and the rest of this page explains that step in more detail.
Server-side pricing
Litestore calculates sale prices and coupon, behavioral and loyalty discounts on the server in a single pass, and then asks Stripe to charge the result.
Prices can't be changed from the browser. The figures a shopper sees are the output of the server calculation rather than an input to it, so a modified page can't produce a lower charge.
The single pass also determines how discounts combine. Litestore produces one result from one calculation instead of applying discounts one after another in whatever order they were requested.
Checkout quote
When the shopper starts checkout, Litestore creates an order intent. It records the subtotal, the discount, the tax, the shipping, the total and a copy of every line.
When Stripe confirms the payment, Litestore creates the order from that copy.
This means the catalog stays editable while people are shopping. Editing a product during business hours is normal, and the edit won't affect a checkout that has already started.
It also means the shopper is charged exactly the amounts they confirmed, because Litestore records those amounts before payment instead of reconstructing them afterwards.
Stock holds
Litestore reserves the stock when checkout starts. These time limits apply:
30 minutes to pay the quote
35 minutes of held stock
5 checkout attempts per cart per hourThe stock hold is intentionally longer than the time the shopper has to pay. The extra five minutes allow time for the payment confirmation to arrive, so if a shopper pays in the twenty-ninth minute and the confirmation arrives shortly afterwards, the payment still counts.
If the payment fails or the time runs out, Litestore releases the units.
Litestore reserves stock at the start of checkout because, if it only did so after payment, it could sell the last unit twice. Someone would then have to tell a customer that their paid order can't be fulfilled.
The attempt limit prevents a single cart from repeatedly starting checkout and keeping stock unavailable to other shoppers.
Coupon limits
Litestore claims the coupon slot, including the per-customer limit, before the payment page opens.
If one account runs several checkouts at the same time, only one of them can use the last remaining redemption. Because Litestore claims the slot up front, it doesn't rely on a count that might have changed by the time the payment completes.
Tax line
Litestore charges tax as a separate line item.
Stripe's automatic tax is turned off. The tax amount is calculated from the store's own tax configuration, and the shopper sees it as a separate line.
Guest checkout
A guest can buy without an account. To find the order later, they look it up by order number and email.
If that person later signs up with the same address, Litestore attaches their earlier guest orders to the new account, so checking out as a guest first doesn't cause any problems and you don't need to move anything by hand.
Abandoned checkouts
When a cart stalls, a scheduled job picks it up and sends a recovery email.
When you ask the assistant about abandoned carts, it classifies each stalled cart by the likely reason it stalled:
intent loss
checkout friction
shipping shock
price resistanceThe reason is the part of this data you act on. A count of 340 abandoned carts doesn't show which part of checkout to change, but seeing that some stalled because of shipping shock and others because of price resistance points to two different problems to address.
Settings
The admin doesn't have a separate checkout settings page. The Stripe connection is under Settings → Payments.
You configure these settings per market, under Markets.
| Setting | What it does |
|---|---|
| Coupons | Turns coupons on or off for the market. |
| Loyalty | Turns loyalty on or off for the market. |
| Return window | Sets how long customers in the market have to return goods. |
These are set per market rather than for the whole store, because the right choice can differ between the places you sell.
Troubleshooting
Note
Litestore calculates everything the customer pays once, on the server, before the payment page opens, and that amount doesn't change afterwards.
Related
Payments
Stripe takes the payments, the ledger records every money movement, and Litestore tracks disputes against their orders.
Discounts
Code, automatic and gift card discounts each have their own limits, and Litestore records every time a customer uses one.
Orders
An order goes from payment to shipment, ships in parts if needed, and is also created by hand for phone and in-person sales.