Documentation/API Reference

API REFERENCE

Resend a customs declaration

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Resend a customs declaration

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters3

Required fields first

Resend a customs declaration

trade_idRequiredstringdata.trade_idYabandPay transaction ID
customsRequiredstringdata.customsCustoms name
mch_customs_noRequiredstringdata.mch_customs_noMerchant customs registration number

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

This API resends a customs declaration for an order already submitted to customs.

ParameterTypeDescriptionRequired
userStringUID of the cashier or super administrator accountRequired
signStringSignatureRequired
methodStringv3.CustomDeclareRedeclareRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
trade_idStringYabandPay transaction IDRequired
customsStringCustoms nameRequired
mch_customs_noStringMerchant customs registration numberRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"customs=NINGBO&mch_customs_no=8888888888&method=v3.CustomDeclareRedeclare&time=1560499094&trade_id=dd11d082-810d-c8b7-3669-b784c466759b&user=YOUR_CASHIER_UID"

Sign stringA using secret_key

The resulting signature is:

"YOUR_SIGNATURE"

Request example:

{
	"user": "YOUR_CASHIER_UID",
	"sign": "YOUR_SIGNATURE",
	"method": "v3.CustomDeclareRedeclare",
	"time": 1560996670,
	"data": {
		"trade_id": "dd11d082-810d-c8b7-3669-b784c466759b",
		"customs": "NINGBO",
		"mch_customs_no": "8888888888"
	}
}

Response example:

{
	"status": true,
	"code": "200",
	"data": {
		"state": "UNDECLARED",
		"explanation": []
	},
	"message": ""
}

State statuses:

StatusDescription
UNDECLAREDUndeclared (the declaration has been submitted and is awaiting customs processing; no resubmission is needed)
SUBMITTEDDeclaration submitted (this status is recorded when the order has been sent to customs, the merchant submits a new declaration, and customs provides a modification API)
PROCESSINGDeclaration in progress
SUCCESSDeclaration successful
FAILDeclaration failed
EXCEPTCustoms API error