Path parameters
-
merchant string Required
Merchant name to payment company, e.g. wechat.sh_smk
Body
-
orderRef string Required
Merchant system settlemnt order number
-
transactionId string Required
Payment company transaction number
-
finish boolean | null
Whether the account distribution is completed. If it is false, the remaining amount of this order will not be unfrozen and returned to the secondary merchants, and the order can be divided again.
Default value is
false
. -
finishDesc string | null
Description for finishing profit orders
-
receivers array[object] | null
Receivers of the profit sharing.
-
paymentMethod string
Payment method, must be wechatpay or alipay
Values are
wechatpay
oralipay
.
PUT /settlement/{merchant}
curl \
-X PUT https://nomad.samarkand-global.cn/broker/v1/settlement/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"orderRef":"string","transactionId":"transaction_id_123","finish":false,"finishDesc":"分账完结","receivers":[{"type":"MERCHANT_ID","receiverAccount":"1900000109","name":"1900000109","amount":12,"paymentMethod":"wechatpay","description":"分帐1900000110","receiverMchid":"Orange","result":"SUCCESS","finishTime":"2015-05-20T13:29:35.120+08:00","failReason":"NO_RELATION","detailId":"3601111111111111111111"}],"paymentMethod":"wechatpay"}'
Request example
{
"orderRef": "string",
"transactionId": "transaction_id_123",
"finish": false,
"finishDesc": "分账完结",
"receivers": [
{
"type": "MERCHANT_ID",
"receiverAccount": "1900000109",
"name": "1900000109",
"amount": 12,
"paymentMethod": "wechatpay",
"description": "分帐1900000110",
"receiverMchid": "Orange",
"result": "SUCCESS",
"finishTime": "2015-05-20T13:29:35.120+08:00",
"failReason": "NO_RELATION",
"detailId": "3601111111111111111111"
}
],
"paymentMethod": "wechatpay"
}
Response example (200)
{
"code": 200,
"message": "success",
"outOrderNo": "string",
"transactionId": "transaction_id_123",
"orderId": "string",
"status": "FINISHED",
"receivers": [
{
"type": "MERCHANT_ID",
"receiverAccount": "1900000109",
"name": "1900000109",
"amount": 12,
"paymentMethod": "wechatpay",
"description": "分帐1900000110",
"receiverMchid": "Orange",
"result": "SUCCESS",
"finishTime": "2015-05-20T13:29:35.120+08:00",
"failReason": "NO_RELATION",
"detailId": "3601111111111111111111"
}
],
"finishDescription": "string",
"finishAmount": 88
}
Response example (400)
{
"code": 200,
"message": "success"
}
Response example (401)
{
"code": 200,
"message": "success"
}
Response example (500)
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}