Skip to main content

Module billing

Module billing 

Source

Structs§

Addon
Something an app sells on top of Premium, on the same subscription. Prices are in dollars per interval.
AutoReload
AutoReloadUpdate
CancelOptions
The options argument of cancel_subscription: the add-on to stop, or None to end Premium.
PageQuery
The { cursor, max } query of paged lists: cursor items skipped from the newest, max the page size.
PaymentMethod
RedirectUrl
The { url } checkout, setup, portal and subscribe calls resolve to.
ReturnOptions
The options argument of checkout, setup, portal and subscribe. Stripe returns to return_url when it is a trusted app origin, else the Fauna app.
SubscribeOptions
The options argument of subscribe: where Stripe returns to, and the add-on to buy instead of Premium alone.
Subscription
Summary
Transaction
Usage
UsagePoint

Enums§

Plan
PrincipalKind
TransactionKind

Functions§

addons
The add-ons for sale.
cancel_subscription
End Premium at the period’s end (add-ons end with it), or with addon, stop that add-on now with a prorated credit.
checkout
Start a Stripe Checkout top-up for the caller’s personal wallet.
format
US dollars, the way Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }) prints them.
get
open_portal
setup_payment_method
subscribe
Subscribe to Premium, or with addon, buy an add-on. With a subscription already, the add-on joins it at once (the URL then returns to return_url, or opens the invoice when the card needs confirming); otherwise Checkout sells Premium and the add-on together. Open the returned URL.
transactions
update_auto_reload
usage
Daily base/spread usage for the caller’s wallet, or a group’s (member-only). days bounds the window server-side (default 30, max 180).