Stripe and Razorpay payment links on invoices
How Stripe and Razorpay payment links on invoices work: hosted checkout, the webhook that marks invoices paid, and why payouts still need bank matching.
Lokesh Mahala, CEO & Co-founder
· Updated · 3 min read

On this page
A payment link on an invoice sends the customer to Stripe's or Razorpay's hosted checkout page. When the processor confirms the payment, it notifies Sonic through a webhook, the invoice is marked paid and its reminders stop. The links are optional: customers who pay by bank transfer are matched through bank reconciliation instead.
Card payments run through Stripe and Razorpay, so payment relationships stay where customers already have them while the accounts receivable loop closes inside contract-to-cash. For the wider picture, see connecting payments and the ledger.
Stripe vs Razorpay: what each payment link supports
| Capability | Stripe | Razorpay |
|---|---|---|
| Hosted payment page | Yes | Yes (UPI, card, netbanking, wallet) |
| Invoice email link | Yes | Yes |
| Auto mark paid | Via webhook | Via webhook |
| Customer id stored | Stripe customer on Sonic customer | Razorpay linkage |
| Refunds from credit flow | Supported path | Supported path |
Default currency and enabled methods follow your processor account configuration. Customers see exactly the methods you turned on in Razorpay.
How to set up the webhook that marks invoices paid
Connecting a processor account and setting a default currency are the parts everyone remembers. The webhook endpoint registration in the processor's own dashboard is the part that gets skipped. Skipping it raises no error. Invoices simply stay open after the money has arrived, because Sonic never heard about the payment.
Run one full test end to end before you trust the integration with a real customer's invoice: draft an invoice, pay it with test keys, and confirm it flips to paid and collections stops chasing it. Live keys in a sandbox environment charge real cards, so keep test and production credentials in the environments they belong to.
What happens after the customer pays the link
From the customer's side this is simple: if the invoice has a pay-now link, they pay on the processor's hosted page and that's the last they think about it. What happens next is on Sonic's side. The processor notifies Sonic of the payment, the invoice flips to paid, and the dunning sequence for that invoice stops on its own.
The payout, the actual money landing in your bank account, happens later and separately. That's why bank reconciliation still matters even for card payments.
Customer-facing invoices show the public invoice number, never a raw internal id with a decorative prefix.
Why processor payouts don't match invoice totals
Processor settlements arrive:
- Net of fees
- Batched across many charges
- Sometimes delayed vs charge date
Bank reconciliation matches payout lines to invoices and records the fee gap as variance. Don't expect a deposit to equal the invoice total. The bank reconciliation matching guide shows how payouts and split deposits are matched.
For Indian customers reclaiming input tax credit, the GST details on Sonic invoices and Razorpay receipts should agree. A mismatch blocks their input credit claim. This is general information. Confirm the GST treatment for your business with your tax adviser.
What the payment link integration doesn't cover
- Store PAN/card data as a processor replacement
- Dispute chargebacks inside Sonic as a full payments ops desk
- Replace treasury cash forecasting on settlement timing
Watch out for: paid in the bank, open in Sonic
- Webhook misconfiguration is the #1 "paid in bank, open in Sonic" bug.
- Mark paid manually is still valid for wires. Links are not the only path.
- Partial processor captures follow processor rules; AR may need partial match in bank rec.
- Freight and subscription invoices both support links. The bill-to party is still the shipper or the customer, depending on the workspace.
- Test in browser, not raw curl. Some processors' anti-bot checks block scripted posts.

Written by
Lokesh Mahala
CEO & Co-founder, Sonic AI · LinkedIn
Lokesh is the Cofounder & CEO of Sonic AI. Before starting Sonic, Lokesh was an engineer at Stripe for 4 years building Stripe's Revenue and Finance Automation suite. He was a founding engineer at Recko (acquired by Stripe in 2021) where he built reconciliation solutions for B2C companies. He completed his bachelors from IIT Roorkee.


