Block · Payments and billing
One-off payments
Adds a payment table linked to one of your tables and its price field. People see what they owe on a Pay page and pay on Stripe's secure checkout for exactly that record's price. Stripe tells the app through a signed webhook, and the server marks the payment paid only when Stripe charged the right amount. Payers read only their own payments and rules stop anyone changing an amount or marking a payment paid. Staff see every payment and can record cash by hand.
use_template { slug: "one-off-payments" } adds
- Tables
- payment
- Components
- PayableList, MyPayments
- Pages
- /pay, /my-payments, /payments-admin
- Workflows
- payment-checkout, stripe-payment-events, payment-confirm, payment-apply-check, payment-paid-notify
- Rules
- 2 on payment
What it adds to your app
Table payment linked to your table. PayableList and MyPayments components with their pages. A Stripe-signed webhook that marks payments paid or not completed. Server functions: checkout and a manual check with Stripe. A staff payments page.
Tables
paymentrecord_id, payer_id, amount, currency, status, check, stripe_session_id, paid_at
Pages
/payPay (‹payer_role›)/my-paymentsMy payments (‹payer_role›)/payments-adminPayments (@staff)
Workflows
payment-checkoutStart a Stripe Checkout for one ‹attach_to›. On server function (‹payer_role›)stripe-payment-eventsApply Stripe's checkout events to payments. On webhook stripe-payment-eventspayment-confirmCheck a payment with Stripe (fallback). On server function (‹payer_role›, @staff)payment-apply-checkApply what Stripe said about a payment. On payment updatedpayment-paid-notifyThank the payer when a payment goes through. On payment updated
Components
PayableListWhat the signed-in person can pay for, with a Pay button that opens Stripe CheckoutMyPaymentsThe signed-in person's payments; checks pending ones with Stripe on the way back
Rules on every write
paymentA payment starts as pending and matches the price.paymentOnly Stripe can change a payment.
Where it attaches
Params point the template at your own tables and roles. Leave out the ones with defaults; a wrong one is refused with the options your app has.
| Param | What it is | Example |
|---|---|---|
attach_to | The table whose records people pay for (bookings, orders, invoices). | booking |
price_field | The number field on that table holding what to charge. Optional. | total |
payer_role | The role whose people pay (their own table is the payer). Optional. | customer |
payer_ref | Optional: the ref on that table naming the person who owes it, so people only see and pay their own. Optional. | customer_id |
currency | The three-letter currency code, lower case. Optional. | usd |
Use with your coding agent
- Connect the Appbricx MCP server to Claude Code, Cursor or any MCP client (quickstart).
- Paste the prompt. The agent reads the template, previews the merge with dry_run and shows you the diff.
- It applies to dev. Check it, then deploy when you are happy.
Needs the STRIPE_SECRET_KEY secret, the STRIPE_WEBHOOK_SECRET secret. A table with a number price field.
Add the One-off payments template (slug "one-off-payments") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (attach_to: what is paid for; price_field: price field; payer_role: who pays; payer_ref: whose record it is; currency: currency).{
"tool": "use_template",
"arguments": {
"slug": "one-off-payments",
"project_id": "<your project id>",
"params": {
"attach_to": "booking",
"price_field": "total",
"payer_role": "customer",
"payer_ref": "customer_id",
"currency": "usd"
},
"dry_run": true
}
}appbricx templates use one-off-payments --param attach_to=booking --param price_field=total --param payer_role=customer --param payer_ref=customer_id --param currency=usd --dry-runGoes well with
Stripe subscriptions
Block. Monthly or yearly plans paid through Stripe Checkout, with a billing page and Stripe's own billing settings.
plansubscriptionBillingPanelsubscription-checkoutstripe-subscription-eventsStripe payment received
Workflow. Records every paid Stripe Checkout session the moment Stripe reports it, once, and tells your team.
stripe_paymentStripePaymentsstripe-checkout-eventsstripe-sync-paymentsstripe-payment-receivedOrganisations and teams
Block. Let people create organisations, form teams, invite colleagues by email and give them owner, admin or member roles.
organisationteammembershipinvitation‹attach_to›.organisation_id