Appbricx
Features

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Organisations and teams
  • Payments

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
All features
ShowcaseTemplatesPricingDocs
Log inStart free
  • Features
  • Showcase
  • Templates
  • Pricing
  • Docs
  • Log in

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Organisations and teams
  • Payments

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
  1. Home
  2. Templates
  3. Razorpay payments

Block · Payments and billing

Razorpay payments

For apps whose customers pay in India. 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 Razorpay's hosted Payment Link page (UPI, cards, netbanking, wallets) for exactly that record's price, so the app needs no payment script. When Razorpay sends them back, a server function checks Razorpay's signature on the result before the page says the payment went through, and Razorpay's signed payment_link.paid webhook marks the payment paid only when it collected the right amount. Payers read only their own payments and rules stop anyone changing an amount or marking a payment paid. One-time payments only (no subscriptions).

Use in AppbricxFree. Already have an account? Log in
View the files

use_template { slug: "razorpay-payments" } adds

Tables
payment
Components
RazorpayPayList, RazorpayPayments
Pages
/pay, /my-payments, /payments-admin
Workflows
razorpay-checkout, razorpay-payment-verify, razorpay-payment-events, payment-paid-notify
Rules
2 on payment

What it adds to your app

Table payment linked to your table. RazorpayPayList and RazorpayPayments components with their pages. Server functions: create a Payment Link and verify Razorpay's signed callback. A Razorpay-signed webhook that marks payments paid or not completed. A staff payments page.

Tables

  • payment record_id, payer_id, amount, currency, status, razorpay_link_id, razorpay_payment_id, paid_at

Pages

  • /pay Pay (‹payer_role›)
  • /my-payments My payments (‹payer_role›)
  • /payments-admin Payments (@staff)

Workflows

  • razorpay-checkout Create a Razorpay Payment Link for one ‹attach_to›. On server function (‹payer_role›)
  • razorpay-payment-verify Check the signed result Razorpay sends people back with. On server function (‹payer_role›)
  • razorpay-payment-events Apply Razorpay's payment link events to payments. On webhook razorpay-payment-events
  • payment-paid-notify Thank the payer when a payment goes through. On payment updated

Components

  • RazorpayPayList What the signed-in person can pay for, with a Pay button that opens a Razorpay Payment Link
  • RazorpayPayments The signed-in person's payments; checks Razorpay's signed result on the way back

Rules on every write

  • payment A payment starts as pending and matches the price.
  • payment Only Razorpay 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.

ParamWhat it isExample
attach_toThe table whose records people pay for (bookings, orders, invoices).booking
price_fieldThe number field on that table holding what to charge. Optional.total
payer_roleThe role whose people pay (their own table is the payer). Optional.customer
payer_refOptional: the ref on that table naming the person who owes it, so people only see and pay their own. Optional.customer_id
currencyThe three-letter currency code, upper case (Razorpay takes INR and other currencies your account enables). Optional.INR

Use with your coding agent

  1. Connect the Appbricx MCP server to Claude Code, Cursor or any MCP client (quickstart).
  2. Paste the prompt. The agent reads the template, previews the merge with dry_run and shows you the diff.
  3. It applies to dev. Check it, then deploy when you are happy.

Needs the RAZORPAY_KEY_ID secret, the RAZORPAY_KEY_SECRET secret, the RAZORPAY_WEBHOOK_SECRET secret. A table with a number price field.

Prompt
Add the Razorpay payments template (slug "razorpay-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).
MCP call
{
  "tool": "use_template",
  "arguments": {
    "slug": "razorpay-payments",
    "project_id": "<your project id>",
    "params": {
      "attach_to": "booking",
      "price_field": "total",
      "payer_role": "customer",
      "payer_ref": "customer_id",
      "currency": "INR"
    },
    "dry_run": true
  }
}
CLI
appbricx templates use razorpay-payments --param attach_to=booking --param price_field=total --param payer_role=customer --param payer_ref=customer_id --param currency=INR --dry-run

Goes 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-events
  • One-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-events
  • Stripe 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-received

Your agent adds it. Appbricx runs it.

Start freeAll templates
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPUI components and hooksTemplatesVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authOrganisations and teamsPaymentsWorkflows and jobsServer functions and webhooksAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcaseTemplatesPricingFor coding agentsPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use