createMandate
Call this API to create a one-time payment mandate.
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
mandateRequestId String  REQUIRED
Payment mandate request assigned by the merchant. The system queries and uniquely identifies an operation by merchantId + mandateRequestId.
More information:
- Maximum length: 64 characters
accessToken String  REQUIRED
Antom agreement token obtained after authorization is completed. This token must belong to the current merchant and be resolvable to a valid agreement.
More information:
- Maximum length: 128 characters
paymentAmount Amount  REQUIRED
Payment amount.
The channel creates a one-time payment mandate based on the exact amount and currency in this object. Subsequent payments must use the same bound amount and currency.
Response parameters
result Result  REQUIRED
Result of the API call.
mandateRequestId String Â
Request ID provided by the merchant. Returned only when APO successfully parses this parameter. This parameter is used for request correlation and does not indicate that the payment mandate was successfully created.
More information:
- Maximum length: 64 characters
mandateId String Â
Antom payment mandate ID.
Note: This parameter is returned only when result.resultStatus is S. Used for subsequent one-time payment calls.
More information:
- Maximum length: 64 characters
validFrom Datetime Â
Effective time of the payment mandate.
Note: This parameter is returned only when result.resultStatus is S.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
validUntil Datetime Â
Expiration time of the payment mandate.
Note: This parameter is returned only when result.resultStatus is S.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
Request
Response
Error codes
resultCode | Value | Message | Further action |
|
| A new order is created successfully, or an original | Save the original mandate and validity period. |
|
| The currency is not included in the system-supported currency enum values. | Check and use a value from the system currency enum. Passing enum validation does not necessarily mean the currency is supported by the channel. Existing orders are still processed according to the original amount and currency comparison rules. |
|
| In the new creation path, the token cannot be parsed into a valid format, or the channel authoritatively confirms that the agreement does not exist and the reason cannot be further categorized. | Do not return the token content. Correct the token or sign the agreement again. Do not assume that the token is expired or revoked. |
|
| The channel explicitly returns | Contact integration support to verify channel capability. Do not confuse this with API authentication. |
|
| The repeated request content is inconsistent. | Check paymentAmount.currency and paymentAmount.value against the original request record and restore the original amount and currency. Do not modify the original order. |
|
| An existing order with the same amount and currency is in | Only retry with the same request ID after waiting according to the backoff guidance in this document, or use a new order after the 10-minute condition is met. |
|
| The first channel gateway result is | The original order is in |
|
| The request traffic exceeds the limit. This product error code has been confirmed to exist. | Keep the original request ID, amount, and currency. Follow the explicit retry instructions or back off as recommended. Do not infer the final status of the historical original order based on this error. |
|
| Required request parameters are missing, blank, too long, or in an invalid format, or request validation fails, such as paymentAmount.value not being an integer greater than 0. | Check and correct the parameters according to the request field definitions, and then call the API again. When recovering an existing order with the same request ID, keep the original business intent, amount, and currency. Do not resubmit invalid parameters unchanged. |
|
| During creation result assembly, the order status is not one of | Stop subsequent debits. Keep the original request ID, response, and masked trace, and contact Antom technical support for troubleshooting. Before verifying the original creation result, do not blindly recreate the order with a new request ID, and do not rewrite the original order status based on this error. |