Skip to main content

POST /api/v1/refunds

This will refund a customer the amount specified, can be a partial refund.

Request

$ curl -X POST https://api.payhere.co/api/v1/refunds \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${api_key_here}" \
-d '{"payment_id": 373, "amount": 0.5, "reason": "requested_by_customer"}'

Params

  • payment_id - ID of the payment to refund
  • amount - amount to refund the customer, uses the currency of their payment, if USD, amount should be in dollars and can use decimal point i.e. 1.5 is $1.50 USD
  • reason - Reason for the refund, one of: requested_by_customer, duplicate or fraudulent

Response

204 No content

Errors

  • 400 Bad request - if validation fails
  • 401 Unauthorized