# 2. Order refund(general)

# Brief Description

  • After merchant confirms the refund, needs to send a refund request for the order to Swifood. Swifood will then set the payment status of the corresponding order to 'Refunded' and push the instruction to print the refund receipt to the connected printer.

# HTTP Request Information

# Request URL

  • {domain}/open-api/order/refund

# Request Method

  • POST

# Request Header

Parameter Name Required Type Description
Content-Type Yes string application/json

# Request Body Parameters

Parameter Name Required Type Length Limit Example Description
appId Yes string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 App id (provided by Swifood)
storeKey Yes string 100 CVIEIYUNHTS0 Store key (provided by Swifood)
param Yes string - - Request param content string
sign Yes string - RSA sign of param

# Param Parameters

Parameter Name Required Type Length Limit Example Description
orderNo Yes string - TB****32345 Swifood order no
refundRemark No string 0 - 500 Refund remark
refundTransactionId No string 0 - 50 RC159482896 Refund order payment platform transaction id (Required for online order refund)
refundMchOrderId No string 0 - 50 RON129508591 Refund order Transaction merchant order id (Required for online order refund)

# Request body example

{
  "appId": "45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892",
  "storeKey": "CVIEIYUNHTS0",
  "sign": "abcdef",
  "param": "{\"orderNo\":\"TB****32345\",\"refundRemark\":\"test refund\"}"
}

# Response Example

# Code Refer to this list

# Response Parameters

Parameter Name Type Example Description
code int 10000 Status Code Refer to List
message string success Status Code Information
data boolean - Successful Or Not
{
  "code": 10000,
  "message": "success",
  "data": true
}

# Failed Response Example

{
    "code":21000,
    "message":"Service error, please contact administrator",
    "data":null
}