submitTradeOrder
POST
: /aps/api/business/trade/submitTradeOrder
Note: This step only concerns transfers inbound to China. It is not necessary for non-CNY scenario transfers.
For inbound transfers to China, Partners can use the submitTradeOrder API to submit information on trade orders for review purposes.
This API is asynchronous. After submission, WorldFirst(Alipay) notifies the Partner about the acceptance of the submission. For the final result of the trade order review, the Partner can query with the inquiryTradeOrder API. Alternatively, the Partner can wait for notifications from WorldFirst(Alipay). WorldFirst(Alipay) notifies the Partner about the review result with the notifyTradeOrder API.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
Field | Data type | Required | Description |
tradeOrders | Array<TradeOrder object> | Yes | List of trade order information. Each trade is identified by a More information:
|
transferFactor | TransferFactor object | Yes | Indicates different scenarios for the transfer, such as: remitting to China in CNY, or remitting to countries/regions other than China. Note:
|
Response parameters
Field | Data type | Required | Description |
result | Result object | Yes | Indicates whether this API is called successfully. |
tradeOrderResults | Array<TradeOrder object> | Yes | Result of the trade order review. |
transferFactor | TransferFactor object | Yes | Indicates different scenarios for the transfer, such as: remitting to China in CNY, or remitting to countries/regions other than China. |
More information
Possible values and use cases for tradeOrders.bopCode
:
122030
: E-commerce trade(default value). The destination region of the trade order is China.228050
: Service commission. The destination region of the trade order is China.10101
: Advance payment against imports. The destination region of the trade order is South Korea.318134
: Goods export. The destination region of the trade order is Thailand.700001
: Marketplace settlement. The destination region of the trade order cannot be China, South Korea, or Thailand.700002
: Commission service trade. The destination region of the trade order cannot be China, South Korea, or Thailand.
Result processing logic
After calling the API, a response is returned. The possible responses for result.resultStatus
are:
Result status | Description |
S | This indicates the API call succeeded. |
F | This indicates the API call failed. For more information on why the call failed, see |
U | This indicates the API call result is unknown. Call the interface again. If the issue is not resolved, contact WorldFirst(Alipay) Technical Support. More information:
|
Result codes
result.resultCode
resultCode | resultStatus | resultMessage | Further action |
SUCCESS | S | Success | |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | Human intervention is usually needed. It is recommended that you contact WorldFirst Technical Support to resolve the issue. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields, including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Call the interface again to resolve the issue. If the issue persists, contact WorldFirst Technical Support. |
INVALID_API | F | The called API is invalid or not active. | Check whether the correct API is being called. |
INVALID_CLIENT | F | The client is invalid. | The Client ID does not exist or is invalid. |
INVALID_SIGNATURE | F | The signature is invalid. | Make sure the request is properly signed with a valid signature. For more details, refer to the following chapter:
|
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Ensure the HTTP method is |
UNKNOWN_EXCEPTION | U | The API call is failed, which is caused by unknown reasons. | The service might be down, retry later. If the issue persists, contact WorldFirst Technical Support. |
UN_SUPPORT_BUSINESS | F | Unsupported business. | Invalid parameters are used e.g. currency is incorrect. Retry with the correct information. |
Samples
Request
{
"transferFactor":{
"transferFundType":"GLOBAL_CNH_CN"
},
"tradeOrders": [
{
"orderId": "******",
"referenceOrderId": "******",
"orderTime": "2020-04-01T12:01:01+08:00",
"payTime":"2020-04-02T12:01:01+08:00",
"transAmount": {
"value": "9999999",
"currency": "CNY"
},
"orderAmount": {
"value": "9999999",
"currency": "CNY"
},
"bopCode": "122030",
"tradeBizType": "B2C",
"merchant": {
"merchantId": "******",
"merchantMCC": "5399",
"store": {
"referenceStoreId": "referenceStoreId",
"storeWebSites": [
{
"name": "Microsoft at amazon",
"url": "https://www.amazon.com/stores/node/***********"
}
]
}
},
"buyer": {
"userName":
{
"fullName":"***"
},
"userId":"abc"
},
"goods": [
{
"goodsTitle":"Microsoft",
"goodsName": "Microsoft Ergonomic Keyboard (LXM-00001)",
"goodsQuantity": 3
},
{
"goodsName": "Microsoft Surface Laptop 3",
"goodsQuantity": 2
}
],
"shippings": [
{
"transportType": "land carriage",
"shippingCarrier": "UPS",
"shippingInvoiceNo": "12345****",
"shippingAddress":
{
"address1": "shippingAddress",
"region":"cn",
"city":"beijing"
}
}
],
"seller": {
"userName": {
"fullName": "***"
},
"userId":"abc123"
}
},
{
"orderId": "******",
"referenceOrderId": "222",
"orderTime": "2020-04-02T12:01:01+08:00",
"transAmount": {
"value": "3000",
"currency": "CNY"
},
"orderAmount": {
"value": "3000",
"currency": "CNY"
},
"bopCode": "122030",
"tradeBizType": "B2C",
"merchant": {
"merchantId": "***",
"merchantMCC": "5399",
"store": {
"referenceStoreId": "referenceStoreId",
"storeWebSites": [
{
"name": "Microsoft at amazon",
"url": "https://www.amazon.com/stores/node/***********"
}
]
}
},
"buyer": {
"userId":"abc"
},
"goods": [
{
"goodsName": "Acer Aspire 5 Slim Laptop",
"goodsQuantity": 30
},
{
"goodsName": "LG 34WN80",
"goodsQuantity": 20
}
],
"shippings": [
{
"transportType": "air parcel",
"shippingCarrier": "UPS",
"shippingInvoiceNo": "ups111111111111****"
}
],
"seller": {
"userName": {
"fullName": "***"
}
}
}
]
}
Response
{
"result": {
"resultCode": "SUCCESS",
"resultMessage": "Success",
"resultStatus": "S"
},
"tradeOrderResults": [{
"orderId": "123456****",
"orderStatus": "ACCEPT",
"resultMessage": "Accepted, pending validation."
}]
}