/cgi/payment/api/v1/payment-order/refunds

When the payment order Finished, merchant can refund this order, first create a merchant refund order according to, now merchant use this order create a payment refund order.

Request

🚧

Note:

  • Please do not sent the refund request concurrently while performing the partial refund for same payment order. Or else the request might be failed.
  • The best way to perform a multi-partial refund request(s) is send and process the response sequentially.

Request payload

POST /payment/api/v1/payment-order/refund HTTP/1.1
Content-Type: application/json

{
    "merchantId": "string",
    "method": "string",
    "format": "string",
    "charset": "string",
    "encryptType": "string",
    "signType": "string",
    "sign": "string",
    "timestamp": "Number",
    "body": "<encrypted body string>" // the encrypted body string
    
    // the body data structure
    // {
    //     "paymentId": "string",
    //     "referRefundNo": "string",
    //     "refundAmount": "number",
    //     "currency": "string",
    //     "refundInfos": [
    //         {
    //             "goodsDesc": "string",
    //             "refundGoodAmount": "string"
    //         }
    //     ],
    //     "refundTime": "Number",
    //     "reason": "string",
    //     "callbackUrl": "string"
    // }
}

Please follow the Request Payload to construct the request payload.

  • Set the method parameter to bieases.trade.refund.
  • Set to body parameter to Body object.

Body object

The parameters of body object in the Request Payload .

KeyTypeMandatory?LengthDescriptionExample
paymentIdStringYes32The payment order number regarding the payment request01J143NWJFNGBV2YB9ZRB9T7PS
referRefundNoStringYes64The refund order number or the original order number from Merchant's platform. If there is no refund order number, please put the original order number.2013112111001004500000675934
refundAmountNumberYes-The payment refund amount regarding the payment order.

- An integer for currencies like JPY that are not typically fractional.
- A decimal fraction for currencies like TND that are subdivided into thousandths.
2.99
currencystringYes-The currency code. ISO 4217USD
refundInfosObjectYes-The refund infos, Refer to the refundInfo object list (Max 100 elements).
refundTimeTimestampYes13The timestamp refund order time.
reasonStringNo-refund note
callbackUrlStringNo2048The callback webhook address.https:///payment/callback

refundInfo object

KeyTypeMandatory?LengthDescriptionExample
goodsDescStringYes256The goods item description.White kitchen paper tower
refundGoodAmountNumberYes-refund amount0.45

Response

Response payload

200 OK
Content-Type: "application/json"

{
    "code": "string",
    "msg": "string",
    "data": 
    {
       "merchantId":"string",
       "refundId":"string",
       "paymentId":"string",
       "referRefundNo":"string",
       "refundAmount":"string",
       "successTime":"string",
       "refundTime":"string",
       "status":"string",
       "msg":"string",
    }
}

The request will be returned with HTTP status code 200 if success and details included in the data object of the response payload.

  • Data object defined as below

📘

Note

The response is returned synchronous and does not require signature verification and decryption.

Data object

KeyTypeDescriptionExample
merchantIdStringThe merchant wallet ID which can be found at merchant wallet: Home->Merchant Information->BIEASES IDB131567545069
refundIdStringThe refund number on the payment2013112111001004500000675973
paymentIdStringThe payment order number regarding the payment request01J143NWJFNGBV2YB9ZRB9T7PS
referRefundNoStringThe refund order number which sent by the request from Merchant's platform2013112111001004500000675971
transactionIdStringThe wallet transaction id8zzsLUsjPaJBDQMM86bVh2ou7f6y8W
refundAmountNumberRefund amount.

- An integer for currencies like JPY that are not typically fractional.
- A decimal fraction for currencies like TND that are subdivided into thousandths.
21.55
successTimeTimestampFinished refund time. It's a timestamp .1706585572074
refundTimeTimestampThe refund created time. It's a timestamp 1706585572074
statusStringThe payment order status.
msgStringThe status message If there is any exception in the refund order.