Authorization (http_api_key)
Send an authentication token in the
app-api-key
header
to authenticate with the API.
Nomad payment provider aggregation, including make payments, and customs declaration for orders and etc.
This is the documentation for version 1.8.0
of the API. Last update on Aug 1, 2022.
https://nomad.samarkand-global.cn/broker/v1
Transaction services.
Merchant name to payment company, e.g. weixinpay.test
Merchant order no.
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/payment/wechat.sh_smk?order_ref=test202101 \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"orderRef": "test202103",
"payerCurrency": "CNY",
"currency": "CNY",
"payerTotal": 10,
"actualAmount": 2200,
"total": 10,
"bankType": "string",
"Timing": "2021-11-02T17:03:38+08:00",
"transactionId": "4200001148202111020556019250",
"tradeState": "SUCCESS",
"tradeStateDesc": "支付成功",
"tradeType": "MWEB",
"tradeMessage": "string"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. weixinpay.test
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
Payment companies have different payment types
Values are NATIVE
, H5
, JSAPI
, MINIPRO
, or APP
.
Merchant system order number
Order actual amount, which uses the base unit of current currency
Order total amount, which uses the base unit of current currency
Subsidy amount, only works when profitSharing is True
When the original order price is not equal to the payment amount, the discount will not be enjoyed. This field is mainly used to prevent the same invoice from being paid multiple times to enjoy multiple discounts.
Merchant invoice ID, need to use with products data
Must be CNY
or GBP
Whether the order is going to share profit
Default value is true
.
Payment product
Order product description
Payment attach data, which could be used by payment notifies
Payment due time
Coupon goods tag
Payer ID of customer in service provider side.
Payer ID of customer in merchant side.
Notify url, that is used by payment company.
Success url, that is used by alipay company.
Cancel url, that is used by alipay company.
App ID of payment company.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payment/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-H "X-Real-Ip: string" \
-H "Client-Id: string" \
-d '{"paymentMethod":"wechatpay","paymentType":"H5","orderRef":"O123456789","actualAmount":2200,"total":2200,"subsidyAmount":0,"costPrice":0,"invoiceId":"string","currency":"CNY","profitSharing":true,"products":[{"goodsName":"Orange","goodsCategory":"health-beauty/fragrance","goodsUnitPrice":12,"goodsQuantity":1,"merchantProductId":"barcode123456","paymentProductId":1246464644}],"description":"面膜 mask","attach":"Payment attach mark","timeExpire":"2022-02-24T14:02:38Z","goodsTag":"new","payerId":"osGEYs0HfdUF4R965HMmEPKqOSWw","merchantPayerId":"osGEYs0HfdUF4R965HMmEPKqOSWw","notifyUrl":"https://www.weixin.qq.com/wxpay/pay.php","successUrl":"https://www.weixin.qq.com/wxpay/pay.php","cancelUrl":"https://www.weixin.qq.com/wxpay/pay.php","spAppId":"string"}'
# Headers
X-Real-Ip: string
Client-Id: string
# Payload
{
"paymentMethod": "wechatpay",
"paymentType": "H5",
"orderRef": "O123456789",
"actualAmount": 2200,
"total": 2200,
"subsidyAmount": 0,
"costPrice": 0,
"invoiceId": "string",
"currency": "CNY",
"profitSharing": true,
"products": [
{
"goodsName": "Orange",
"goodsCategory": "health-beauty/fragrance",
"goodsUnitPrice": 12,
"goodsQuantity": 1,
"merchantProductId": "barcode123456",
"paymentProductId": 1246464644
}
],
"description": "面膜 mask",
"attach": "Payment attach mark",
"timeExpire": "2022-02-24T14:02:38Z",
"goodsTag": "new",
"payerId": "osGEYs0HfdUF4R965HMmEPKqOSWw",
"merchantPayerId": "osGEYs0HfdUF4R965HMmEPKqOSWw",
"notifyUrl": "https://www.weixin.qq.com/wxpay/pay.php",
"successUrl": "https://www.weixin.qq.com/wxpay/pay.php",
"cancelUrl": "https://www.weixin.qq.com/wxpay/pay.php",
"spAppId": "string"
}
{
"code": 200,
"message": "success",
"payMessage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx031",
"payInvokeMessage": "weixin://wap/pay?prepayid%3Dwx03143347..",
"timeStamp": 1414561699,
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payment/close/wechat.sh_smk/orderno2022030300011 \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"paymentMessage": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. weixinpay.test
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
Payment companies have different payment types
Values are NATIVE
, H5
, JSAPI
, MINIPRO
, or APP
.
Pay message responsed from payment company
This url is notified when the payment succeeds
A random string of up to 32 characters
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payment/invocation/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"paymentMethod":"wechatpay","paymentType":"H5","payMessage":"https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2711083","timeStamp":1414561699,"nonceStr":"5K8264ILTKCH16CQ2502SI8ZNMTM67VS"}'
{
"paymentMethod": "wechatpay",
"paymentType": "H5",
"payMessage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2711083",
"timeStamp": 1414561699,
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS"
}
{
"code": 200,
"message": "success",
"payMessage": "https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx031",
"payInvokeMessage": "weixin://wap/pay?prepayid%3Dwx03143347..",
"timeStamp": 1414561699,
"nonceStr": "5K8264ILTKCH16CQ2502SI8ZNMTM67VS"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
The payment customs declarance.
Merchant queries customs clearance information by order number
Merchant name to payment company, e.g. wechat.sh_smk
Customs code, available options: GUANGZHOU_ZS, HANGZHOU_ZS, NINGBO, ZHENGZHOU_BS, CHONGQING, SHANGHAI_ZS, SHENZHEN, ZHENGZHOU_ZH_ZS
Values are GUANGZHOU_ZS
, HANGZHOU_ZS
, NINGBO
, ZHENGZHOU_BS
, CHONGQING
, SHANGHAI_ZS
, SHENZHEN
, ZHENGZHOU_ZH_ZS
, or TIANJIN
. Default value is GUANGZHOU_ZS
.
The internal order number of the merchant system
Payment system internal order number
The internal sub-order number of the merchant system
The internal sub-order number of the payment company system
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/customs/payment/wechat.sh_smk?customs=GUANGZHOU_ZS \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"customsMessage": "<xml><return_code><![CDATA[SUCCESS]]></return_code>...</xml>",
"resultCode": "success",
"transactionId": "1000320306201511078440737890",
"orders": [
{
"state": "UNDECLARED",
"subOrderNo": "1000320306201511078440737890",
"subOrderId": "4200001306202110500000000000.0",
"mchCustomsNo": "31123452K0",
"explanation": "string",
"customs": "string",
"modifyTime": "20091227091010",
"duty": 88,
"feeType": "CNY",
"orderFee": 88,
"transportFee": 88,
"productFee": 88,
"certType": "IDCARD",
"certCheckResult": "UNCHECKED",
"verifyDepartment": "OTHERS",
"verifyDepartmentTradeId": "OTHERS"
}
]
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Customs codes
Values are GUANGZHOU_ZS
, HANGZHOU_ZS
, NINGBO
, ZHENGZHOU_BS
, CHONGQING
, SHANGHAI_ZS
, SHENZHEN
, ZHENGZHOU_ZH_ZS
, or TIANJIN
. Default value is GUANGZHOU_ZS
.
The merchant’s record number registered in the customs
The internal order number of the merchant system, only numbers, uppercase and lowercase letters, and it is unique under the same merchant number.
Transaction ID returned by payment company
Merchant's sub-order number, must be passed if there is a split order
Do not fill in the sub-order number. Order number returned by payment company
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
curl \
-X PUT https://nomad.samarkand-global.cn/broker/v1/customs/payment/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"customs":"GUANGZHOU_ZS","mchCustomsNo":"31123452K0","orderNo":"test2021101901","transactionId":"4200001306202110500000000000.0","subOrderNo":"1000320306201511078440737890","subOrderId":"4200001306202110500000000000.0","paymentMethod":"wechatpay"}'
{
"customs": "GUANGZHOU_ZS",
"mchCustomsNo": "31123452K0",
"orderNo": "test2021101901",
"transactionId": "4200001306202110500000000000.0",
"subOrderNo": "1000320306201511078440737890",
"subOrderId": "4200001306202110500000000000.0",
"paymentMethod": "wechatpay"
}
{
"code": 200,
"message": "success",
"customsMessage": "<xml><return_code><![CDATA[SUCCESS]]></return_code>...</xml>",
"resultCode": "success",
"state": "UNDECLARED",
"transactionId": "1000320306201511078440737890",
"orderNo": "1000320306201511078440737890",
"subOrderNo": "1000320306201511078440737890",
"modifyTime": "20091227091010",
"certCheckResult": "UNCHECKED",
"verifyDepartment": "OTHERS",
"verifyDepartmentTradeId": "OTHERS"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
The internal order number of the merchant system, only numbers, uppercase and lowercase letters, and it is unique under the same merchant number.
Transaction ID returned by Payment company
Customs codes
Values are GUANGZHOU_ZS
, HANGZHOU_ZS
, NINGBO
, ZHENGZHOU_BS
, CHONGQING
, SHANGHAI_ZS
, SHENZHEN
, ZHENGZHOU_ZH_ZS
, or TIANJIN
. Default value is GUANGZHOU_ZS
.
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
The merchant’s record number registered in the customs
Only mainland ID cards are supported temporarily.
Default value is IDCARD
.
The user's mainland ID number, the ID number ending in the letter X, please capitalize the letter X.
User name.
Tariff, divided into units
ADD New customs declaration application, MODIFY modification. Default is ADD
Values are ADD
or MODIFY
. Default value is ADD
.
Merchant's sub-order number, must be passed if there is a split order
The currency used for payment of Payment company orders is currently only supported in RMB CNY. If there is an order split, it must be sent.
Default value is CNY
.
The amount of the sub-order, in cents, cannot exceed the amount of the original order, order_fee=transport_fee+product_fee (amount payable = logistics fee + product price), if there is a split order, it must be passed.
The logistics cost is divided into units, and must be passed if there is a split order.
Commodity costs, in units of cents, must be passed if there is a split order.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/customs/payment/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"orderNo":"test2021101901","transactionId":"4200001306202110500000000000.0","customs":"GUANGZHOU_ZS","paymentMethod":"wechatpay","mchCustomsNo":"31123452K0","certType":"IDCARD","certId":330821198809085200,"name":"Zhangsan","duty":88,"actionType":"ADD","subOrderNo":20150806125346,"feeType":"CNY","orderFee":88,"transportFee":88,"productFee":88}'
{
"orderNo": "test2021101901",
"transactionId": "4200001306202110500000000000.0",
"customs": "GUANGZHOU_ZS",
"paymentMethod": "wechatpay",
"mchCustomsNo": "31123452K0",
"certType": "IDCARD",
"certId": 330821198809085200,
"name": "Zhangsan",
"duty": 88,
"actionType": "ADD",
"subOrderNo": 20150806125346,
"feeType": "CNY",
"orderFee": 88,
"transportFee": 88,
"productFee": 88
}
{
"code": 200,
"message": "success",
"customsMessage": "<xml><return_code><![CDATA[SUCCESS]]></return_code>...</xml>",
"resultCode": "success",
"state": "UNDECLARED",
"transactionId": "1000320306201511078440737890",
"orderNo": "1000320306201511078440737890",
"subOrderNo": "1000320306201511078440737890",
"modifyTime": "20091227091010",
"certCheckResult": "UNCHECKED",
"verifyDepartment": "OTHERS",
"verifyDepartmentTradeId": "OTHERS"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Upload the payer identity information which will be re-verified by payment provider, supported payment method: wechatpay
Merchant name to payment company, e.g. wechat.sh_smk
The internal order number of the merchant system, only numbers, uppercase and lowercase letters, and it is unique under the same merchant number.
Transaction ID returned by Payment company
Merchant's sub-order number, must be passed if there is a split order
Customs codes
Values are GUANGZHOU_ZS
, HANGZHOU_ZS
, NINGBO
, ZHENGZHOU_BS
, CHONGQING
, SHANGHAI_ZS
, SHENZHEN
, ZHENGZHOU_ZH_ZS
, or TIANJIN
. Default value is GUANGZHOU_ZS
.
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
The merchant’s record number registered in the customs
Only mainland ID cards are supported temporarily.
Default value is IDCARD
.
The user's mainland ID number, the ID number ending in the letter X, please capitalize the letter X.
Payer name.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/customs/identification/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"orderNo":"test2021101901","transactionId":"4200001306202110500000000000.0","subOrderNo":20150806125346,"customs":"GUANGZHOU_ZS","paymentMethod":"wechatpay","mchCustomsNo":"31123452K0","certType":"IDCARD","certId":330821198809085200,"certName":"Zhangsan"}'
{
"orderNo": "test2021101901",
"transactionId": "4200001306202110500000000000.0",
"subOrderNo": 20150806125346,
"customs": "GUANGZHOU_ZS",
"paymentMethod": "wechatpay",
"mchCustomsNo": "31123452K0",
"certType": "IDCARD",
"certId": 330821198809085200,
"certName": "Zhangsan"
}
{
"code": 200,
"message": "success",
"orderNo": "test2021101901",
"transactionId": "4200001306202110500000000000.0",
"subOrderNo": 20150806125346,
"customs": "string",
"mchCustomsNo": "31123452K0",
"certType": "IDCARD",
"certId": 330821198809085200,
"certName": "Zhangsan"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
The refund services.
Merchant name to payment company, e.g. weixinpay.test
Merchant payment order no.
Merchant payment refund no.
Payment company refund no.
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/refund/wechat.sh_smk?refund_order_ref=r001test20220125001 \
-H "app-api-key: $API_KEY"
{
"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",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. weixinpay.test
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
Transaction ID
Merchant system order number
Merchant refund order no
Refund message to customer
Refund amount, unit is fen
The total order amount of the original payment, unit is fen
Amount currency, available options: CNY
Notify url, receive notification of refund result of wechat Pay.
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
or REFUND_SOURCE_SUB_MERCHANT
.
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."
}
The settlement services.
Merchant name to payment company, e.g. wechat.sh_smk
The settlement order no of the merchant, shall be unique within merchant system
Payment system internal order number
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/settlement/wechat.sh_smk?profit_order_no=string&transaction_id=string \
-H "app-api-key: $API_KEY"
{
"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
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Merchant system settlemnt order number
Payment company transaction number
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
.
Description for finishing profit orders
Receivers of the profit sharing.
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
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"}'
{
"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"
}
{
"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
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Merchant system settlemnt order number
Payment company transaction number
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
.
Description for finishing profit orders
Receivers of the profit sharing.
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
curl \
-X POST 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"}'
{
"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"
}
{
"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
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name, e.g. wechat.sh_smk
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/settlement/receiver/wechat.sh_smk \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"type": "MERCHANT_ID",
"account": "1900000109",
"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"
}
]
}
Merchant name to payment company, e.g. wechat.sh_smk
Receiver type of profit sharing. MERCHANT_ID: merchants, PERSONAL_OPENID: personal. PERSONAL_OPENID is not available
Values are MERCHANT_ID
or PERSONAL_OPENID
.
The receiver account.
The receiver name.
Relationship between sub-merchant and recipient.
Values are SUPPLIER
, DISTRIBUTOR
, SERVICE_PROVIDER
, PLATFORM
, or OTHERS
.
Ciphertext of individual name(verify if value is passed)
The Settlement receiver description.
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/settlement/receiver/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"MERCHANT_ID","account":"1900000109","name":"张三","relationType":"OTHERS","encryptedName":"hu89ohu89ohu89o","description":"网络公司","paymentMethod":"wechatpay"}'
{
"type": "MERCHANT_ID",
"account": "1900000109",
"name": "张三",
"relationType": "OTHERS",
"encryptedName": "hu89ohu89ohu89o",
"description": "网络公司",
"paymentMethod": "wechatpay"
}
{
"code": 200,
"message": "success",
"type": "MERCHANT_ID",
"account": "1900000109",
"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"
}
]
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Receiver type of profit sharing. MERCHANT_ID: merchants, PERSONAL_OPENID: personal.
Values are MERCHANT_ID
or PERSONAL_OPENID
.
The receiver account.
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X DELETE https://nomad.samarkand-global.cn/broker/v1/settlement/receiver/wechat.sh_smk?type=MERCHANT_ID \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"type": "MERCHANT_ID",
"account": "1900000109",
"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"
}
]
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Funds of merchant to oversea.
Merchant name to payment company, e.g. wechat.sh_smk
The payout number of the merchant, shall be generated by the merchant when initiating the payout request
Payment system internal order number
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/payout/abroad/wechat.sh_smk?out_order_id=string&transaction_id=string \
-H "app-api-key: $API_KEY"
{
"code": 200,
"message": "success",
"outOrderId": "string",
"transactionId": "42000000000_123123",
"payoutOrderId": "string",
"result": "SUCCESS",
"failReason": "BALANCE_NOT_ENOUGH",
"amount": 88,
"foreignAmount": 88,
"foreignCurrency": 88,
"rate": 88,
"exchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"estimateExchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"availableAbroadAmount": 88
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
The payout number of the merchant, shall be generated by the merchant when initiating the payout request
Payment company transaction number
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
Amount of RMB to be payout, unit is cent
Currency of overseas payment. Note: The currency field is related to Payment company payee ID
Goods information, the number cannot exceed 10
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payout/abroad/wechat.sh_smk \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"outOrderId":"string","transactionId":"transaction_id_123","paymentMethod":"wechatpay","amount":88,"foreignCurrency":"USD","goodsInfo":[{"goodsName":"Orange","goodsCategory":"health-beauty/fragrance","goodsUnitPrice":12,"goodsQuantity":1}],"sellerInfo":{"overseaBusinessName":"香港 xxxx 公司","overseaShopName":"香港 xxx 公司 xxx 店铺","sellerId":"id2123123123"},"expressInfo":{"courierNumber":"SF1341558741234","expressCompanyName":"国际 xxx 物流"},"payeeInfo":{"payeeId":"id123112312"}}'
{
"outOrderId": "string",
"transactionId": "transaction_id_123",
"paymentMethod": "wechatpay",
"amount": 88,
"foreignCurrency": "USD",
"goodsInfo": [
{
"goodsName": "Orange",
"goodsCategory": "health-beauty/fragrance",
"goodsUnitPrice": 12,
"goodsQuantity": 1
}
],
"sellerInfo": {
"overseaBusinessName": "香港 xxxx 公司",
"overseaShopName": "香港 xxx 公司 xxx 店铺",
"sellerId": "id2123123123"
},
"expressInfo": {
"courierNumber": "SF1341558741234",
"expressCompanyName": "国际 xxx 物流"
},
"payeeInfo": {
"payeeId": "id123112312"
}
}
{
"code": 200,
"message": "success",
"outOrderId": "string",
"transactionId": "42000000000_123123",
"payoutOrderId": "string",
"result": "SUCCESS",
"failReason": "BALANCE_NOT_ENOUGH",
"amount": 88,
"foreignAmount": 88,
"foreignCurrency": 88,
"rate": 88,
"exchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"estimateExchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"availableAbroadAmount": 88
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Bill date. Query format YYYY-MM-DD, for example, 2021-01-01
Merchant ID of merchant.
Must be wechatpay
or alipay
Values are wechatpay
or alipay
.
curl \
-X GET https://nomad.samarkand-global.cn/broker/v1/payout/bill/abroad/{merchant}?bill_date=string \
-H "app-api-key: $API_KEY"
"@file"
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success",
"errors": "Something wrong when making the service."
}
Merchant name to payment company, e.g. wechat.sh_smk
Abroad payout bill operations, available: GetAvailableAbroadAmounts
Payment company transaction number
Payment method, must be wechatpay or alipay
Values are wechatpay
or alipay
.
curl \
-X POST https://nomad.samarkand-global.cn/broker/v1/payout/bill/abroad/{merchant} \
-H "app-api-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"operation":"GetAvailableAbroadAmounts","transactionId":"transaction_id_123","paymentMethod":"wechatpay"}'
{
"operation": "GetAvailableAbroadAmounts",
"transactionId": "transaction_id_123",
"paymentMethod": "wechatpay"
}
{
"code": 200,
"message": "success",
"outOrderId": "string",
"transactionId": "42000000000_123123",
"payoutOrderId": "string",
"result": "SUCCESS",
"failReason": "BALANCE_NOT_ENOUGH",
"amount": 88,
"foreignAmount": 88,
"foreignCurrency": 88,
"rate": 88,
"exchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"estimateExchangeRateTime": "2015-05-20T13:29:35.120+08:00",
"availableAbroadAmount": 88
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}
{
"code": 200,
"message": "success"
}