Alipay+ DocsAlipay+ Docs

registrationACQP → Alipay+

POST /aps/api/v1/merchants/registration

The registration API is used by Acquiring Service Providers (ACQPs) to register a new merchant or update an existing registration. For Merchant-presented Mode Payment, 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.

For Merchant-presented Mode Payment, if 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, a registration is identified as updating an 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 product code to specify the payment product that the merchant supports.

In the Merchant-presented Mode Payment scenario, the valid value is:

  • IN_STORE_PAYMENT: indicates Merchant-presented Mode Payment.

merchantInfo MerchantRegistrationInfo object REQUIRED

The merchant information for registration, including merchant category code and registration information.

When specifying the child parameters, note that the merchantInfo.referenceMerchantId and merchantInfo.registrationDetail.registrationAddress.address1 parameters are required.

Show child parameters

storeInfo StoreRegistrationInfo object REQUIRED

The store information for registration.

When specifying the child parameters, note that the storeInfo.referenceStoreId parameter is required.

Show child parameters

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 object 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, see How to handle the result.

Important: If the ACQP wants to obtain the registration result, the ACQP can call the inquiryRegistrationStatus API. 

Show child parameters

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
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body

More information

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

S

SUCCESS

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.

F

Multiple possible values exist, such as

ACCESS_DENIED,

KEY_NOT_FOUND, etc.

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.

U

Multiple possible values exist, such as

UNKNOWN_EXCEPTION,

REQUEST_TRAFFIC_EXCEED_LIMIT, etc.

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

CodeValueMessageFurther action
SUCCESSSSuccess

N/A

ACCESS_DENIEDFAccess is denied.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. 

INVALID_CLIENTFThe client is invalid.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. 

INVALID_SIGNATUREFThe signature is invalid.

Check whether the public key, signed message, and signature algorithm are as expected. 

KEY_NOT_FOUNDFThe key is not found.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. 

MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.

Use a media type that is accepted by Alipay+. 

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTPS method.

Ensure the HTTP method is POST. 

NO_INTERFACE_DEFFAPI is not defined.

Check whether the request URL is correct. Ensure that the endpoint of the called API is correct. 

PARAM_ILLEGALFIllegal 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_FAILFA general business failure occurred. Do not retry.

It is recommended that you contact connect_support@service.alipay.com to troubleshoot the issue. 

REGISTRATION_UNDER_REVIEWFA previously submitted registration is currently under review. No new registration or modification is allowed.

Retry later. 

REPEAT_REGISTRATIONFRegistration 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_LIMITUThe request traffic exceeds the limit.

Reduce the frequency of API calls. 

UNKNOWN_EXCEPTIONUAn API call failed, which is caused by unknown reasons.

Try to recall the API.