Advertisement

Razorpay Test Card Numbers

Razorpay test cards for domestic (Indian) and international payments, cards for each error scenario, subscription and EMI cards, and the test UPI IDs.

Advertisement

Domestic (Indian) cards that succeed

Indian cards for domestic payments. They use the mock bank page or OTP screen.

BrandNumberResultCopy
Visa4100 2800 0000 1007Succeeds
Mastercard5555 5100 0008 1006Succeeds
Mastercard5180 2872 0009 1001Succeeds
RuPay6527 6589 0000 1005Succeeds
Diners3608 280009 1007Succeeds
Amex3402 560004 01007Succeeds

Source: Razorpay docs – Test Cards Details to Test Payments and Subscriptions, Razorpay docs – Test UPI ID Details · checked October 2026. Sandbox only — these numbers never work for real payments.

Advertisement

How Razorpay test cards work

Razorpay test cards only work with your test API keys (they start with rzp_test_). No money is deducted. If you use them with live keys you get “card issuer is invalid” or “invalid card input”.

Use any CVV and any future expiry date. In test mode Razorpay shows a mock bank page with Success and Failure buttons. When an OTP is requested, any OTP of 4 to 10 digits succeeds and any shorter OTP fails.

For UPI, use success@razorpay to simulate a successful payment and failure@razorpay for a failed one. These are for domestic one-time payments. In test mode, cancelling a UPI payment still ends in success, so test cancellations in live mode.

Indian cards are subject to RBI rules on card storage and recurring payments, which is why Razorpay keeps separate cards for subscriptions and EMI. Test each payment type you plan to offer with its own cards, and test international cards only if international payments are enabled on your account.

International cards

Use these when international payments are enabled on your account.

BrandNumberResultCopy
Mastercard5555 5555 5555 4444Succeeds (international)
Mastercard5105 1051 0510 5100Succeeds (international)
Mastercard5104 0600 0000 0008Succeeds (international)
Visa4012 8888 8888 1881Succeeds (international)
Advertisement

Subscriptions and EMI

Cards for recurring payments (subscriptions) and EMI (instalments).

BrandNumberResultCopy
Visa4718 6091 0820 4366Subscription payment succeeds
Mastercard5104 0155 5555 5558Subscription payment succeeds
Mastercard5104 0600 0000 0008Subscription payment succeeds
Mastercard5241 8100 0000 0000EMI payment succeeds

Error scenarios (select “Failure” on the mock bank page)

Start a payment with one of these cards, then click Failure on the mock bank page to get the error shown. Each error has a Visa and a Mastercard card.

BrandNumberResultCopy
Visa4100 2800 0009 0000payment_timed_out (BAD_REQUEST_ERROR)
Mastercard5305 6200 0006 0000payment_timed_out (BAD_REQUEST_ERROR)
Visa4100 2800 0008 0001insufficient_fund (BAD_REQUEST_ERROR)
Mastercard5305 6200 0005 0001insufficient_fund (BAD_REQUEST_ERROR)
Visa4100 2800 0007 0002payment_cancelled (BAD_REQUEST_ERROR)
Mastercard5305 6200 0004 0002payment_cancelled (BAD_REQUEST_ERROR)
Visa4100 2800 0006 0003card_declined (BAD_REQUEST_ERROR)
Mastercard5305 6200 0003 0003card_declined (BAD_REQUEST_ERROR)
Visa4100 2800 0005 0004card_declined (BAD_REQUEST_ERROR)
Mastercard5305 6200 0002 0004card_declined (BAD_REQUEST_ERROR)
Visa4100 2800 0004 0005card_declined (BAD_REQUEST_ERROR)
Mastercard5305 6200 0001 0005card_declined (BAD_REQUEST_ERROR)
Visa4100 2800 0003 0006card_disabled_for_online_payments (BAD_REQUEST_ERROR)
Mastercard5305 6200 0000 0006card_disabled_for_online_payments (BAD_REQUEST_ERROR)
Visa4100 2800 0001 0008card_number_invalid (BAD_REQUEST_ERROR)
Mastercard5305 6200 0008 0008card_number_invalid (BAD_REQUEST_ERROR)
Visa4100 2800 0002 0007gateway_technical_error (GATEWAY_ERROR)
Mastercard5305 6200 0009 0007gateway_technical_error (GATEWAY_ERROR)
Visa4100 2800 0000 0009authentication_failed (GATEWAY_ERROR)
Mastercard5305 6200 0007 0009authentication_failed (GATEWAY_ERROR)

Testing Razorpay payments step by step

  1. Generate test API keys in the Razorpay Dashboard (test mode).
  2. Open Checkout with a test order and pay with a domestic card; choose Success on the mock bank page.
  3. Repeat with each error card and choose Failure to check your handling of each error reason.
  4. Verify the payment signature on your server and test your webhooks with the test events.

Common errors and fixes

“Card issuer is invalid”
You are using test cards with live API keys.
Error card returns success
Choose Failure on the mock bank page; the card only sets which error is returned.
Saved card disappears
Card tokens in test mode are only valid for 3 days.

Sources

Every number on this page was copied from Razorpay’s official documentation and passes the Luhn check. Checked October 2026; gateways change their test data from time to time, so if a number stops working, check the source:

Test cards only work in Razorpay’s sandbox or test mode. To test your own form validation before a request reaches the gateway, use our card number generator and validator. Never use real customer cards in test environments.

Frequently asked questions

What is the Razorpay test card number?

For domestic payments, 4100 2800 0000 1007 (Visa) or 5555 5100 0008 1006 (Mastercard). Use any CVV and any future expiry date.

What OTP should I use in Razorpay test mode?

Any OTP of 4 to 10 digits succeeds. An OTP shorter than 4 digits fails.

What is the Razorpay test UPI ID?

success@razorpay for a successful payment and failure@razorpay for a failed one.

Can I use these test cards on another gateway?

Usually not. Each gateway only recognises its own documented test numbers in its own sandbox. Some numbers, such as 4111 1111 1111 1111, appear in several lists, but the results they trigger differ. For format-only testing on your own forms, use our card generator.

Related tools

Advertisement