r/payments
What I learned integrating Razorpay Subscriptions + UPI Autopay for a solo SaaS (things the docs don't make obvious)
- upvotes
- 2
- comments
- 2
Post
Highlighted: the lines this signal was extracted from
I just launched a small paid SaaS (GST invoicing) as a solo dev and wired up Razorpay subscriptions end to end. A few things cost me time, so sharing in case it helps someone: UPI Autopay is not on by default. Checkout showed only cards for subscriptions. You have to ask Razorpay support to enable UPI Autopay, and test mode and live mode are enabled separately. Don't trust the Checkout success callback alone. Verify the signature server-side: HMAC-SHA256 of `payment_id|subscription_id` with your key secret. Then fetch the subscription from the API to get `current_end` for the access expiry. Webhooks are your real source of truth. Renewals, halts and cancellations only reach you there. Verify `X-Razorpay-Signature` against the raw request body, not parsed JSON, or it will fail. Put the user id in subscription `notes` when you create it. That way the webhook can always map an event back to a user, even if your DB write failed earlier. Never let the client decide who is "paid". I store the paid-until date in a table users can read but not write (Postgres row-level security), and only the webhook/server function updates it. Cancel with `cancel_at_cycle_end: 1` so users keep what they paid for. Fewer refund requests, fewer angry emails. KYC review looks at your website. Terms, privacy, refund policy, contact page and a visible pricing page with your legal name made...
Keep reading with a free account
The rest of this post, and every signal for Razorpay, is in your free account.