Facebook Pixel

How do I test Razorpay before going live?

Use test mode (rzp_test_ keys), test cards (4111 1111 1111 1111 for success), test UPI (success@razorpay), ngrok for local webhook testing, test the complete flow (create → pay → verify → webhook), test failures and refunds, and test subscriptions. Switch to live mode only after full testing and KYC completion.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Razorpay Summary and Complete Integration Node.js Payment Gateway Guide

Setup (account, keys, SDK), create order endpoint, frontend checkout, payment verification with signature, webhook handling (payment.captured, payment.failed, refund.processed), subscriptions (plans, recurring billing), security (verify signatures, don't trust frontend amounts), and testing (test mode, test cards, ngrok).

Backend creates order → frontend opens checkout with order ID → customer pays → Razorpay sends payment ID and signature to frontend → frontend sends to backend → backend verifies signature → backend updates database → Razorpay sends webhook → backend verifies webhook signature → backend updates database (source of truth).

RAZORPAY_KEY_ID (rzp_test_ or rzp_live_), RAZORPAY_KEY_SECRET (from dashboard), and RAZORPAY_WEBHOOK_SECRET (set when creating the webhook in the dashboard). Store in .env, never in code or frontend.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.