Payments & Monetization

Integrating Payments, Courses & Bookings Into Your Portfolio (Razorpay)

Add real monetization to a site you've already built — selling paid content and taking paid bookings — using Razorpay's Orders API, Checkout.js, and the one server-side check that actually matters: verifying the payment signature before you grant anything.

10 core sections 7 interactive exercises Grounded in a real, shipped Razorpay integration
Before you start

This course assumes you already have a working backend to attach payments to. If you don't yet, the sibling course "Build Your Own Portfolio in Go: Beginner to Expert" is a helpful, entirely optional prerequisite — it gets you to a running Go server with routes, a database, and handlers, which is the shape every code example here plugs into.

That said, nothing about Razorpay is Go-specific. Everything in this course — the Orders API, the Checkout.js widget, the signature-verification formula, the double-booking fix, the regional pricing logic — applies identically to a Node/Express backend, a Python/Django or Flask backend, a PHP backend, or anything else that can make an outbound HTTPS request and run HMAC-SHA256. Go is used for the concrete code because it's this course's reference implementation, not because Razorpay requires it.

Section 1

What Razorpay Actually Is

Razorpay is an Indian payment gateway and payments aggregator: one account, one API, and one checkout widget that let you accept cards, UPI, netbanking, and wallets without building a separate integration for each.

Payment preferences vary by buyer. Some people pay by card. In India, a large share pay by UPI. Others use their bank's netbanking portal, or a stored wallet balance. Razorpay's value is consolidating all of that behind a single REST API and a single drop-in widget, so you write one integration instead of four.

For a backend, that integration has two moving parts:

That second point is the one worth sitting with. Because the customer types their card number into Razorpay's hosted widget rather than an input your application controls, your frontend and your backend never receive, transmit, or store raw card data. That materially reduces your PCI DSS scope — PCI DSS is the security standard that applies to any system storing, processing, or transmitting cardholder data. When Razorpay's widget owns that surface, your own infrastructure has far less sensitive data to protect, audit, and worry about losing. You still need sound general security practices (this whole course is largely about one of them), but you avoid the much heavier burden of building and certifying a system that directly handles card numbers.

Razorpay is a particularly good fit if your buyers are largely India-based: UPI is a first-class, dominant payment method there, and settlement happens in INR, which keeps your accounting simple. Cards, netbanking, and wallets remain available behind the same integration for everyone else, so you're not maintaining separate payment stacks for different buyer segments.

Finally, and this matters more than it sounds: Razorpay ships a full test mode. It publishes test card numbers and supports simulated UPI flows, so you can build the entire integration — order creation, the widget, signature verification, your access-granting logic — and exercise every success and failure path, without ever moving real money. You should not write a line of the code in this course against live keys. Build and break it in test mode first.

For a solo developer or small business adding monetization to an existing site, that combination — broad India-relevant payment method coverage, a hosted widget that keeps you out of card-data handling, and a test mode that lets you validate the whole flow safely — is what makes Razorpay a reasonable default choice rather than a large infrastructure project.

Section 2