Declare a payment
By calling the declare API, the Acquiring Service Partner (ACQP) initiates a declaration request to Alipay+.
When using the declare API, the following request parameters need to be correctly specified:
- customsDeclarationRequestId: indicates the unique ID that is assigned by the merchant to identify a customs declaration request. This parameter is not provided for customs.
- declarationAmount: indicates the amount declared to customs. When specifying the child parameters:
- declarationAmount.currency: the value of this parameter needs to be fixed as
- declarationAmount.value: the value of this parameter and the accumulated declaration amount for the same paymentRequestId cannot exceed the transaction amount, namely the value of customsDeclarationAmount.value in the inquiryPayment and notifyPayment APIs.
- isSplit: indicates whether the payment order needs to be split for declaration. Specify the value of this parameter as
truein either of the following situations:
- The payment needs to be split into multiple orders and declared to multiple customs districts.
- The payment needs to be split into multiple orders and only some of these orders need to be declared.
Otherwise, specify the value of this parameter as
Identity check between buyer and payer
If the merchant wants to ensure that the buyer's identity is consistent with the payer's identity, specify the buyer parameter in the declare request. Alipay+ then returns the identity check result in the declare response via the identityCheckResult parameter. Valid values of this parameter are:
CHECK_PASSED: indicates that the buyer's name and ID card number are the same as the payer's.
CHECK_NOT_PASSED: indicates that the buyer's name and ID card number are not the same as that of the payer's.
However, no matter the value of the identityCheckResult parameter, AlipayCN transfers the payer's information to the Customs.
The declare API can also be called to retransmit or update an existing declaration. For more information about applicable scenarios, preconditions, and Alipay+'s responses of retransmission, see How to retransmit a declaration.
For more information about how to use the declare API, see declare.
The following samples show the request and response when the ACQP calls the Alipay+ declare API.
Request from the ACQP to Alipay+
Response from Alipay+ to the ACQP