From 66fc03d855e1ad7a5d741d3b5a5f3e87a98d9e70 Mon Sep 17 00:00:00 2001 From: androidlover5842 Date: Sun, 1 Feb 2026 15:57:23 +0530 Subject: [PATCH] Use unique reference_id for Razorpay payment links --- .../controller/RazorpayPaymentLinksController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt b/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt index 338d918..4892da8 100644 --- a/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt +++ b/src/main/kotlin/com/android/trisolarisserver/controller/RazorpayPaymentLinksController.kt @@ -93,7 +93,8 @@ class RazorpayPaymentLinksController( "currency" to currency, "description" to (request.description ?: "Booking $bookingId"), "notes" to notes, - "reference_id" to bookingId.toString() + // Razorpay requires reference_id to be unique per active link + "reference_id" to "${bookingId}-${OffsetDateTime.now().toEpochSecond()}" ) parseExpiryEpoch(request.expiryDate)?.let { payload["expire_by"] = it } request.isPartialPaymentAllowed?.let { payload["partial_payment"] = it }