Path parameters
-
merchant string Required
Merchant name to payment company, e.g. weixinpay.test
Body
-
paymentMethod string
Payment method, must be wechatpay or alipay
Values are
wechatpay
oralipay
. -
transactionId string
Transaction ID
-
orderRef string Required
Merchant system order number
-
refundOrderRef string Required
Merchant refund order no
-
reason string
Refund message to customer
-
refundAmount number Required
Refund amount, unit is
fen
-
totalAmount number Required
The total order amount of the original payment, unit is
fen
-
currency string
Amount currency, available options: CNY
-
notifyUrl string
Notify url, receive notification of refund result of wechat Pay.
-
refundAccount string
Special parameters for refund of advance funds on e-commerce platform, REFUND_SOURCE_PARTNER_ADVANCE: advance payment is made by e-commerce platforms, which requires wechat Pay to apply for opening REFUND_SOURCE_SUB_MERCHANT: sub merchant, default value
Values are
REFUND_SOURCE_PARTNER_ADVANCE
orREFUND_SOURCE_SUB_MERCHANT
. -
fundsAccount string
If the order is profiting, this parameter is used
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/refund/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"paymentMethod":"wechatpay","transactionId":"4200001148202111020556019250","orderRef":"test20220125001","refundOrderRef":"r001test20220125001","reason":"商品已售完","refundAmount":10,"totalAmount":10,"currency":"CNY","notifyUrl":"https://www.weixin.qq.com","refundAccount":"REFUND_SOURCE_SUB_MERCHANT","fundsAccount":"string"}'
{
"paymentMethod": "wechatpay",
"transactionId": "4200001148202111020556019250",
"orderRef": "test20220125001",
"refundOrderRef": "r001test20220125001",
"reason": "商品已售完",
"refundAmount": 10,
"totalAmount": 10,
"currency": "CNY",
"notifyUrl": "https://www.weixin.qq.com",
"refundAccount": "REFUND_SOURCE_SUB_MERCHANT",
"fundsAccount": "string"
}
{
"code": 200,
"message": "success",
"refundId": "refund_id_payment_company",
"orderRef": "test20220125001",
"refundOrderRef": "r001test20220125001",
"transactionId": "4200001148202111020556019250",
"channel": "ORIGINAL",
"userReceivedAccount": "0403**",
"createTime": "2021-11-02T17:03:38+08:00",
"successTime": "2021-11-02T17:03:38+08:00",
"status": "SUCCESS",
"refundAmount": 10,
"totalAmount": 10,
"payerRefund": 10,
"payerTotal": 10,
"settlementAmount": 10,
"settlementTotal": 10,
"discountRefundAmount": 10,
"currency": "CNY",
"refundAccount": "REFUND_SOURCE_SUB_MERCHANT",
"fundsAccount": "string"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}