Alipay+ DocsAlipay+ Docs

pushPaymentAlipay+ ACQP

The pushPayment API is used by Alipay+ to send a request to the Acquiring Service Provider (ACQP) for accepting a payment from the MPP in Merchant-presented Mode Payment (Push Mode).

Note: In the following sections, Mobile Payment Provider (MPP) is also known as Payment Service Provider. For example, the pspId parameter specifies the ID that identifies an MPP. 

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Note: 

1. Set the data type of each parameter (except array) as String. This means that you must use double quotation marks (" ") to enclose the parameter value. Examples:

  • If the data type of a parameter is Integer and its value is 20, set it as "20". 
  • If the data type of a parameter is Boolean and its value is true, set it as "true".

2. For optional parameters that are not required in your case, you can take one of the following actions:

  • Exclude the parameters from the request body. 
  • Set the parameter values as null (without the double quotation marks).

Do NOT leave the optional parameters empty by setting their values as ""; otherwise, an error might occur. 

Request parameters

acquirerId String  REQUIRED

The unique ID that is assigned by Alipay+ to identify an ACQP. 

More information:

  • Maximum length: 64 characters

pspId String  REQUIRED

The unique ID that is assigned by Alipay+ to identify an MPP. 

More information:

  • Maximum length: 64 characters

codeValue string  REQUIRED

The code value that the user scans.

More information:

  • Maximum length: 512 characters

paymentId String  REQUIRED

The unique ID that is assigned by Alipay+ to identify a payment order.

More information:

  • This field is an API idempotency field.This field is an API idempotency field. For requests that are initiated with the same paymentId, regard the requests as repeated and process the requests only once. Check the consistency of the following key request parameters: paymentRequestId, paymentAmount, and settlementAmount. If any of their values is different from that in the previous request, return the REPEAT_REQ_INCONSISTENT result code.
  • Maximum length: 64 characters

paymentRequestId String  

The unique ID that is assigned by the ACQP to identify a payment order.

More information:

  • Maximum length: 64 characters

customerId String  

The unique ID that is assigned by Alipay+ to identify an MPP user.

This parameter is specified by Alipay+ if the relevant information is passed in by the MPP.

More information:

  • Maximum length: 64 characters

paymentAmount Amount object REQUIRED

The amount that the ACQP requests to receive from Alipay+. The currency of the amount must be specified to the one that the ACQP uses to create the payment order.

Show child parameters

settlementAmount Amount object REQUIRED

The gross amount that Alipay+ settles to the ACQP. If the settlement currency (specified on the settlementAmount.currency parameter) is the same as the payment currency (specified on the paymentAmount.currency parameter), the settlement amount (specified on the settlementAmount.value parameter) is the same as the payment amount (specified on the paymentAmount.value parameter); otherwise, the settlement amount is calculated based on the paymentAmount and settlementQuote parameters.

Show child parameters

settlementQuote Quote object 

The exchange rate between the settlement currency (specified on the settlementAmount.currency parameter) and the payment currency (specified on the paymentAmount.currency parameter).

This parameter is specified by Alipay+ if the settlement currency is different from the payment currency.

Show child parameters

mppPaymentId String  REQUIRED

The unique ID that is assigned by the MPP to identify a payment order.

More information:

  • Maximum length: 64 characters

walletBrandName String  REQUIRED

The brand name of the MPP that is displayed to the customer.

More information:

  • Maximum length: 128 characters

Response parameters

result Result object REQUIRED

The result of the business processing, including the result status, result code, and result message. For more information about how to return the result, see How to return the result.

Show child parameters

paymentRequestId string  

The unique ID that is assigned by the ACQP to identify a payment order.

Return this parameter if the value of the result.resultCode parameter is SUCCESS, which means that the payment succeeds.

More information:

  • Maximum length: 64 characters

paymentTime Datetime  

The date and time when the payment order reaches a final state.

Return this parameter if the value of the result.resultCode parameter is SUCCESS, which means that the payment succeeds.

More information:

  • The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body

More information

How to return the result

  • If the payment succeeds, set the value of result.resultStatus to S and the value of result.resultCode to SUCCESS.
  • If the payment fails, set the value of result.resultStatus to F.
  • If the payment result is unknown, set the value of result.resultStatus to U and the value of result.resultCode to UNKNOWN_EXCEPTION.

Result/Error codes

CodeValueMessage
SUCCESSSSuccess
ACCESS_DENIEDFAccess is denied.
BUSINESS_NOT_SUPPORTFThe payment business is not supported.
CURRENCY_NOT_SUPPORTFThe currency is not supported.
EXPIRED_CODEFThe code is expired.
INVALID_CLIENTFThe client is invalid.
INVALID_CODEFThe code is invalid.
INVALID_CONTRACTFThe contract is invalid.
INVALID_MERCHANT_STATUSFThe merchant status is abnormal due to restrictions, for example, the merchant's operation has been suspended.
INVALID_SIGNATUREFThe signature is invalid.
KEY_NOT_FOUNDFThe key is not found.
MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.
MERCHANT_KYB_NOT_QUALIFIEDFThe merchant's KYB failed or KYB level is not high enough.
MERCHANT_NOT_REGISTEREDFThe merchant is not registered.
METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTPS method.
NO_INTERFACE_DEFFAPI is not defined.
ORDER_IS_CLOSEDFThe order is closed.
PARAM_ILLEGALFIllegal parameters. For example, non-numeric input, invalid date.
PAYMENT_AMOUNT_EXCEED_LIMITFThe payment amount exceeds the limit that is specified by the ACQP.
PAYMENT_AMOUNT_INVALIDFPayment amount is invalid.
PAYMENT_COUNT_EXCEED_LIMITFThe number of payments exceeds the limit.
PROCESS_FAILFA general business failure occurred. Do not retry.
REPEAT_REQ_INCONSISTENTFRepeated requests are inconsistent.
RISK_REJECTFThe request is rejected because of the risk control.
PAYMENT_IN_PROCESSUThe payment is being processed.
REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.
UNKNOWN_EXCEPTIONUAn API call failed, which is caused by unknown reasons.