# Refund ## Introduction - Refund is a type of reverse transaction after payment is completed (i.e., the transaction has been captured and funds have been received), used to return part or all of the funds to the cardholder. It is a very important part of the after-sales process. - Refunds may not be credited to the cardholder's account in real time and may take several business days. ## Refund Request Example [Refund](/payments/apis/payments/openapi/refund/refund-opl_1) ```json { "merchant_id": "18356675194960", "refund_trans_id": "m43986y4t345436", "ori_order_id": "GW20620xxxxx6999", "refund_amount": 100, "currency": "USD" } ``` Successful Response Example ```json { "ret_code": "000000", "ret_msg": "Success", "data": { "merchant_id": "18356675194960", "refund_trans_id": "m43986y4t345436", "refund_order_id": "RG206xxxxx198", "ori_order_id": "GW20620xxxxx6999", "status": "PROCESSING", "amount": 100, "currency": "USD" } } ``` Failed Response Example ```json { "ret_code": "010000", "ret_msg": "Invalid request" } ``` ## Refund Result Query Request Example [Refund Query](/payments/apis/payments/openapi/refund/refund-query-opl_2) ```json { "merchant_id": "18356675194960", "refund_order_id": "RG206xxxxx198" } ``` Successful Refund Response Example ```json { "ret_code": "000000", "ret_msg": "Success", "data": { "error_code": "0000", "error_description": "request success", "merchant_id": "18356675194960", "refund_trans_id": "1745922548689", "refund_order_id": "RG206xxxxx198", "ori_order_id": "GW20620xxxxx6999", "status": "SUCCESS", "amount": 100, "currency": "USD" } } ``` Failed Refund Response Example ```json { "ret_code": "000000", "ret_msg": "Success", "data": { "error_code": "2010", "error_description": "The bookkeeping has failed for the refund", "merchant_id": "18356675194960", "refund_trans_id": "1745922548689", "refund_order_id": "RG206xxxxx198", "ori_order_id": "GW20620xxxxx6999", "status": "FAILURE", "amount": 100, "currency": "USD" } } ``` ## Error Codes See [Transaction Error Codes](/payments/docs/developer-resources/transanction-error-code) ## Result Notification Refer to [Webhook](/payments/docs/developer-resources/webhook)