Request Refund

POST /api/v1/payments/refund/:paymentId

Processes a refund for a paid order.

Headers:

Authorization: Bearer <token> or token must be passed in the cookie
Content-Type: application/json

Request Body:

{
  "refundAmount": 750.0,
  "reason": "Product defective"
}

Response:

{
  "status": "success",
  "message": "Refund processed successfully",
  "data": {
    "success": true,
    "message": "Refund processed successfully",
    "refundId": "rfnd_MzxJ9n7xQw5Pz8",
    "refundAmount": 750.0,
    "status": "processed"
  }
}
Updated on