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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;CUP&quot;,&quot;ewallets&quot;:[{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;ewallet&quot;:&quot;\u003cstring\u003e&quot;},{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;ewallet&quot;:&quot;\u003cstring\u003e&quot;}],&quot;failure_reason&quot;:&quot;\u003cstring\u003e&quot;,&quot;fixed_side&quot;:&quot;\u003cstring\u003e&quot;,&quot;fx_rate&quot;:&quot;\u003cstring\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;merchant_debited_amount&quot;:&quot;\u003cstring\u003e&quot;,&quot;merchant_debited_currency&quot;:&quot;\u003cstring\u003e&quot;,&quot;merchant_reference_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{},&quot;payment&quot;:&quot;\u003cstring\u003e&quot;,&quot;payment_created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;payment_method_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;proportional_refund&quot;:&quot;\u003cboolean\u003e&quot;,&quot;reason&quot;:&quot;\u003cstring\u003e&quot;,&quot;receipt_number&quot;:&quot;\u003cnumber\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;},&quot;status&quot;:{&quot;error_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;message&quot;:&quot;\u003cstring\u003e&quot;,&quot;operation_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;response_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;}}