PostCustomsPayment

POST /customs/payment/{merchant}

Declare an payment order to the customs

Path parameters

  • merchant string Required

    Merchant name to payment company, e.g. wechat.sh_smk

application/json

Body

  • orderNo string Required

    The internal order number of the merchant system, only numbers, uppercase and lowercase letters, and it is unique under the same merchant number.

  • transactionId string Required

    Transaction ID returned by Payment company

  • customs string Required

    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

  • certType string

    Only mainland ID cards are supported temporarily.

    Default value is IDCARD.

  • certId string

    The user's mainland ID number, the ID number ending in the letter X, please capitalize the letter X.

  • name string

    User name.

  • duty integer

    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

  • feeType string

    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.

  • orderFee integer

    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.

  • productFee integer

    Commodity costs, in units of cents, must be passed if there is a split order.

Responses

  • 200

    Declare payment to customs successfully.

    Hide response attributes Show response attributes object
    • code integer(int32)
    • message string | null

      Response message

    • customsMessage string | null

      Original customs return message from payment company

    • resultCode string | null

      The third party response code

    • state string | null

      Status code, UNDECLARED: not declared (If the order has been sent to the customs, the merchant resubmits and the customs still has the modification interface); PROCESSING: reporting; SUCCESS: Declaration is successful; FAIL: failed to declare; EXCEPT: The customs interface is abnormal

    • transactionId string | null

      Transaction ID returned by payment company

    • orderNo string | null

      The internal order number of the merchant system

    • subOrderNo string | null

      The internal order number of the merchant system

    • modifyTime string | null

      The last update time, time zone is GMT+8 beijing

    • certCheckResult string | null

      UNCHECKED: did not check the identity information of the order; SAME: consistent with the identity information of the payer; DIFFERENT: inconsistent with the identity information of the payer

    • verifyDepartment string | null

      The verification agencies

    • Transaction serial number, from the verification agency, such as the transaction serial number recorded by UnionPay, for merchants to report to the customs

  • 400

    Request validation failure

    Hide response attributes Show response attributes object
  • 401

    Not Authenticated.

    Hide response attributes Show response attributes object
  • 500

    Something wrong when declaring the payment.

    Hide response attributes Show response attributes object
POST /customs/payment/{merchant}
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}'
Request example
{
  "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
}
Request examples
{
  "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
}
Response examples (200)
{
  "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"
}
Response examples (200)
{
  "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"
}
Response examples (400)
{
  "code": 200,
  "message": "success"
}
Response examples (400)
{
  "code": 200,
  "message": "success"
}
Response examples (401)
{
  "code": 200,
  "message": "success"
}
Response examples (401)
{
  "code": 200,
  "message": "success"
}
Response examples (500)
{
  "code": 200,
  "message": "success",
  "errors": "Something wrong when making the service."
}
Response examples (500)
{
  "code": 200,
  "message": "success",
  "errors": "Something wrong when making the service."
}