On this page
Payment events and money reference
Read payment events and declare money fields.
Before you begin: Requests and resources reference.
Payment Events
Use top-level payment events when a theme needs rule-owned side effects as a site payment is created, receives a partial crypto payment, or completes.
Rule excerpt: add this to a complete FRL rule before running it. Try a complete example →
Supported FRL event names are created, proof, rejected, underpaid, confirmed, and failed.
payment proofruns after a manual proof submission is saved. Use it to create an order awaiting review.$payment.claim.ididentifies the submission; a replacement proof has a new ID. Keep one order per$payment.idwhen updating a resubmission.payment rejectedruns when an admin rejects manual proof.$payment.review.notecontains the review note. Customers can submit replacement proof for the same payment.payment underpaidruns when confirmed crypto transfers leave a balance due.$payment.statusisunderpaid; the invoice remains pending.$payment.underpaymentprovidesexpectedAmount,receivedAmount,remainingAmount,currency,methodId, andexpiresOn. Crypto amounts are exact decimal strings. Each new confirmed partial balance has its own event; repeated delivery of the same balance does not repeat completed event actions. Keep any order or reminder tied to$payment.id.- Partial crypto payments keep the original invoice amount, quote, address, and deadline. The checkout shows the amount still due. Full payment before the deadline can proceed to
payment confirmed; expired partial payments stay held for review. They do not automatically become wallet funding or trigger paid-order actions. payment confirmedalso runs when an admin accepts manual proof. Update the existing order here and perform paid-order actions once.payment failedhandles unsuccessful and cancelled payments. Manual proof rejection usespayment rejected; themes without that handler continue to receive it throughpayment failed.
A payment awaiting review stays pending_review after its original payment deadline. Proof submission does not confirm receipt of funds.
Rule excerpt: add this to a complete FRL rule before running it. Try a complete example →
Use payment confirmed, not payment successful. Inside FRL, confirmed payments expose $payment.status == "confirmed" and keep the stored transaction status on $payment.rawStatus.
Money Fields
Use type: "money" for account balances, credits, debits, and other amounts that have already been recorded. Currency comes from the site's currency settings, so the schema does not declare a separate currency field:
Rule input (JSON)
Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.
Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.
Single-currency sites accept their base currency only. Multi-currency sites accept only currencies enabled by the site admin. Empty currency settings safely fall back to the base currency. Use post.increment(id, { balance: change }) to change a balance atomically.
Use type: "money" for every monetary value, including product prices and investment ranges. Payment intent creation belongs in a guarded endpoint, not in the field type:
Rule input (JSON)
Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.
Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.
The frontend submits a money value as ordinary post data:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Use separate money fields such as minInvestment and maxInvestment when a product or service has a range. A payment endpoint can validate the submitted amount and call payment.create({ amount, metadata }).
Continue with Rule publishing checklist.
Guest checkout
A checkout endpoint can accept payment without requiring an account. Pass a customer contact with the server-calculated amount:
Rule excerpt: add this to a complete FRL rule before running it. Try a complete example →
Validate delivery details in the endpoint, calculate prices from saved products, and use dedupe for safe retries. Create checkoutKey with crypto.randomUUID() in the browser and retain it for that checkout attempt. Contact details stay private; shared payment links show payment details only. Guest payments do not create accounts or add money to a user wallet.
A guest can cancel an unpaid attempt through your endpoint with payment.cancel(paymentId, checkoutKey). The original key is required; receiving a shared payment link does not grant cancellation access. Payments already receiving funds cannot be cancelled. payment.findPending does not search across guest customers; retain the returned payment ID to resume the same checkout.
Keep order pages restricted to their owners and site admins. For a guest, show a payment confirmation and offer account creation as an optional step.
Add guest purchases to a verified account
Use purchase ownership bindings to let customers keep their guest purchases after verifying their account email.