Skip to content
Splashify Pro
Docs

Razorpay

Connect Razorpay and your customers get a WhatsApp message the moment their payment goes through, or a friendly nudge when it fails. Once it is connected, you can also send Razorpay payment links from any WhatsApp chat.

Before you start

  • A Razorpay account. Test mode is fine for trying it out.
  • An approved WhatsApp template for each message you want to send, for example a "payment received" message. See Create a WhatsApp template. Most templates are approved within 24 hours.
  • Your WhatsApp number connected. See Connect WhatsApp (WABA).

Where to find your Razorpay keys

The app asks for three things. You get them from your Razorpay Dashboard:

Test mode and Live mode

Razorpay keeps separate keys and webhooks for Test mode and Live mode. Use the keys and the webhook from the same mode.

Connect Razorpay

  1. Open Razorpay in the app

    In the left sidebar, click Integrations. Under Payments, find Razorpay (or type it in Search integrations) and click Connect.

  2. Add your Razorpay keys

    Under Add your Razorpay keys, paste the Key ID and the Key Secret, and type your Webhook Secret. Click the eye icon in a box to check what you typed. The step gets a green tick when all three are filled in.

    The Razorpay page with the Key ID rzp_test_demo_4f8a2c1b, the Key Secret and the Webhook Secret filled in, 1 of 3 steps done, and the Connect Razorpay button at the bottom
    Step 1: the three keys from your Razorpay Dashboard
  3. Choose a message for each event

    Under Choose a message for each event there are two events:

    • Payment Captured: the payment went through.
    • Payment Failed: the payment did not go through.

    Click an event to open it. Pick a Template. Leave Send it to on Customer Phone (contact), the number the customer typed at checkout. Under Fill the variables, choose what goes into each blank, for example Order ID and Payment ID. The Preview shows your message with the blanks marked in green.

    An event you leave empty says No message, skipped. Nothing is sent for it.

    The Payment Captured event opened with the payment_received template, Send it to Customer Phone (contact), the variables Order ID and Payment ID, and a preview of the message. Payment Failed below sends payment_retry
    Step 2: one template for each event
  4. Click Connect Razorpay

    Click Connect Razorpay in the bar at the bottom. Nothing is saved until you do. You will see Razorpay is connected.

  5. Copy the webhook URL

    Under Paste this URL in Razorpay, click the copy button next to the URL. The URL already has your account in it.

  6. Add the webhook in Razorpay

    In your Razorpay Dashboard, open Account & Settings, then Webhooks, and click Add New Webhook:

    • Webhook URL: paste the URL you copied.
    • Secret: type the same Webhook Secret you typed in our app.
    • Active Events: tick payment.captured and payment.failed.

    Click Create Webhook.

  7. Check that it works

    Make a small test payment. Back on the Razorpay page in our app, the top says Active, and Last event on the right says Sent.

    Razorpay connected and Active, with the Active switch on, the last event Sent 18 minutes ago and a See all activity link
    Connected: Active, with the last event on the right

What you can put in the message

The amount is in paise

Razorpay sends amounts in paise. If your template says Rs {{2}} and you fill it with Amount (paise), a Rs 1,499 payment reads as Rs 149900. Leave the amount out of the message, or use the order number instead. Customer Name is usually empty too, because Razorpay does not send a name with a payment.

For accounts in India.

Once Razorpay is connected, you can ask for a payment in any WhatsApp chat. Click the green ₹ button (Request a payment) under the reply box, type the Amount (₹) and What is it for?, and click Send payment link. See WhatsApp payments for the full steps.

The Request a payment box in a chat with the amount 5499, the reason Order #1024, red silk saree, a product name and the Send payment link button
The ₹ button in a chat sends a payment link from your own Razorpay account

So that a paid link shows as paid in the app, add a second webhook in Razorpay (Account & Settings, then Webhooks, then Add New Webhook):

  • Webhook URL: https://apis.splashifypro.com/api/v1/webhooks/payments/razorpay
  • Secret: the same Webhook Secret as before.
  • Active Events: payment_link.paid, payment_link.cancelled and payment_link.expired.

Change, pause or disconnect

  • Change a message: open the event, make your change, then click Save changes in the bar at the bottom (or Discard to undo).
  • Stop one message: open the event and click Stop messaging for this event, then Save changes.
  • Pause everything: switch Active off on the right. Razorpay events are ignored until you switch it back on.
  • Disconnect: click the ⋮ button at the top right, then Disconnect, and confirm. Your keys and message settings for Razorpay are deleted.

If a message did not go out

Open the Activity tab on the Razorpay page. Each event shows what happened.

More fixes are in Troubleshooting.