← knowledge.oriz.in

Razorpay donation button — pl_T4iEPIDcALKLPk, one-click flow

decision decisionrazorpaydonationsponsorbillingbutton

Razorpay donation button

Decision

Mount a Razorpay-hosted donation button (button ID pl_T4iEPIDcALKLPk) across the family as a one-click donation primitive. Separate from the subscription flow — donations are one-time, not recurring.

Button ID

pl_T4iEPIDcALKLPk

This is the Razorpay payment-button ID provisioned in the Razorpay dashboard. The button script + form HTML embeds this ID and Razorpay handles the hosted donation page.

Mount points

Surface Where
Every app /sponsors route (universal — every app exposes this)
oriz-cs-me-app Footer (personal lifestream gets a permanent footer mount)
chirag127.github.io profile README Embedded as a link to oriz.in/sponsors

Flow

  1. User clicks the button
  2. Razorpay-hosted donation page opens (no redirect to oriz.in needed)
  3. User picks amount (Razorpay UI handles tier picker / custom amount)
  4. Payment completes on Razorpay's side
  5. Webhook fires to our razorpay-webhook-worker for analytics + receipt

Implementation — shared component

Lives in @chirag127/astro-billing package as SponsorButton.astro:

---
// @chirag127/astro-billing/SponsorButton.astro
const BUTTON_ID = 'pl_T4iEPIDcALKLPk';
---
<form>
  <script
    src="https://checkout.razorpay.com/v1/payment-button.js"
    data-payment_button_id={BUTTON_ID}
    async
  ></script>
</form>

Consumers import + drop:

---
import { SponsorButton } from '@chirag127/astro-billing';
---
<SponsorButton />

Why separate from subscription flow

Geo

Razorpay = India-only. International donations route via the donation rails in [[monetisation/max-payment-methods]] (Ko-fi / Buy Me a Coffee / GitHub Sponsors / PayPal.me).

<SponsorButton /> accepts a geo prop and renders the right rail:

<SponsorButton geo="IN" /> {/* Razorpay button */}
<SponsorButton geo="US" /> {/* Ko-fi embed */}

Geo auto-detected via CF cf-ipcountry header by default.

Cross-refs