Workflow · Payments and billing
Stripe payment received
A Stripe-signed webhook records each paid Checkout session in a stripe_payment table, once (Stripe's event id and the session id both guard against repeats). Every new payment notifies your staff and emails the payer a short receipt. A Payments page for staff lists them, with a Check Stripe now button as a fallback that pulls recent sessions with your secret key (it never reaches the browser).
use_template { slug: "stripe-payment-received" } adds
- Tables
- stripe_payment
- Components
- StripePayments
- Pages
- /stripe-payments
- Workflows
- stripe-checkout-events, stripe-sync-payments, stripe-payment-received
What it adds to your app
Table stripe_payment (one row per paid Checkout session). A Stripe-signed webhook that records each paid session. Server function stripe-sync-payments (the manual fallback). Workflow: notify staff and email a receipt on each new payment. A Payments page for staff.
Tables
stripe_paymentsession_id, amount, currency, email, payer_name, description, paid_at
Pages
/stripe-paymentsPayments (‹staff_role›)
Workflows
stripe-checkout-eventsRecord each paid Stripe Checkout session. On webhook stripe-checkout-eventsstripe-sync-paymentsCheck Stripe for paid Checkout sessions (fallback). On server function (‹staff_role›)stripe-payment-receivedTell staff and email a receipt for each new payment. On stripe_payment created
Components
StripePaymentsStaff payments list, filled by Stripe's webhook, with a Check Stripe now fallback
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 |
|---|---|---|
staff_role | The staff role that sees the Payments page, can check Stripe and is told about new payments. Optional. | admin |
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_WEBHOOK_SECRET secret, the STRIPE_SECRET_KEY secret. A Stripe webhook endpoint at the URL get_contract lists for stripe-checkout-events (Backend, API in the builder), sending checkout.session.completed, with its signing secret in STRIPE_WEBHOOK_SECRET.
Add the Stripe payment received template (slug "stripe-payment-received") 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 (staff_role: who manages payments).{
"tool": "use_template",
"arguments": {
"slug": "stripe-payment-received",
"project_id": "<your project id>",
"params": {
"staff_role": "admin"
},
"dry_run": true
}
}appbricx templates use stripe-payment-received --param staff_role=admin --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-eventsOne-off payments
Block. Take a card payment for any record (a booking, an order, an invoice) through Stripe Checkout, confirmed by the server.
paymentPayableListMyPaymentspayment-checkoutstripe-payment-eventsWelcome email
Workflow. Emails every new person a short, friendly welcome the moment they sign up.
welcome-email