Looking for Razorpay test cards for subscriptions? The usual 4111 1111 1111 1111 is refused for recurring payments. Use Visa 4718 6091 0820 4366 with any future expiry and CVV, a mobile number that is not a repeated or sequential pattern, skip the card-saving OTP, and finish on the mock bank page by clicking "Pay on bank's page" and then Success. Checked on 19 November 2026.
I found all of this the slow way while wiring a ₹99 a month plan for the Writeouts Partner Program. Checkout kept accepting the card number and then failing with "This card is not eligible for recurring payments. Please use a different card." Nothing in the first page of Razorpay's docs explains why, so here is the full set of steps that worked, the ones that did not, and how to check the result through the API.
Which test card works for a Razorpay subscription?
Step | What works in test mode | What fails |
|---|---|---|
Mobile number | Any plausible Indian number, e.g. 9123456780 | 9999999999 and 9876543210 ("Please enter a valid mobile number") |
Card | Visa 4718 6091 0820 4366, any future expiry, any CVV | 4111 1111 1111 1111 (not eligible for recurring); 5104 0600 0000 0008 (treated as international) |
Card-saving OTP | Click "Skip OTP" | Typing a made-up OTP |
Bank OTP | Click "Pay on bank's page", then "Success" on the mock bank page | Typing 123456 into the OTP box |
Razorpay keeps its own list of test cards for recurring payments. The Visa number above is the one from that list that went through for me on a fresh account; the two that failed are the ones most people reach for first.
Why does 4111 1111 1111 1111 fail for subscriptions?
A subscription payment is not a plain charge. It registers a card mandate under the Reserve Bank of India's rules for recurring payments, and Razorpay's test environment only accepts cards it has marked as mandate-capable. The generic Visa number is not one of them. The refusal comes back from the payments/create/ajax call with the reason card_mandate_card_not_supported, and Checkout shows a "Try again" screen. No payment object is created, so the dashboard shows nothing either, which makes the failure easy to misread as a problem in your own code.
The Mastercard that looks domestic but is not
The next card many people try is 5104 0600 0000 0008. On an account that accepts only domestic cards, which is the default for a new Indian merchant, it fails with "International cards are not supported" and the reason international_transaction_not_allowed. Unlike the 4111 case, this one does create a failed payment, so it appears in the dashboard's payments list. If you are watching for your first success, do not let that entry mislead you: it is the refusal, not a charge.
The three screens after the card details
Visa 4718 6091 0820 4366 with any expiry in the future and any three-digit CVV registered the mandate and charged the first cycle. Before it did, Checkout showed three screens that are easy to get stuck on:
"Save your card as per RBI guidelines?" A consent prompt, sometimes a checkbox under the card form and sometimes a dialog. It must be accepted; a subscription cannot proceed without a saved card.
"Securely saving your card." An OTP screen for tokenising the card. In test mode there is a Skip OTP link; use it.
"Enter OTP to complete payment." The bank's OTP. Typing a number here did nothing for me. Click Pay on bank's page instead. A popup opens on Razorpay's mock bank page with a Success and a Failure button, and Success completes the payment.
After Success, the popup closes, Checkout shows "Payment Successful", and the handler you passed to Checkout receives razorpay_payment_id, razorpay_subscription_id and razorpay_signature.
Two smaller traps on the contact step
Obvious test numbers are rejected. 9999999999 and 9876543210 are both refused as invalid, even though older Razorpay examples use them. A number that neither repeats nor runs in sequence, such as 9123456780, passes.
A prefilled email can be flagged too. After fixing the phone number, Checkout once complained about an email it had prefilled from my own
prefilloption. Retyping the same address cleared it. If your test automation fills these fields, type them key by key rather than setting the value in one go; the form validates on input events.
How do I confirm the subscription actually went through?
Do not trust the browser alone. Read the subscription back through the Subscriptions API with your test key:
curl -u rzp_test_xxx:secret https://api.razorpay.com/v1/subscriptions/sub_XXXXA successful first charge shows "status": "active" and "paid_count": 1, with current_end set to the end of the first cycle. If you see "status": "authenticated" instead, the mandate exists but nothing has been charged yet, which happens when the plan's first charge is scheduled for later. If it is still "created", the checkout never completed. The payment itself should read "status": "captured" for the plan amount in paise, 9900 for ₹99, and carry a token_id, which is the saved card the next cycle will charge.
Checking the webhook with the same test
A subscription in test mode fires the same events as a live one, so this is also the moment to check your webhook. Create the webhook in the dashboard under Account & Settings, or through the Webhooks API, pointing at a public URL, and give it a secret. After the Success click you should receive subscription.authenticated, subscription.activated, subscription.charged and payment.captured within a few seconds. Verify each one by computing an HMAC-SHA256 of the raw request body, exactly as received and before any JSON parsing, with the webhook secret, and comparing it to the X-Razorpay-Signature header with a constant-time comparison. Razorpay also sends an X-Razorpay-Event-Id header that stays the same across redeliveries, which is the right key for making your handler idempotent.
If your server runs on localhost, the webhook cannot reach it. Rather than tunnelling, I signed a copy of the real event body with my own secret and posted it to the local route, then sent a second copy signed with the wrong secret. The first should return 200 and the second 400. That checks the signature code without depending on Razorpay's delivery.
Setting up the plan for the test
A subscription needs a plan, and plans are per mode: a plan created with live keys does not exist in test mode. The quickest way to create one is the API:
curl -u rzp_test_xxx:secret -X POST https://api.razorpay.com/v1/plans \
-H 'Content-Type: application/json' \
-d '{"period":"monthly","interval":1,"item":{"name":"Partner, monthly","amount":9900,"currency":"INR"}}'The response carries a plan_... id. Create the subscription server-side with that plan_id, a total_count (120 for ten years of monthly cycles), customer_notify: 0 so Razorpay sends the customer no payment links of its own, and an expire_by a couple of hours out so an abandoned checkout leaves nothing behind. Put your own user id in notes; the webhook can then be matched to the right account even if the browser never reports back.
What about UPI in test mode?
On a desktop browser, Checkout offers UPI for a subscription only as a QR code, because a recurring UPI mandate has to be approved inside a UPI app. The familiar success@razorpay test ID has no input box to go into on that screen. If you need an automated end-to-end test, cards are the practical route; if you want to see the UPI AutoPay flow, test it from a phone.
Cleaning up after a test
Test subscriptions keep their status forever unless you cancel them, and a stray active test subscription can confuse later debugging. Cancel each one with POST /v1/subscriptions/sub_XXXX/cancel and {"cancel_at_cycle_end": 0}. Plans cannot be deleted, but they are harmless.
Frequently asked questions
Does the 4111 card work for one-time Razorpay payments?
Yes. The restriction is specific to recurring payments, where a mandate is registered. For an ordinary order the generic card still goes through.
Why does the subscription show "authenticated" rather than "active"?
The mandate was registered but no cycle has been charged yet, usually because the plan's first charge is scheduled for a later date. Only active or completed with a paid_count above zero means money moved, so treat authenticated as "not yet paid" in your own system.
Can I type any OTP on the mock bank screen?
In my runs, no. The in-Checkout OTP box did not accept a made-up code, but "Pay on bank's page" opened the mock bank page, where the Success button completes the payment every time.
Do these numbers work in live mode?
No. Test cards work only with rzp_test_ keys. In live mode a real card is charged, so test the live account with a real payment of the smallest plan and refund it from the dashboard afterwards.
Everything above was checked on 19 November 2026 against a new Razorpay account in test mode, with a ₹99 monthly plan created through the Plans API and a browser driven by Playwright. Razorpay changes its test environment from time to time, so if a step here stops matching, the error reason in the payments/create/ajax response is the quickest way to see what it wants.
Edited by Rajat Chauhan. How articles here are written and edited.
0 comments
Sign in to join the discussion.
Loading comments…