POST /payment/complete/enterprise/{enterpriseId}
POST
/payment/complete/enterprise/{enterpriseId}
Path parameters
-
enterpriseId string Required
Issued unique enterprised ID
Body
Payment Status
-
cartId string Required
Globally unique cart id
-
enterpriseOrderId string Required
THG internal order ID
-
initialRequest string Required
Initial request url to Alipay/WechatPay, for customs's reference
-
initialResponse string Required
Initial response url from Alipay/WechatPay, for customs's reference
-
paymentPayId string Required
WechatPay/Alipay order ID
-
paidAt string Required
Payment time in ISO_8601 format
-
status string Required
Status of payment operation
Values are
success
orfailed
. -
failReason string
Reason for failure
POST /payment/complete/enterprise/{enterpriseId}
curl \
-X POST https://nomad.samarkand-global.cn/checkout/payment/complete/enterprise/REC890 \
-H "x-ca-key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"cartId":"string","enterpriseOrderId":"string","initialRequest":"https://pay.co/api/v1.0/wechat_jsapi_gateway/partners/F96FTB/orders/TEM1129354775085478274207817?time=1587033049529\u0026nonce_str=TEM1129354775085478274207817\u0026sign=cf78e7c81bd00717697c2b11577b48e66770504cb97d2a9b9621d1e99d8a9182","initialResponse":"https://pay.co/api/v1.0/wechat_jsapi_gateway/partners/F96FTB/response=1587033049529\u0026nonce_str=TEM1129354775085478274207817\u0026sign=cf78e7c81bd00717697c2b11577b48e66770504cb97d2a9b9621d1e99d8a9182","paymentPayId":"string","paidAt":"2021-04-26T11:57:18Z","status":"success","failReason":"Invalid payment detail provided"}'
Request example
{
"cartId": "string",
"enterpriseOrderId": "string",
"initialRequest": "https://pay.co/api/v1.0/wechat_jsapi_gateway/partners/F96FTB/orders/TEM1129354775085478274207817?time=1587033049529&nonce_str=TEM1129354775085478274207817&sign=cf78e7c81bd00717697c2b11577b48e66770504cb97d2a9b9621d1e99d8a9182",
"initialResponse": "https://pay.co/api/v1.0/wechat_jsapi_gateway/partners/F96FTB/response=1587033049529&nonce_str=TEM1129354775085478274207817&sign=cf78e7c81bd00717697c2b11577b48e66770504cb97d2a9b9621d1e99d8a9182",
"paymentPayId": "string",
"paidAt": "2021-04-26T11:57:18Z",
"status": "success",
"failReason": "Invalid payment detail provided"
}
Response example (200)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}
Response example (400)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}
Response example (500)
{
"code": 42,
"message": "Status of operation",
"data": {
"cartId": "SMK474-1Vzff80HMU0FqdotSN8T0mGjK",
"exchangeRate": 9.1
}
}