registration

Use the registration API to register a secondary merchant with Alipay.

Structure

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


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

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

Request parameters

registrationRequestId String  REQUIRED

The unique ID used to identify a registration request. 

More information about this field:

  • This field is an API idempotency field. Merchant uses the registrationRequestId field for idempotency control. For registration requests that are initiated with the same value of registrationRequestId and reach a final status (S or F), the same result is to be returned for the request.
  • Maximum length: 64 characters

registrationNotifyUrl URL  

The URL provided by a merchant to receive the registration notification.  

passThroughInfo String  

A key-value structure that is only used for site transparent data transmission. 

More information about this field:

  • Maximum length: 2048 characters

merchantInfo MerchantRegistrationInfo object REQUIRED

Merchant information

Child parameters

productCodes String  REQUIRED

Product code. For in-store payments, the valid value of this field is:

productCodes: ["IN_STORE_PAYMENT"]

storeInfo StoreRegistrationInfo object 

Store information

Note: This field is only required when productCodes is IN_STORE_PAYMENT. An error of PARAM_ILLEGAL is returned if storeInfo is not passed in.

Child parameters

Response parameters

result Result object REQUIRED

The request result contains information such as status and error codes.

Child parameters

passThroughInfo String  

A key-value structure that is only used for site transparent data transmission. 

More information about this field:

  • Maximum length: 2048 characters
API Explorer

Request

Method
POST
Endpoint
/v1/merchants/registration
Header
Accept: application/json
URL
https://<domain_name>/ams/api/<endpoint>
Domain name
North America: https://open-na.alipay.com
Asia: https://open-sea.alipay.com
Europe: https://open-eu.alipay.com
Request Body

Response

Case
Response Body

More information

See the following list for important details on the main parameters:

  • For a secondary merchant registration request, merchantId and referanceMerchantId must be globally unique. If the registration is repeated, an error of REPEAT_REGISTRATION is returned.
  • If the type of field is Enum, the value of field must be a value within the specified range of Enum. For example, attachmentType, contactType, registrationType, businessType and productCodes are of the enum type. If the value passed in is outside Enum, an error of PARAM_ILLEGAL is returned.
  • If the Required field is not passed in, an error of PARAM_ILLEGAL is returned.
  • For String type fields, if the parameter length exceeds the specified maximum length or is less than the minimum length, an error of PARAM_ILLEGAL is returned.
  • The url of website must be a valid URL, otherwise an error of PARAM_ILLEGAL will be returned.
  • The address must be an address that can be recognized by Google Maps.
  • merchantInfo.registrationDetail.attachments.file must be a URL that a file can download.
  • For merchantInfo.merchantMCC values, see MCC codes for details. 

Error codes

Error codes are usually classified into the following categories:

  • Common error codes: common for all online and in-store payment APIs.
  • API-specific error codes: listed in the following table.  

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess

The registration is successful, no further action is needed.

INVALID_CLIENTFThe client is invalid.

Check whether the clientId is correct.

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

Check whether the media type is correct.

METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.

Check whether the HTTP method is correct.

REPEAT_REQ_INCONSISTENTFRepeated requests are inconsistent.

Change registrationRequestId and call the interface again.

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

The submitted registration is currently under review. Please wait for the final result.

REPEAT_REGISTRATIONFRepeated registration for merchant

Prompt the user not to register repeatedly.