POST /api/v1/payments/verify
Verifies the payment after successful transaction from Razorpay.
Headers:
Authorization: Bearer <token> or token must be passed in the cookie
Content-Type: application/json
Request Body:
{
"razorpay_order_id": "order_MzxJ9n7xQw5Pz8",
"razorpay_payment_id": "pay_MzxJ9n7xQw5Pz8",
"razorpay_signature": "a1b2c3d4e5f6...",
}
Response:
{
"status": "success",
"message": "Payment verified successfully",
"data": {
"success": true,
"message": "Payment verified successfully",
"paymentId": "65f8a2b4c1d2e3f4a5b6c7d8",
"orderId": "ORDER_1640995200000_abc123",
"amount": 150000,
"status": "paid",
"paidAt": "2024-01-01T10:30:00.000Z",
"razorpayPaymentDetails": {
"id": "pay_MzxJ9n7xQw5Pz8",
"amount": 150000,
"currency": "INR",
"method": "card",
"status": "captured",
"captured": true
}
}
}