Skip to main content
All CollectionsWhatsApp
Creating a COD to Prepaid Flow on Spur (using Razorpay)
Creating a COD to Prepaid Flow on Spur (using Razorpay)
Velma Dinkley avatar
Written by Velma Dinkley
Updated over a week ago

Introduction

Reducing Return to Origin (RTO) issues is crucial for saving time and resources for brands. By using Razorpay within the Spur platform, you can create a flow that automatically generates a payment link and applies a discount if customers choose to convert their Cash on Delivery (COD) orders to prepaid. This automated flow not only encourages customers to switch to prepaid but also ensures a seamless and efficient process, significantly reducing RTO rates.


Steps to Create the Flow

Step 1: Accessing the Spur Dashboard

  1. Login to your Spur account.

  2. Navigate to the Dashboard.

Step 2: Navigating to the Automation Tab

  1. In the dashboard, click on the Automation tab.

  2. Select Create New Flow.
    ​

  1. Choose the channel for your flow:

    1. WhatsApp

  2. Click on Start from Scratch. This opens up a flow with the first block, the Trigger Block.

Step 3: Configuring the Trigger Block

  1. Click on the Trigger Block.

  2. A modal will open. Select the trigger as Order Created.

  3. Under the trigger, there is an Order Type option with the following choices:

    • COD

    • Prepaid

    • All

  4. For this flow, choose COD.

Step 6: Adding a New Block

  1. Click on the Add New Block button.

  2. Select Integration and then choose Razorpay Payment Link.
    ​

Step 7: Configuring the Razorpay Payment Link Block

  1. This will add a new block. Connect this block with the Trigger Block.

  2. In the Razorpay Payment Link block, add the necessary details, including:

    • Discount Percentage (can be % discount or flat off)

    • Payment Link Expiration
      ​

Step 8: Setting Up Conditions

  1. The Razorpay Payment Link block will have three conditions:

    • Payment Completed

    • Payment Failed

    • Link Expired

Step 9: Adding Messages for Conditions

  1. For the Payment Completed condition, add a message that will trigger a payment confirmation message on WhatsApp.
    Note: Add Mark as Paid action button after the Payment complete message block

  2. Similarly, add appropriate messages for the Payment Failed and Link Expired conditions.

Step 10: Connecting to the COD to Prepaid Template Message

  1. On the same Razorpay Payment Link block, there will be a Next Step connection.

  2. Connect this to the COD to Prepaid Template Message. Do not forget to add the variables in the template message.

  3. This will send a message to the customer after the link is generated, prompting them to convert the payment to prepaid using the button in the WhatsApp message.
    ​

Final flow would look something like this:

Did this answer your question?