Create Refund
POST {{baseUrl}}/v1/refunds
Refund of a payment. The refund is credited against a specific payment. The money is returned to the payment method that was used for the payment, and the currency is the same as what was used in the payment. If the action of a third party is not required, this method triggers the Refund Completed webhook. This webhook contains the same information as the response.
Request Body
{"payment"=>"<string>", "amount"=>"<number>", "currency"=>"<string>", "ewallets"=>["<string>", "<string>"], "merchant_reference_id"=>"<string>", "reason"=>"<string>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"amount":"\u003cnumber\u003e","created_at":"\u003cnumber\u003e","currency":"CUP","ewallets":[{"amount":"\u003cnumber\u003e","ewallet":"\u003cstring\u003e"},{"amount":"\u003cnumber\u003e","ewallet":"\u003cstring\u003e"}],"failure_reason":"\u003cstring\u003e","fixed_side":"\u003cstring\u003e","fx_rate":"\u003cstring\u003e","id":"\u003cstring\u003e","merchant_debited_amount":"\u003cstring\u003e","merchant_debited_currency":"\u003cstring\u003e","merchant_reference_id":"\u003cstring\u003e","metadata":{},"payment":"\u003cstring\u003e","payment_created_at":"\u003cnumber\u003e","payment_method_type":"\u003cstring\u003e","proportional_refund":"\u003cboolean\u003e","reason":"\u003cstring\u003e","receipt_number":"\u003cnumber\u003e","status":"\u003cstring\u003e","updated_at":"\u003cnumber\u003e"},"status":{"error_code":"\u003cstring\u003e","message":"\u003cstring\u003e","operation_id":"\u003cstring\u003e","response_code":"\u003cstring\u003e","status":"\u003cstring\u003e"}}