registrationACQP → Alipay+
The registration API is used by the Acquiring Service Providers (ACQPs) to register a new merchant or update an existing registration. For online payments, the ACQP needs to register the merchant information, while for in-store payments, the ACQP needs to register both the merchant information and the store information.
When using this API, the ACQP needs to take the following things into consideration:
- Batch operations are not supported. For a single time, only one merchant or store can be registered or updated.
- When calling a request to update an existing registration, check whether the last registration request is still within 30 minutes. Only when the last request exceeds 30 minutes, can the new request be accepted; otherwise, it is rejected.
In the following cases, a registration is identified as updating an existing registration. Note that multiple products (specified on the productCodes parameter) in one request correspond to separate registrations.
- For the User-presented Mode Payment product or the Merchant-presented Mode Payment product, the Merchant ID (specified on the merchantInfo.referenceMerchantId parameter), and the Store ID (specified on the storeInfo.referenceStoreId parameter) in the request are both the same as those in the existing registration.
- For the Cashier Payment product or the Auto Debit product, the Merchant ID (specified on the merchantInfo.referenceMerchantId parameter) in the request is the same as that in the existing registration.
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 optional parameters empty by setting their values as ""
; otherwise, an error might occur.
Request parameters
registrationRequestId String REQUIRED
The unique ID that is assigned by the ACQP to identify a registration request.
More information:
- This field is an API idempotency field.For requests that are initiated with the same registrationRequestId, Alipay+ returns the same result.
- Maximum length: 64 characters
productCodes Array<String> REQUIRED
The list of product codes to specify the payment products that the merchant support. Valid values are:
CASHIER_PAYMENT
: indicates the Cashier Payment product. For more information, see Cashier Payment.AGREEMENT_PAYMENT
: indicates the Auto Debit product. For more information, see Auto Debit.IN_STORE_PAYMENT
: indicates the in-store payment products, such as User-presented Mode Payment and Merchant-presented Mode Payment. For more information, see User-presented Mode Payment and Merchant-presented Mode Payment.
merchantInfo MerchantRegistrationInfo REQUIRED
The merchant information for registration, including merchant category code and registration information.
When specifying the child parameters, note that:
- the merchantInfo.merchantDisplayName parameter is required if the value of productCodes contains
CASHIER_PAYMENT
,AGREEMENT_PAYMENT
, or both. - the merchantInfo.websites parameter is required if the value of productCodes contains
CASHIER_PAYMENT
,AGREEMENT_PAYMENT
, or both. - the merchantInfo.registrationDetail.registrationAddress.address1 parameter is required.
storeInfo StoreRegistrationInfo
The store information for registration.
Specify this parameter if and only if the value of the productCodes parameter contains IN_STORE_PAYMENT
.
registrationNotifyUrl URL
The URL that is provided by the merchant to receive registration notifications from Alipay+. Specify this parameter if the ACQP wants to receive registration notifications from Alipay+. In addition, to receive registration notifications from Alipay+, the ACQP also needs to integrate the notifyRegistrationStatus API first.
More information:
- Maximum length: 2048 characters
passThroughInfo String
The information that is passed through by the ACQP to Alipay+. The value of this parameter is in a set of key-value pairs.
Specify this parameter if the ACQP wants to pass information to the Mobile Payment Provider (MPP).
More information:
- Maximum length: 2048 characters
Response parameters
result Result REQUIRED
The result of the business processing, including the result status, result code, and the result message. For more information about how to handle the result of the registration API, see How to handle the result.
Important: If the ACQP wants to obtain the registration result, the ACQP can call the inquiryRegistrationStatus API.
passThroughInfo String
The information that is passed through by Alipay+ to the ACQP. The value of this parameter is in a set of key-value pairs.
This parameter is returned by Alipay+ if the MPP wants to pass information to the ACQP.
More information:
- Maximum length: 2048 characters
Request
Response
More information
How to specify request parameters
The ACQP needs to specify the values of productCodes, merchantInfo.referenceMerchantId and storeInfo.referenceStoreId depending on payment products that the merchant supports. Refer to the table below for details.
Supported payment products | Value of productCodes | merchantInfo.referenceMerchantId | storeInfo.referenceStoreId |
Only online payment products, such as Cashier Payment, Auto Debit, or both | Contains only |
|
|
Only in-store payment products, such as User-presented Mode Payment, Merchant-presented Mode Payment, or both | Contains only |
|
|
Both online and in-store payments | Contains |
|
|
How to handle the result
You might receive different results from Alipay+. Follow the instructions below to handle the result.
result.resultStatus | result.resultCode | Registration status | Actions |
|
| The registration is successfully accepted by Alipay+. | Call the inquiryRegistrationStatus API to inquire about the registration result. Or you can wait for the registration result sent by Alipay+ via the notifyRegistrationStatus API. |
| Multiple possible values exist, such as
| The registration fails to be accepted by Alipay+. | Take actions according to the result code (specified on the result.resultCode parameter). For more information, see the Result codes section below. |
| Multiple possible values exist, such as
| Unknown | Use the same parameters to retry the registration request. If you keep receiving the same result indicating the unknown status, contact connect_support@service.alipay.com. |
No result received | Unknown | Use the same parameters to retry the registration request. If you keep receiving no result, contact connect_support@service.alipay.com. |
Result/Error codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | N/A |
ACCESS_DENIED | F | Access is denied. | It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. |
INVALID_CLIENT | F | The client is invalid. | It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. |
INVALID_SIGNATURE | F | The signature is invalid. | Check whether the public key, signed message, and signature algorithm are as expected. |
KEY_NOT_FOUND | F | The key is not found. | It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. |
MEDIA_TYPE_NOT_ACCEPTABLE | F | The server does not implement the media type that is acceptable to the client. | Use a media type that is accepted by Alipay+. |
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTPS method. | Ensure the HTTP method is POST. |
NO_INTERFACE_DEF | F | API is not defined. | Check whether the request URL is correct. Ensure that the endpoint of the called API is correct. |
PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. | Check whether the request parameters, including the header parameters and body parameters, are correct and valid. For more information about the parameters of each API, see the Structure section of the specific API reference topic. |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. |
REGISTRATION_UNDER_REVIEW | F | A previously submitted registration is currently under review. No new registration or modification is allowed. | Retry later. |
REPEAT_REGISTRATION | F | Registration for the merchant is repeated. | Check if you have initiated repeated requests. If so, you can call the inquiryRegistrationStatus API to inquire about the registration status later. If not, contact connect_support@service.alipay.com to troubleshoot the issue. |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | Reduce the frequency of API calls. |
UNKNOWN_EXCEPTION | U | An API call failed, which is caused by unknown reasons. | Try to recall the API. |