Razorpay
Route Razorpay payment events to WhatsApp — order confirmations on success, retry prompts on failure. Signed with HMAC-SHA256 so forged events are rejected.
What you get
| Event | Typical template |
|---|---|
payment.captured | ”Payment received ✅” — amount, id, order link |
payment.failed | ”Payment didn’t go through” — amount, retry link |
You can wire one or both events. Each event gets its own template + variable mapping.
Prerequisites
- Razorpay Live or Test account (dashboard.razorpay.com )
- At least one approved WhatsApp template in Splashify — usually with 2-3 variables (amount, customer name, order id)
- Your Splashify WABA active (Dashboard shows WABA connected)
Setup
1. Copy your Splashify webhook URL
In Splashify Pro, open Integrations → Razorpay. Copy the webhook URL — it looks like:
https://apis.splashifypro.com/api/v1/webhooks/integrations/<your-user-id>/razorpay2. Add the webhook in Razorpay
Razorpay dashboard → Settings → Webhooks → + Add New Webhook.
| Field | Value |
|---|---|
| Webhook URL | The URL from step 1 |
| Secret | Generate a random string (32+ chars). Save this — you’ll paste it into Splashify next. |
| Alert Email | Your email |
| Active Events | payment.captured and/or payment.failed |
Click Create Webhook.
3. Paste the secret + pick your template in Splashify
Back on the Razorpay integration page in Splashify → Configuration tab:
- Paste the secret from step 2 into Webhook Secret. This is what locks down forged requests — once set, any unsigned or wrongly-signed POST gets rejected with 401.
- Pick your approved template for
payment.captured. - Set Phone Field →
contact(Razorpay puts the customer phone on the payment entity’scontactfield). - Variable Mappings — for each template variable, choose the payload field:
| Template var | Field path (payment.captured payload) | Sample value |
|---|---|---|
{{1}} | amount | 50000 (in paise) |
{{2}} | currency | INR |
{{3}} | id | pay_29QQoUBi66xm2f |
{{4}} | email | customer@example.com |
{{5}} | notes.order_id | Your passed-through note |
- Repeat for
payment.failed— typicallyamount+error_description. - Toggle Enabled on and Save.
4. Test
In Razorpay dashboard → the webhook you just created → Send Test Event. Splashify receives it, fires the template, and logs the outcome.
Check Integrations → Razorpay → Logs — you should see a sent row within 5 seconds.
Payload reference
Razorpay wraps the payment in payload.payment.entity — Splashify normalizes this so you just use the inner field name (id, amount, contact, etc.) in your field paths.
Key fields on a payment:
id—pay_..., unique per paymentamount— in paise (divide by 100 for rupees; Razorpay doesn’t do this for you)currency—INR,USD, etc.status—captured/failedmethod—card/netbanking/upi/walletemail,contact— customer detailsnotes— any custom key/value you passed at order creationerror_code,error_description— only on failed payments
For the full shape, see Razorpay’s payment webhook docs .
Common gotchas
- Amount is in paise.
{{1}} = amountrenders as “50000” for a ₹500 charge. Template it as₹{{1}}and educate users, or pre-divide by 100 in your template variable copy. - Secret mismatch — every attempt logs
signature_failedwith status 401. Double-check you pasted the same secret in both dashboards (no trailing newline). notesfields need to be sent at order creation. If you didn’t pass them, they won’t show up on the webhook.- Test events have dummy data. Real phone/email fields are blank on test events — the message will target an empty phone. Test with a real small-amount payment when you can.