Payment Details

GET /api/v1/payments/details/:paymentId

Retrieves detailed information about a specific payment.

Headers:

Authorization: Bearer <token> or token must be passed in the cookie

Response:

{
  "status": "success",
  "data": {
    "payment": {
      "_id": "65f8a2b4c1d2e3f4a5b6c7d8",
      "user": {
        "_id": "65f8a2b4c1d2e3f4a5b6c7d7",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "orderId": "ORDER_1640995200000_abc123",
      "razorpayOrderId": "order_MzxJ9n7xQw5Pz8",
      "razorpayPaymentId": "pay_MzxJ9n7xQw5Pz8",
      "amount": 150000,
      "currency": "INR",
      "status": "paid",
      "orderType": "cart",
      "shippingAddress": {
        "fullName": "John Doe",
        "address": "123 Main Street",
        "city": "Mumbai",
        "state": "Maharashtra",
        "zipCode": "400001",
        "country": "India",
        "phone": "9876543210"
      },
      "createdAt": "2024-01-01T10:00:00.000Z",
      "paidAt": "2024-01-01T10:30:00.000Z"
    }
  }
}
Updated on