Including a payment method simplifies the process of transferring money, especially for e-commerce transactions.
By following these steps, we can seamlessly set up and integrate the Razorpay Payment Gateway for our school:
Create a Razorpay Account.- Visit the Razorpay website and click Sign Up at the top-right corner.
- Fill in the required details and complete the sign-up process.
- Enter your details, upload the necessary documents, and submit the form for verification.
- The KYC process usually takes 3-4 business days. Until the KYC is completed, your account will only function in Test Mode and not Live Mode.
- Once your Razorpay account is approved, log in and switch from Test to Live Mode using the button at the top-right corner.
To access the live mode in Razorpay, you need to fill out and submit the KYC Form. Until your account is activated, you can only use Razorpay in test mode.
Generate Secret Keys:
- In Live mode, go to Account and Settings. Locate Website and App Settings and click on API keys.
- Click on Regenerate Live Key. This action will prompt a pop-up window to appear where you can view your API key and Key ID (Key Secret) for your account.
- This key can be viewed only once. so click on download key details to save them.
Add Razorpay Gateway to Learnyst:
- Login to your Learnyst account and navigate to settings.
- Select Payment Gateway and then click on Razorpay.
- For the Merchant Key ID field, enter the Key ID that we had downloaded earlier from the Razorpay dashboard.
- For the Merchant Key Secret Field, Enter the Merchant Key Secret.
If you lose your Secret Key, you can regenerate it by clicking on Regenerate Live Key again.
- Webhooks in Razorpay provide instant notifications about key events, like successful payments, directly to your preferred platform, streamlining payment management.
- Within your account settings in Razorpay, click on the Webhooks option located next to API Keys.
- Click on Add New Webhook. In the Webhook URL field, enter the below URL
https://api.learnyst.com/learner/v7/webhook/razorpay_webhook - Choose a distinct Secret Key (e.g., "Hello@learnyst") to enter into the Secret Field. Remember to keep this Secret Key confidential for security purposes.
- Select order.paid and payment.authorized under Active Events.
- Click on Create Webhook.
- Return to the payment gateway page, and input your webhook secret in the designated field. In my scenario, I inputted my Secret key as "Hello@learnyst".
- Click Save to make the required changes.
- After completing the configuration, click on Publish Payment Gateway and then click on Publish to save your changes.
Razorpay is primarily used for transactions within India in the INR currency. For businesses looking to accept global payments, alternative options such as Paypal and Stripe can be explored.