A Razorpay test card is a dummy card number that works only inside the Razorpay Test Mode sandbox. You pair it with a test API key, a future expiry date, and any three digit CVV to simulate a payment without moving real money. Razorpay publishes the current list of test card numbers in its developer docs, and that list changes as new scenarios get added.

Test cards exist so you can build a checkout flow, retry logic, and webhook handling before a single live transaction runs. They never touch a card network. The gateway fakes the bank response and hands your code a normal success or failure payload.

What Is a Razorpay Test Card?

A Razorpay test card is a placeholder number reserved for sandbox use. It looks like a real card and passes the same checksum validation, so your form logic treats it as valid.

  • It works only with test API keys that start with rzp_test_.
  • No money moves. Balances, refunds, and settlements in Test Mode are simulated figures.
  • Each number maps to a scripted outcome, such as success, failure, or a specific decline reason.

How Does Razorpay Test Mode Work?

Test Mode is a parallel version of your Razorpay account. The dashboard, payment IDs, and webhooks all behave like production, but the bank step is mocked.

  1. Log in to the Razorpay Dashboard and flip the mode switch to Test.
  2. Generate a test key pair (key ID and secret) from the API keys page.
  3. Drop the test key into your checkout script or server SDK.
  4. Open your payment page and enter a card number from the Razorpay test card docs.
  5. Complete the on screen bank simulation, which gives you success and failure options.
  6. Confirm the result in the Test Mode payments list and check your webhook log.

What happens at the mock OTP step?

Razorpay replaces the real bank page with a simulation screen. It displays the outcome choices and, when the flow calls for one, tells you which OTP value to type. Enter what the screen shows and the payment resolves on the spot.

Do test keys and live keys mix?

No. A test key with a live card fails, and a live key with a test card fails. Keep the two key sets in separate environment files so a deploy never loads the wrong one.

What Test Card Numbers Does Razorpay Provide?

Razorpay groups its test numbers by card network and by the outcome you want to trigger. The long standing example is 4111 1111 1111 1111, a Visa number that returns a successful payment in most sandbox setups.

  • Success cards: complete the payment and fire the payment.captured webhook.
  • Failure cards: return a failed payment so you can test error screens and retry paths.
  • Scenario cards: mimic declines such as insufficient funds, expired card, or blocked card.
  • Network cards: cover Visa, Mastercard, RuPay, and American Express for routing tests.

Copy the numbers from the official docs page rather than a blog post. Razorpay retires old numbers and adds new ones, and a number that worked last year may return a different result today.

Which CVV and Expiry Date Should You Use?

Any three digit CVV is accepted on a test card, and 123 shows up as the sample in most of the docs. American Express test cards use a four digit CID instead.

The expiry date must sit in the future. Type an expired month and year and the gateway returns a failure response instead of a success. Cardholder name, ZIP code, and billing address can be any value your form accepts, unless a scenario card is designed to test address validation.

Can You Test Anything Besides Cards?

Yes. Test Mode also covers UPI, netbanking, wallets, and EMI, which matters for checkout flows in India.

For UPI, Razorpay documents sample VPA handles such as success@razorpay and failure@razorpay that force a result. For netbanking, you pick a test bank from the list and the simulation page handles the rest.

Common Mistakes When Testing Razorpay Payments

  • Using a test card with a live key. The decline message looks like a bank rejection and sends people down the wrong path for an hour.
  • Typing a past expiry date. Use next year and move on.
  • Hardcoding a test key into a mobile build that later ships. Move keys to a server side config before release.
  • Ignoring webhooks. Test Mode sends real webhook payloads to your endpoint with signed headers, so this is your one chance to verify signature checks.
  • Testing only the happy path. Add at least one failure card and one timeout case to your suite.
  • Forgetting to clear the test data before launch. Old orders and customers clutter the live dashboard if your scripts point at the wrong database.

Why You Should Never Use Real Card Data in Test Mode

A live card number belongs to a real person, and running it through a sandbox does not make it safe to store, log, or share. PCI DSS rules forbid keeping the CVV after an authorization, and RBI rules bar merchants from storing card credentials in readable form. If you need a card on file for repeat payments, use network tokenization instead of raw numbers.

The same logic applies to buying or trading card data from any source. Those numbers carry no consent, no authorization, and no legal use in a payment integration. Test cards exist precisely so nobody has to touch live credentials during development.

FAQ

Do Razorpay test cards charge real money?

No. Test Mode is a sandbox and every balance shown there is simulated.

Do test cards work in live mode?

No. Live mode rejects test numbers and test mode rejects live numbers. The two environments stay apart by design.

How long is a Razorpay test card valid?

The number stays valid until Razorpay changes it. The expiry date you type is what the sandbox checks, so a future date keeps the test passing.

Can I test subscriptions or recurring payments with a test card?

Yes, if the feature is enabled on your account. Razorpay documents the extra mandate and e-mandate steps for sandbox testing in the same section.

Where do I find the current test card list?

In the Razorpay developer docs under the test card page. Bookmark it and recheck before a big test run, since numbers and their scripted outcomes get updated.