1 Answers
A:
When the payment completes, your PSP (Razorpay, Paytm, Cashfree, etc.) will send back a few key IDs in the callback or webhook payload — typically:
upi_txn_id (NPCI’s unique reference)
rrn (retrieval reference number — often used for settlement tracing)
payment_gateway_txn_id (your PSP’s own reference)
Always prefer the NPCI RRN or UPI Txn ID for the invoice. That’s what banks and auditors can trace on the UPI network.
When your webhook confirms a success, write that UPI ID to your internal payments or receipts table against the invoice record:
{
invoice_id: INV-2025-0012,
upi_txn_id: 324818273827@upi,
rrn: 312901239123,
payment_date: 2025-10-17
}
This ensures your invoice generator can fetch it later when building the PDF.
In the JSON you send to the GSTN (via IRP), use the optional PaymentInfo or AddlPaymentInfo section if supported by your middleware (like ClearTax or Tally Connector).
If that’s not available, you can add it to your PDF representation instead auditors accept visible payment metadata as long as the IRN and QR are intact.
Under the Payment Details section of your GST e-invoice PDF, show something like:
Payment Mode: UPI
UPI Txn ID (RRN): 312901239123
Transaction Date: 17 Oct 2025
Purpose Code: INS_PRM (Insurance Premium)
If your template engine supports variables (e.g., Mustache, Jinja, or Liquid), just insert:
{{ payment.upi_rrn }}
If your tool allows partial payments (like splitting an ₹8 lakh premium over two UPI transfers), list both reference IDs:
UPI References:
312901239123 (₹4,00,000 on 17 Oct)
312901245678 (₹4,00,000 on 18 Oct)
This helps reconciliation teams link them correctly to GST returns later.
You can add the UPI reference in both:
Visible text (for printout review), and
PDF metadata / JSON (if your tool exports structured data for audit bots).
That way, you stay compliant and future-proof when GSTN starts cross-validating payment references.
Before finalizing the PDF:
Validate that a upi_txn_id or rrn exists for all UPI-tagged payments.
If not, mark the invoice Pending Payment Confirmation instead of Paid.
This prevents auditors from flagging missing references later.
If you’re already embedding the IRN QR code, you can also add the UPI Txn ID in the QR’s text block under Payment Reference. It’s optional, but insurers love this level of detail for claims auditing.
Find the Best Payment Gateway
Explore all products with features, pricing, reviews and more
View All SoftwareHelp the community
Be the First to Answer these questions
Disclaimer
Techjockey’s software industry experts offer advice for educational and informational purposes only. A category or product query or issue posted, created, or compiled by Techjockey is not meant to replace your independent judgment.
20,000+ Software Listed
Best
Price Guaranteed
Free Expert
Consultation
2M+
Happy Customers