registration
Use the registration API to register a secondary merchant with Antom.
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:
- This field is an API idempotency field.The 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:
- Maximum length: 2048 characters
merchantInfo MerchantRegistrationInfo REQUIRED
Merchant information
productCodes String REQUIRED
Product codes. For online payments, the valid values of this field are:
productCodes: ["CASHIER_PAYMENT", "AGREEMENT_PAYMENT"]
Response parameters
result Result REQUIRED
The request result contains information such as status and error codes.
passThroughInfo String
A key-value structure that is only used for site transparent data transmission.
More information:
- Maximum length: 2048 characters
Request
Response
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 ofPARAM_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
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | The registration is successful, no further action is needed. |
INVALID_CLIENT | F | The client is invalid. | Check whether clientId is correct. |
MEDIA_TYPE_NOT_ACCEPTABLE | F | The server does not implement the media type that is acceptable to the client. | Check whether the media type is correct. |
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Check whether the HTTP method is correct. |
REPEAT_REQ_INCONSISTENT | F | Repeated requests are inconsistent. | Change registrationRequestId and call the interface again. |
REGISTRATION_UNDER_REVIEW | F | A 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_REGISTRATION | F | Repeated registration for merchant | Prompt the user not to register repeatedly. |