Refund
This is an optional API call, you may use this to refund of a specific payment.
Use "Payment ID" but not "Payment Request ID". Only one refund is allowed per one successful payment (PayNow or Card).
Parameter | Description | Example |
---|---|---|
amount | Amount to refund | 25 |
payment_id | Payment ID for the successful payment request | 42e8bb7-93ac-4da5-a354-f49610f2890b |
curl POST "https://api.hit-pay.com/v1/refund"
-H "X-BUSINESS-API-KEY: meowmeowmeow"
-H "X-Requested-With: XMLHttpRequest"
-H "Content-Type: application/x-www-form-urlencoded"
-data-urlencode "amount=25"
-data-urlencode "payment_id=942E8DD7-93AC-4DA5-A354-GA3410F2890B"
{
"id": "94429a3a-c94d-49d8-adb2-341fb8386a8d9",
"payment_id": "942E8DD7-93AC-4DA5-A354-GA3410F2890B",
"amount_refunded": 25.00,
"total_amount": 599.00,
"currency": "sgd",
"status": null,
"payment_method": "card",
"created_at": "2021-08-28T16:02:42"
}
Updated 5 months ago