Skip to content

Refund

POST /upay/v2/refund

Refunds a paid order. Multiple partial refunds are supported when the provider and merchant configuration allow them.

Request

FieldTypeRequiredDescription
terminal_snstring(32)YesTerminal serial number.
snstring(16)ConditionalMUWE order serial number.
client_snstring(32)ConditionalClient order number.
refund_request_nostring(20)YesClient refund idempotency key.
operatorstring(32)YesOperator identifier.
refund_amountstring(10)YesRefund amount in cents; less than or equal to remaining refundable amount.
extendedobjectNoProvider extension fields.
goods_detailsarrayNoGoods being refunded.

Either sn or client_sn must be present. If both are present, sn identifies the order.

Example

bash
curl -X POST 'https://vsi-api.shouqianba.com/upay/v2/refund' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: 10298371039 <md5-of-raw-body-plus-terminal-key>' \
  -d '{"terminal_sn":"10298371039","client_sn":"MEX202605220001","refund_request_no":"RF202605220001","refund_amount":"500","operator":"cashier01"}'

Success

json
{
  "result_code": "200",
  "biz_response": {
    "result_code": "REFUND_SUCCESS",
    "data": {
      "sn": "7893259247405832",
      "client_sn": "MEX202605220001",
      "client_tsn": "MEX202605220001-RF202605220001",
      "status": "SUCCESS",
      "order_status": "PARTIAL_REFUNDED",
      "total_amount": "1000",
      "net_amount": "500"
    }
  }
}

Recovery

refund_request_no prevents duplicate refund requests. If the response is uncertain, query using the same order identity and the same refund_request_no; do not create a second refund id until the first result is final.

MUWE OpenAPI documentation for bank and payment partners.