How to integrate Razorpay for COD-to-Prepaid WhatsApp Campaigns?

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

  1. Share Razorpay's API key & Secret with us over support@quickreply.ai

  2. Setup the callback url in Razorpay

Generate Razorpay API Keys

Note: If you have already have your Razorpay API key & secret with you, jump to section.

  1. Log into your Dashboard with appropriate credentials.

  2. 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:

Test mode API keys

Live mode API keys

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.

Regenerate API Keys

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:

  1. Log into the Razorpay Dashboard.

  2. Select the mode for which you want to generate the API key from the menu ribbon.

  3. Navigate to SettingsAPI Keys.

  4. 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.

Set up Callback URL

To set up webhooks:

  1. Log into the Razorpay Dashboard and navigate to Settings → Webhooks.

  2. Click the + Add New Webhook button.

In the Webhook Setup pop-up page:

  1. 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.

Share the keys with QuickReply.ai Support

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.

Last updated