Description (Refund Transaction)

Refund the Selected transaction. (POST)

End Point{{id}}/refund


# Name Type Description
1 id String Transaction's ID

Request Header

# Key Value Description
1 Authorization Bearer {{access_token}} Login Token
2 Content-Type application/x-www-form-urlencoded x-www-form-urlencoded


# Name Type Description
1 refund_reason String Reason of triggering refund transaction


# Name Type Description
1 success Boolean Refund Request Success or Fail
2 message String Refund Success or Fail Message

Success Response - data

# Name Type Description
1 id Boolean Pre-Create Transaction Success or Fail
2 user_id String Id of the user who create the transaction
3 company_id String Id of the Company
4 store_id String Id of the Store
5 gateway_id Integer Id of the Gateway used to Generate the transaction
6 barcode_id String Id of the Barcode uset to generate the transaction (only apply for alipay Global)
7 status String Status of the transaction
8 amount Float Amount of the transaction
9 currency String Currency of the transaction
10 charge String Total of charge fee for the transaction
11 forex String Forex
12 paid_at String Date when the transaction was paid "YYYY-mm-dd h:i:s"
13 settled_at String Date when the transaction was settled "YYYY-mm-dd h:i:s"
14 transaction_id String Unique transaction identifier of Yedpay
15 payer String Email of the payer (Alipay Global)
16 extra_parameters String (optional) Custom information send by customer
17 custom_id String (optional) Custom Id Send By Customer
18 fixed_id String (optional) Id of the Fixed Code
19 refunded_at String Date when the transaction was Refunded "YYYY-mm-dd h:i:s"
20 created_at String Date when the transaction was created "YYYY-mm-dd h:i:s"
21 updated_at String Date when the was Updated "YYYY-mm-dd h:i:s"
22 expired_at String (optional) Date when the transaction Expire "YYYY-mm-dd h:i:s"
23 _links Array Include Checkout and QRCode Links:
- checkout
- qrcode
- (alipay online) checkout_wap
- (alipay online) qrcode_wap
24 refund_details Array Information of refund (request_user_id: The User who sent request,
first_name: First name of the user,
last_name: Last name of the user
remark: reason of the sending request)

Example Success Response

                "id": "xXxXxXxXxXXxXx",
                "user_id": "xXxXxXxXxXXxXx",
                "company_id": "xXxXxXxXxXXxXx",
                "store_id": "xXxXxXxXxXXxXx",
                "gateway_id": 1,
                "barcode_id": "xXxXxXxXxXXxXx",
                "status": "refunded",
                "amount": "10.00",
                "currency": "HKD",
                "charge": 1.20,
                "forex": 1,
                "paid_at": "",
                "settled_at": "",
                "transaction_id": "251415799855257",
                "payer": "",
                "extra_parameters": "{\"old_macdonald\": \"had a farm\", \"chorus_1\": \"E I E I O\",  \"and_on_his_farm\": \"he had a cow\", \"chorus_2\": \"E I E I O\"}",
                "custom_id": "XxXxXxXxXxXxXxXxXx",
                "fixed_id": "",
                "refunded_at": "2018-11-20 18:44:45",
                "created_at": "2018-11-20 14:44:45",
                "updated_at": "2018-11-20 18:44:45",
                "expired_at": "2018-11-20 18:44:45",
                "refund_details": {
                    "request_user_id": "306PNQ8",
                    "first_name": "xxxxxxxx",
                    "last_name": "xxxxxxxx",
                    "remark": "damaged product"

Example Error Response

                "success": false,
                "message": "Internal Error",
                "status": 500

v1.37.1-20200727 © The Payment Cards Group Limited. All rights reserved.