Alipay+Alipay+

Declare a payment

By calling the declare API, the Acquiring Service Partner (ACQP) initiates a declaration request to Alipay+.

Processing logic

Request parameters

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 CNY.
    • 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 true in 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 false.

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 identify check result in the declare response via the identifyCheckResult 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 identifyCheckResult parameter, AlipayCN transfers the payer's information to the Customs.

Retransmission

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.

Sample

The following samples show the request and response when the ACQP calls the Alipay+ declare API.

Request from the ACQP to Alipay+

copy
{
  "paymentRequestId": "2021081200000002312800000",
  "customsDeclarationRequestId": "20210812000000045800000",
  "customs": {
    "customsCode": "HANGZHOU",
    "region": "CN"
  },
  "merchantCustomsInfo": {
    "merchantCustomsCode": "test_merchant_customs_code",
    "merchantCustomsName": "test_merchant_customs_name"
  },
  "declarationAmount": {
    "currency": "CNY",
    "value": "100"
  },
  "isSplit": "true",
  "referenceOrderId": "P202108120000000231280000",
  "buyerCertificate": {
    "certificateType": "ID_CARD",
    "certificateNo": "230227198707200000",
    "holderName": {
      "fullName": "张三"
    }
  }
}

Response from Alipay+ to the ACQP

copy
{
  "result": {
    "resultCode": "SUCCESS",
    "resultMsg": "Success",
    "resultStatus": "S"
  },
  "pspPaymentId": "202108120000000231200000",
  "pspDeclarationRequestId": "2013112611001004680073950000",
  "pspCustomsCode": "31222699S7",
  "clearingTransactionId": "202108120000000808000000",
  "clearingChannel": "CUP",
  "pspOrderAmount": {
    "currency": "CNY",
    "value": "100"
  },
  "identityCheckResult": "CHECK_NOT_PASSED"
}