Integrate Razorpay for COD-to-Prepaid WhatsApp Campaigns

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

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


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 Settings → API 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 URL as https://app.quickreply.ai/api/razorpay/payment-authorized
  2. Enter the secret key from your QuickReply.ai Account Settings
     
    (Please note that this secret key is secret key of your QuickReply.ai account. It is not same as the one we generated above)

  3. In the Alert Email field, enter the email address devs@quickreply.ai 
  4. Select the required events from the list of Active Events.
    1. Payment Events
      1. 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.
    • Related Articles

    • How to Collect WhatsApp Business Opt-Ins for your Shopify Store?

      What is an opt-in? An opt-in is when your consumers provide you with their phone number and they agree to receive messages from your business via WhatsApp. Before you send a consumer an outbound WhatsApp message, you must first collect opt-ins. ...
    • Merge Fields for WhatsApp Campaigns

      Category Name Description Customer ${data.name} Name of the customer who has placed the order ${data.name.split(' ')[0]} First Name of the customer who has placed the order Checkout ${data.abandoned_checkout_url} Checkout Url to recover cart for the ...
    • How to enable Facebook Business verification option

      If you have faced issue during Facebook Business Manager Verification that verification option is not enabled, follow the steps below. Please note we creating this app only to enable verification option. This app or any information entered here will ...
    • Can users block or report WhatsApp Business API number?

      Yes, your users can report and block your number.  Reporting or blocking by your users can affect your WhatsApp number quality and can get your number flagged.  Read here on Account Quality, Messaging Limits & Tiers How can users report or block a ...
    • How to connect QuickReply.ai with LeadSquared for WhatsApp automation

      You can use WhatsApp connector app available on LeadSquared. Configure the details given below to use QuickReply.ai to send messages to WhatsApp via LSQ workflow/automations.  URL: https://cloudfunc.intelliticks.com/api/leadsquared/whatsapp Username: ...