Log every captured Razorpay payment to Sheets and Slack
The moment Razorpay captures a payment, we add a row to your revenue spreadsheet and post a short confirmation to your team's Slack channel.
Every time a Razorpay payment is captured, log it and tell the team, with no judgement calls in the loop. Trigger this on a Razorpay webhook for the payment captured event, so the workflow runs the moment the money is confirmed.
First, append one row to my Google Sheets revenue tracker using Append Values. The row should hold the payment id, the order id, the amount in rupees, the currency, the payment method, the customer email, the customer contact number, the notes field, and the capture time as a readable date.
Then post a one-line confirmation to my Slack channel using Send a Message, naming the amount, the payment method and the customer. Keep it to a single line that a revenue channel can scan without opening anything.
Two fields in the Razorpay payload need converting before anything is written or posted. Amounts arrive as integers in paise, so divide by 100 to get rupees, and apply that to both the sheet row and the Slack message. Capture times arrive as Unix epoch seconds, so format them as a human readable date and time rather than writing the raw number.
Razorpay ids are prefixed by type, pay_ for payments and order_ for orders, so write them through unchanged as text. The notes field is a free form object of up to 15 key value string pairs, so flatten it into something readable for a single cell rather than dropping it. Razorpay does not always collect an email or a contact number, so when either is missing write an empty cell and carry on rather than failing the run.
Keep the sheet append and the Slack post independent of each other. Append the ledger row first, then post to Slack, and make sure a failure posting to Slack never rolls back, blocks or retries the spreadsheet row. A Slack hiccup should never cost me the ledger entry.
What does this prompt do?
- Adds one row to your revenue spreadsheet the moment Razorpay captures a payment, holding the payment and order reference, the amount, the currency, the payment method, the customer email and phone number, your own notes, and the capture time.
- Converts amounts from paise into rupees and turns the capture time into a date you can actually read, so the sheet is ready for reporting instead of needing cleanup.
- Posts a one-line confirmation to your Slack channel naming the amount, the payment method and the customer, so the team sees revenue land without opening a dashboard.
- Keeps the spreadsheet row and the Slack message independent, so a Slack outage never costs you the ledger entry.
What do I need to use this?
- A Razorpay account, with permission to add a webhook in the dashboard so Razorpay can notify us the moment a payment is captured
- A Google account and a spreadsheet you want to use as your revenue tracker
- A Slack workspace and the channel where confirmations should be posted
How can I customize it?
- Change which columns land in the sheet, or add your own such as a team name or invoice number taken from the notes you attach to payments in Razorpay
- Point the confirmation at a different Slack channel, or reword it to include the order reference or a link to the payment
- Only announce payments above a value you choose, so small transactions log quietly to the sheet without pinging the channel
FAQs
Does this catch every payment, or only card payments?
Why do the amounts in Razorpay look a hundred times too big?
What happens if Slack is down when a payment comes in?
Can I test this before pointing it at real money?
Can this run on a schedule instead of instantly?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Stop copying payment details into a spreadsheet.
Every captured Razorpay payment logs itself and tells your team, within seconds of the money landing.