# registration

`POST /aps/api/v1/merchants/registration`

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.

Structure

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

-   [Request header](api_overview.md#3mLq0)
-   [Response header](api_overview.md#YdmVS)

**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 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. 
-   `AGREEMENT_PAYMENT`: indicates the Auto Debit product. 
-   `IN_STORE_PAYMENT`: indicates the in-store payment products, such as User-presented Mode Payment and Merchant-presented Mode Payment.

#### merchantInfo (MerchantRegistrationInfo, REQUIRED)

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

**Note:** 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.

##### referenceMerchantId (String, REQUIRED)

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

More information:

- Maximum length: 64 characters

##### merchantDisplayName (String)

The display name of the merchant.

More information:

- Maximum length: 64 characters

##### merchantMCC (String, REQUIRED)

The merchant category code (MCC), which represents the category of the merchant's business type. For more information, see [Alipay+ MCC Standards](https://docs.alipayplus.com/alipayplus/alipayplus/mcc-standards/overview.md).

More information:

- Maximum length: 32 characters

##### websites (Array<WebSite>)

The list of merchant websites.

More information:

- Maximum size: 5 elements

###### name (String)

The name of the website.

More information:

- Maximum length: 256 characters

###### url (String, REQUIRED)

The URL of the website.

More information:

- Maximum length: 2048 characters

###### desc (String)

The description of the website.

More information:

- Maximum length: 512 characters

###### websiteType (String, REQUIRED)

The type of website. Valid values are:

-   `WEB`: used when a website URL is specified in the _merchantInfo.website.url_ parameter.
-   `APP`: used when an app download URL is specified in the _merchantInfo.website.url_ parameter.

##### registrationDetail (RegistrationDetail)

The detailed registration information, including the merchant's legal name, business registration type, and so on.

###### legalName (String, REQUIRED)

The merchant's legal name for business registration.

More information:

- Maximum length: 256 characters

###### registrationType (String, REQUIRED)

The merchant's business registration type. Valid values are:

-   `US_FEDERAL_EIN`: indicates that the value of _registrationNo_ is the Employer Identification Number (EIN) of the US merchant.
-   `ENTERPRISE_REGISTRATION_NO`: indicates that the value of _registrationNo_ is the merchant registration ID.
-   `INDEPENDENT_CONTRACTOR_LICENSE_NO`: indicates that the value of _registrationNo_ is the license number of a ride-share driver or a taxi driver.
-   `OTHER_IDENTIFICATION_NO`: indicates that the value of _registrationNo_ is any other identification number.

###### registrationNo (String)

The merchant's business registration number.

**Note:** Required if the value of _merchantInfo.registrationDetail.businessTyp_e is `ENTERPRISE`. For more information about how to specify the value for this parameter, see the description of the _regsitrationType_ parameter.

More information:

- Maximum length: 64 characters

###### registrationAddress (Address, REQUIRED)

The merchant's address for business registration.

###### region (String, REQUIRED)

The region where the address is located. The value of this parameter must be a 2-character country/region code that follows the [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) standard.

More information:

- Maximum length: 2 characters

###### state (String)

The state, country, or province where the address is located.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 8 characters

###### city (String)

The city, district, suburb, town, or village where the address is located.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 32 characters

###### address1 (String, REQUIRED)

The address line 1, which contains the street name, PO box, or company name.

More information:

- Maximum length: 256 characters

###### address2 (String)

The address line 2, which contains the apartment, suite, unit, or building name.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 256 characters

###### zipCode (String)

The zip or postal code.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 32 characters

###### businessType (String, REQUIRED)

The business type of the merchant. Valid values are:

-   `ENTERPRISE`: indicates that the business type of the merchant is enterprise.
-   `INDIVIDUAL`: indicates that the business type of the merchant is individual.

#### storeInfo (StoreRegistrationInfo)

The store information for registration.

**Notes:**

-   Required and valid only if the value of the _productCodes_ parameter contains `IN_STORE_PAYMENT`.
-   When specifying the child parameters, note that the _storeInfo.storeAddress.address1_ parameter is required.

##### referenceStoreId (String, REQUIRED)

The unique ID that is assigned by the merchant to identify a store.

More information:

- Maximum length: 32 characters

##### storeName (String, REQUIRED)

The store name.

More information:

- Maximum length: 256 characters

##### storeMCC (String, REQUIRED)

The store's merchant category code (MCC). For more information, see [Alipay+ MCC Standards](https://docs.alipayplus.com/alipayplus/alipayplus/mcc-standards/overview.md).

More information:

- Maximum length: 32 characters

##### storeAddress (Address, REQUIRED)

The address where the store is located.

###### region (String, REQUIRED)

The region where the address is located. The value of this parameter must be a 2-character country/region code that follows the [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) standard.

More information:

- Maximum length: 2 characters

###### state (String)

The state, country, or province where the address is located.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 8 characters

###### city (String)

The city, district, suburb, town, or village where the address is located.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 32 characters

###### address1 (String, REQUIRED)

The address line 1, which contains the street name, PO box, or company name.

More information:

- Maximum length: 256 characters

###### address2 (String)

The address line 2, which contains the apartment, suite, unit, or building name.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 256 characters

###### zipCode (String)

The zip or postal code.

**Note**: Specify this parameter if you have the information. This provides better user experience.

More information:

- Maximum length: 32 characters

#### registrationNotifyUrl (URL)

The URL that is provided by the merchant to receive registration notifications from Alipay+.

**Notes**:

-   Required if the ACQP wants to receive registration notifications from Alipay+.
-   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. 

**Note**: 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 _Result processing logic_.

**Notes:** If the ACQP wants to obtain the registration result, the ACQP can call the [**inquiryRegistrationStatus**](inquiry_registration_status) API.

##### resultCode (String, REQUIRED)

The result code that indicates the detailed processing result.

More information:

- Maximum length: 64 characters

##### resultStatus (String, REQUIRED)

The result status that indicates the processing result. Valid values are:

-   `S`: Successful
-   `F`: Failed
-   `U`: Unknown

##### resultMessage (String)

The result message that describes the result code in detail.

More information:

- Maximum length: 256 characters

#### 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.

**Note**: Returned by Alipay+ if the MPP wants to pass information to the ACQP.

More information:

- Maximum length: 2048 characters

## More 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.
-   Depending on the payment product that the merchant supports, follow different requirements when specifying the values of _productCodes_, _merchantInfo.referenceMerchantId_ and _storeInfo.referenceStoreId_.

-   To register a merchant that supports only online payments, ensure that the value of the _productCodes_ parameter contains only `CASHIER_PAYMENT`, `AGREEMENT_PAYMENT`, or both, and specify only _referenceMerchantId_.
-   To register a merchant that supports only in-store payments, ensure that the value of the _productCodes_ parameter only contains `IN_STORE_PAYMENT`, and specify both _merchantInfo.referenceMerchantId_ and _storeInfo.referenceStoreId_. **Note:** Only in the case where Alipay CN is involved, registration is required.
-   To register a merchant that supports both online and in-store payments, ensure that the value of the _productCodes_ parameter contains `IN_STORE_PAYMENT` and at least one of `CASHIER_PAYMENT` and `AGREEMENT_PAYMENT`, and specify both _referenceMerchantId_ and _referenceStoreId_.

> **Note**: For the _merchantInfo.referenceMerchantId_ and _storeInfo.referenceStoreId_ values:
>
> -   During registration, _merchantInfo.referenceMerchantId_ and _storeInfo.referenceStoreId_ are not case-sensitive. Values that differ only by capitalization count as the same value and cannot be used to register different merchants. For example, if you register a merchant ID as `ABC`, `abc` cannot be registered for another merchant.
> -   In transactions, _merchantInfo.referenceMerchantId_ and _storeInfo.referenceStoreId_ are case-sensitive. You must use the exact same capitalization as registered; otherwise, the transaction may fail. For example, if the registered _merchantInfo.referenceMerchantId_ is `ABC`, you must use `ABC`, instead of `abc`, in subsequent transactions.

-   When calling a request to update an existing registration, check whether the last registration request is still within 7 natural days or processed. Only when the last request exceeds 7 natural days, or it is within 7 natural days but has been processed, can the new request be accepted; otherwise, it is rejected.

**Result processing logic**

In the response, the _result.resultStatus_ parameter indicates the acceptance result of the registration request. The following table describes each result status:

<table style="width:742px;outline:none;border-collapse:collapse;border:1px solid rgb(217, 217, 217)" class="lake-table"><colgroup><col width="154" span="1"><col width="588" span="1"></colgroup><tbody><tr style="height:33px"><td style="background-color:rgb(212, 238, 252);min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u6583e9be" data-lake-id="753e6bca118c53cbf002b87855dc81b6" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><strong><em><span>result.resultStatus</span></em></strong></p></td><td style="background-color:rgb(212, 238, 252);min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u9efadf2a" data-lake-id="0ce60e36ef28daebc4e369ea8e6f2b47" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><strong><span>Description</span></strong></p></td></tr><tr style="height:33px"><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u06a75217" data-lake-id="999269dd26e07f4e9cc5102bda204f1c" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><code style="font-family:monospace;font-size:inherit;background-color:rgba(0, 0, 0, 0.06);padding:0px 2px;border:1px solid rgba(0, 0, 0, 0.08);border-radius:2px;line-height:inherit;overflow-wrap:break-word;text-indent:0px"><span>S</span></code></p></td><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p data-lake-id="50c3b59ff7d04993ad18e06790335443" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><span>The registration is successfully accepted and approved by </span>MPP<span>s.</span></p></td></tr><tr style="height:33px"><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u597875f3" data-lake-id="9ca3fd001f7b25e63b417936862c04ce" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><code style="font-family:monospace;font-size:inherit;background-color:rgba(0, 0, 0, 0.06);padding:0px 2px;border:1px solid rgba(0, 0, 0, 0.08);border-radius:2px;line-height:inherit;overflow-wrap:break-word;text-indent:0px"><span>F</span></code></p></td><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u8809469e" data-lake-id="621a473fc7d2df0513b17585a6860ad2" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><span>The registration request failed to be accepted, and you can check </span><em><span>resultCode</span></em><span> and </span><em><span>resultMessage</span></em><span> for more information.</span></p></td></tr><tr style="height:33px"><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u3fb15a56" data-lake-id="50ceb8b097f49a777e9200adcb76346b" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><code style="font-family:monospace;font-size:inherit;background-color:rgba(0, 0, 0, 0.06);padding:0px 2px;border:1px solid rgba(0, 0, 0, 0.08);border-radius:2px;line-height:inherit;overflow-wrap:break-word;text-indent:0px"><span>U</span></code></p></td><td style="min-width:90px;font-size:14px;white-space:normal;overflow-wrap:break-word;border:1px solid rgb(217, 217, 217);padding:4px 8px;cursor:default"><p id="u13c338e3" data-lake-id="9b8e5137f6d9290c8d6769381cb818f5" style="font-size:14px;color:rgb(38, 38, 38);line-height:1.74;letter-spacing:0.05em;outline-style:none;overflow-wrap:break-word;margin-top:0px;margin-bottom:0px"><span>The system is busy and you can try again.</span></p></td></tr></tbody></table>

## 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.  | Wait for the review and 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. |

## Request

```json
{
  "registrationRequestId": "2020091811058602000006001420000",
  "merchantInfo": {
    "referenceMerchantId": "2188120000190000",
    "merchantMCC": "5735",
    "registrationDetail": {
      "legalName": "ExampleLegalName",
      "registrationType": "ENTERPRISE_REGISTRATION_NO",
      "registrationNo": "RN100",
      "registrationAddress": {
        "region": "CN",
        "address1": "浙江省杭州市"
      },
      "businessType": "ENTERPRISE"
    }
  },
  "storeInfo": {
    "referenceStoreId": "2188120000",
    "storeName": "Example",
    "storeMCC": "5735",
    "storeAddress": {
      "region": "CN",
      "address1": "浙江省杭州市..."
    }
  },
  "productCodes": [
    "IN_STORE_PAYMENT"
  ]
}
```

## Response

```json
{
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "Success",
    "resultStatus": "S"
  }
}
```