DocsPayments & workflows
On this page

Payments

Build a checkout around a payment created by FRL, then show payment options with FQL. Keep pricing, ownership checks and the action that fulfils an order in your rules.

Choose the flow

What you needUse
Exact prices and a currency selectorCurrencies and prices.
A custom checkout actionAn endpoint with access checks and a stable dedupe key.
A payment recordpayment.create(options) in FRL. See Payment helpers.
The payment interfaceFrontbacked.billing.showPaymentOptions(...). See Billing helpers.
Order fulfilment after confirmationA payment confirmed event. See Payment events.
Stock or booking capacityReservations and atomic actions.
Local payment testingThe local simulator.

Keep checkout trustworthy

Read the product, price and availability in FRL. Treat browser values as choices to validate, not authoritative prices or ownership. Use must(...) to reject a denied user or invalid quantity before creating a payment.

Give each deliberate checkout attempt a stable ID and use it in dedupe. Reuse it after a network failure so a retry can recover the existing result. Use a new attempt for a new purchase or after handling an expired payment. Read the current payment status rather than assuming a previously returned checkout response is still current.

Use FRL payment events for fulfilment. A page displaying a success message does not establish that a payment was confirmed. Payment metadata helps associate a payment with an order; it does not hold stock by itself.

Test before publishing

Run the full local flow with simulated payments. Check success, failure, expiry, repeated requests, access denial and any partial-payment handling your theme supports. Then test the payment options configured on a hosted preview. Choose wording such as “secure checkout” and “payment method” in your theme, and provide a clear action when the customer needs to retry or choose another option.