Skip to main content

Customs Declaration - WeChat Pay

The Customs Declaration functionality enables Merchants who sell goods to mainland China via bonded warehouses to send payment information to China Customs conveniently and safely as regulated.

info

Currently, this service supports custom declarations for WeChat Pay transactions that are completed within a year.

To help you better understand what role our plays in your declaration process and what functionality our customs declaration API delivers, the Customs Declaration Model below illustrates the major parties in your overall declaration procedures.

  1. The customer completes the purchase.

  2. You, as the merchant, shall send custom details and receives payment data via Customs Declaration API (see guideline below).

  3. Same as your common practices of completing declaration, it is your responsibility to inform the logistics to send shipment details for declaration, with payment data attached. Also, you need to send order details for declaration, with payment data attached.

  4. After the customs receives all the required information, they will cross-check the detailed information of the order sent by you, payment methods and logistics. If details matched, customs will agree the merchant to dispatch goods.

Authentication

How to obtain access token Authentication Reference

Guideline for using Customs Declaration APIs

The following guideline will walk you through the process of using Customs Declaration service to Create, Update, Retrieve and Redeclare your order. You shall start with creating a customs declaration first and please refer to our API reference for the complete details of the calls.

Create a Customs Declaration

For detail please refer WeChat Pay official document

POST /mch-api/v1/pa/channel_extra/wechat/create_customs_declare

  • Example Request
{
"order_id": "C84938299899234",
"merchant_order_id": "P9297895081903",
"customs": "SHANGHAI_ZS",
"merchant_customs_no": "123456"
}

Verify Certificate

This API is used for merchants to upload user identity information, and WeChat Pay will recheck and return the results of the verification of the identity information of the subscriber and the payer, and is used for merchants to correct the information in the customs declaration order.

For detail please refer WeChat Pay official document

POST /mch-api/v1/pa/channel_extra/wechat/verify_certificate

  • Example Request
{
"order_id": "C84938299899234",
"merchant_order_id": "P9297895081903",
"customs": "SHANGHAI_ZS",
"merchant_customs_no": "123456",
"certificate_id": "76721773777123",
"certificate_name": "XXX"
}

Update a Customs Declaration

For detail please refer WeChat Pay official document

POST /mch-api/v1/pa/channel_extra/wechat/edit_customs_declare

  • Example Request
{
"order_id": "C84938299899234",
"merchant_order_id": "P9297895081903",
"customs": "SHANGHAI_ZS",
"merchant_customs_no": "123456"
}

Retrieve a Customs Declaration

Retrieve a customs declaration to obtain the updated status of the declaration earlier submitted.

For detail please refer WeChat Pay official document

POST /mch-api/v1/pa/channel_extra/wechat/get_customs_declare

  • Example Request
{
"order_id": "C84938299899234",
"merchant_order_id": "P9297895081903",
"customs": "SHANGHAI_ZS"
}

Redeclare a Customs Declaration

Redeclare the Customs Declaration which failed during the customs’ verification process . In some instances the information you provide and the information received by the customs may differ. If you receive “payment information does not exist” response when inquiring customs for customs declaration result. In this case, leverage the Redeclare API to send the original payment information again to the customs. Note that you will not get a new id by requesting the Redeclare API.

For detail please refer WeChat Pay official document

POST /mch-api/v1/pa/channel_extra/wechat/create_customs_redeclare

  • Example Request
{
"order_id": "C84938299899234",
"merchant_order_id": "P9297895081903",
"customs": "SHANGHAI_ZS",
"merchant_customs_no": "123456"
}