How to integrate Razorpay for COD-to-Prepaid WhatsApp Campaigns?
Last updated
Last updated
Now, you can enable COD-to-Prepaid Campaigns on WhatsApp. In this campaign, QuickReply.ai will send payment requests to end-user on WhatsApp and will incentivise them to prepay for their order now. To enable this payment collection via Razorpay, you need to do the following setup
Share Razorpay's API key & Secret with us over support@quickreply.ai
Setup the callback url in Razorpay
Note: If you have already have your Razorpay API key & secret with you, jump to section.
Log into your Dashboard with appropriate credentials.
Select the mode (Test or Live) for which you want to generate the API key. You can use Test keys for testing. But when you go live, share your live keys
Test Mode: The test mode is a simulation mode which you can use to test your integration flow. Your customers will not be able to make payments in this mode. But you will be able to simulate the end-to-end flow of payment via WhatsApp to order update in Shopify.
Live Mode: When your integration is complete, switch to the live mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers.
3. Navigate to Settings → API Keys → Generate Key to generate key for the selected mode.
4. The Key Id and Key Secret appear on a pop-up page as shown below:
Watch Out: After generating the keys from the Dashboard, download and save them securely. You have to share these keys with us over support@quickreply.ai. If you do not remember your API Keys, you need to re-generate it from the Dashboard and replace it wherever required. In future also, if you regenerate your API keys, you will have to inform us again with the new keys so that we can do the corresponding update on our end.
Once generated, you will be able to see the Key Id, the date the key was created and the expiry date for the API Key on screen.
You also have the option to regenerate the key if required.
Two Factor Authentication: To regenerate API keys, you must validate your identity via OTP sent to your registered mobile number. However, this step is skipped if you already performed OTP validation while logging into the Dashboard. If you have not set up two factor authentication, you will be prompted to verify your mobile number before re-generating keys.
To regenerate API key:
Log into the Razorpay Dashboard.
Select the mode for which you want to generate the API key from the menu ribbon.
Navigate to Settings → API Keys.
Click Regenerate Key.
This gives you the option to de-activate the old key immediately or in 24 hours. Watch the short animation below for more information.
To set up webhooks:
Log into the Razorpay Dashboard and navigate to Settings → Webhooks.
Click the + Add New Webhook button.
In the Webhook Setup pop-up page:
Enter the URL as https://app.quickreply.ai/api/razorpay/payment-authorized
Enter the secret key that you have generated in above steps.
(If you have any previous generated secret key , You can use it here)
3. In the Alert Email field, enter the email address devs@quickreply.ai
4. Select the required events from the list of Active Events.
Payment Events
payment.authorized
5. Click Create Webhook.
Once, you have setup the callback url and have the Razorpay's Key & Secret ready; kindly share that with support@quickreply.ai or with your Account Manager.