Razorpay
This guide will help you to setup Razorpay in your site
For using Razorpay, you need to have an account first. You can create an account here.
After creating an account, you will be redirected to the dashboard. Here you can find your API Key
and API Secret
under the Settings
section.
Update the RAZORPAY_KEY
and RAZORPAY_SECRET
in the .env
file which are key_id and key_secret respectively.
The first Pricing plan on the landing page uses razorpay payment gateway. You can see that in component/landing-page/Pricing.tsx
For using the razorpay payment gateway, you just need to pass this /api/payment/razorpay/checkout/?amount='Your amount'
in the buy button.
This will redirect you to the razorpay payment page.
After successful payment, you will be redirected to the /api/payment/razorpay/success/
.
This will create an order in the database and you will be able to see the order in the admin panel.