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 }