Billing reference
Show payments and inspect their status.
Method signatures
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Before you begin: Authentication reference.
Billing Helpers
Frontbacked.billing.getMethods() returns the billing methods currently available to the site.
Payments are created by a theme-defined FRL endpoint. The endpoint validates the request, calculates the amount from trusted server-side data, and calls payment.create({ amount, metadata }). The browser only calls that endpoint and opens the returned payment:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
The endpoint can use any money field or server-side calculation. Metadata is optional business context for payment events; it is not a price reference and must not be used as an authority for the amount.
Themes can read or set the visitor's storefront currency with the same code locally and after publishing:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Site admins manage storefront currency from fb-admin > Site Settings > Currency. Themes can read the saved public currency values in this shape:
When supportAllCurrencies is true, any listed country currency can be requested. When it is false, Frontbacked falls back to baseCurrency if the visitor requests a currency outside supportedCurrencies.
Money fields are exposed to FQL as rich money objects. Theme-defined functions can call the safe methods added to each value:
For money filters and ordering, use the existing typed-field syntax with @money and pass the currency explicitly:
Add this configuration inside your page’s {STATE} declaration. Inspect state shows its configuration; live queries and saved data run against your local site. Try a complete FQL page →
Pass onProofSubmitted: async ({ payment, close }) => { ... } to respond after manual proof is saved and its FRL event finishes. This callback runs for a new submission, not simply when reopening a payment. Use your theme's saved order or booking to choose the next page; the payment widget stays independent of that workflow. Call close() to dismiss it after the handoff is ready. Keep an onClose handler as a fallback for reopening an already submitted payment.
When a crypto transfer is below the quoted amount, the widget stays open with Required, Received, and Remaining to pay amounts. Customers can copy the exact remaining amount and pay it to the same address before the original deadline. Detected transfers already reduce the displayed balance while confirmations are pending, so customers are not asked to resend those funds. After the deadline, partial payments show a review message and no longer offer top-up instructions. Partial payments do not automatically credit the site wallet.
A payment awaiting manual review continues to show its proof-submission status after the original deadline. Rejected payments offer Submit new proof. Admin acceptance fires FRL payment confirmed.
Pass onClose: ({ payment }) => { ... } to run an action when the customer closes the widget. payment contains the latest payment status. For example, navigate to order history when payment.status === "successful". A payment with metadata.cryptoSettlement.status === "underpaid_wallet_funding" funded the wallet and did not complete the order; keep that customer in checkout.
The payment widget stays open when the customer clicks outside it or presses Escape. Use its close button to dismiss it; Escape can still return from payment-method selection to the current method. Theme callbacks can explicitly call the supplied close() after a completed handoff.
Frontbacked.billing.showPayment({ paymentId }) reopens the payment widget for a pending, unexpired transaction. This is useful for dashboard or transactions rows rendered from $transactions.
Frontbacked.billing.claimPayment({ paymentId, methodId, txHash, receipt, metadata }) submits a manual payment claim for admin review. Use it only for manual billing methods.
Frontbacked.billing.checkPaymentStatus({ paymentId, methodId, requireAuth, signal }) returns the latest status for one payment without opening the widget. Use it for custom dashboard rows or a compact checkout panel.
Frontbacked.billing.createDepositAddress({ paymentId, methodId }) prepares the payable address/details for a selected deposit method. The built-in widget calls this for you; custom checkout UIs can call it directly.
Frontbacked.billing.paymentLink(paymentId) returns a shareable payment URL for a payment id.
Continue with Validation reference.
Add guest purchases to the current account
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Sign-in and trusted provider sign-in automatically add guest purchases for a verified matching email. Email verification also adds matching purchases. Use claimPurchases() for an explicit retry on an orders page. It uses the current signed-in account and accepts no email or account ID from the browser. An unverified account receives email_verification_required.
Your FRL checkout declares its purchase record bindings with payment.create({ purchaseOwnership: [...] }). Checkout never requires signup just to make a purchase.