All Collections
Payment providers
How To Connect Razorpay
How To Connect Razorpay

How to accept payments with Razorpay in your membership bot (India only)

Yury Smykalov avatar
Written by Yury Smykalov
Updated over a week ago

Razorpay is a payment company that provides payment solutions to online merchants in India. With Razorpay and InviteMember, you can accept Domestic and International Credit & Debit cards, EMI, Netbanking from 58 banks, UPI, and 8 mobile wallets.

You can connect your Razorpay account in Test or Live mode. In Test mode, you can only make test payments.

Recurring subscriptions with Razorpay are still under development. Even if your subscription plan in @InviteMemberBot is recurring, a user will need to renew his subscription manually each month.

Important note: Your subscription plan currency must be INR (Indian Rupee) in order to accept payments via Razorpay.

1. Open a merchant account

To open a Razorpay account, please open and click Sign Up

Complete the registration and you'll get access to Razorpay Dashboard:

2. Add API keys to InviteMember

To connect your Razorpay account to InviteMember, you'll need to generate your API keys first. 

Please make sure that you're using Dashboard in the correct mode (Test mode or Live mode):

You won't be able to use test API keys for live payments and vice versa.

To generate a new pair of keys, please open the API Keys tab in Settings:

Keep them safe! Now you should open @InviteMemberBot in Telegram, send /myprojects, select your project, click Payment options, then Razorpay Test, and, finally, Connect Razorpay Test.

Send your Key Id in the first message, then your Key Secret:

@InviteMemberBot will check them and provide you with a webhook URL & a secret for the next step.

3. Setup InviteMember webhook (important!)

Please note that you must set a correct webhook in your Razorpay Dashboard, otherwise, InviteMember won't get any information about successful payments & subscriptions.

Open the Webhooks tab in Settings and set up a new webhook.

Please double-check that you're using the correct URL & secret that you received from @InviteMemberBot. Don't forget to enable all webhook events that @InviteMemberBot has asked you for:

Test your integration

To check if Razorpay Test is successfully connected, you can use this card:

5104 0155 5555 5558 (CVV, expiry date — any)

To check Razorpay Live you can use your own real card.

Did this answer your question?