Antom, leading provider of tailored payment solutionsAntom, leading provider of tailored payment solutions

update

POST /v1/subscriptions/update

Use this API to update the information of an already created subscription, such as the subscription period rule, the payment amount for each subscription period, or other information.

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

subscriptionUpdateRequestId String  REQUIRED

The unique ID assigned by a merchant to identify a subscription update request.

More information:

  • Maximum length: 64 characters

subscriptionId String  REQUIRED

The unique ID assigned by Antom to identify a subscription. 

More information:

  • Maximum length: 64 characters

subscriptionEndTime Datetime  

The date and time when the subscription ends.

More information:

  • The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".

subscriptionDescription String  

The description of the subscription, used for displaying user consumption records and other actions.

More information:

  • Maximum length: 256 characters

paymentAmount Object  

The payment amount charged to the user per subscription period. 

Show child parameters

periodRule Object  

The subscription period rule, used to define a subscription's billing period.

Show child parameters

orderInfo Object  

The order information of the subscription. This field is used for different purposes:

  • During the payment process, this field is mainly used by Antom for risk control or anti-money laundering.
  • After the payment is completed, this field is used for recording and reporting purposes such as purchase tracking and regulatory reporting.
Show child parameters

Response parameters

result Object  REQUIRED

Indicates whether this API is called successfully.  

Show child parameters
API Explorer
Sample CodesRun in Sandbox

Request

URL
Request Body

Response

Response Body

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess.

The interface is called successfully.  

ACCESS_DENIEDFAccess is denied.

Contact Antom Technical Support for detailed reasons.  

CLIENT_FORBIDDEN_ACCESS_API FThe client is not authorized to use this API.

Contact Antom Technical Support for detailed reasons. 

INVALID_APIFThe called API is invalid or not active.

Contact Antom Technical Support to resolve the issue. 

PARAM_ILLEGALFThe required parameters are not passed, or illegal parameters exist. For example, a non-numeric input, an invalid date, or the length and type of the parameter are wrong.

Check and verify whether the required request fields (including the header fields and body fields) of the current API are correctly passed and valid.  

INVALID_SIGNATUREFThe signature is not validated. The private key used to sign a request does not match the public key of Antom Dashboard.

Check whether the private key used to sign a request matches the public key of Antom Dashboard. The following signature references are useful:

OAUTH_FAILEDFOAuth process failed.

Contact Antom Technical Support for detailed reasons.  

KEY_NOT_FOUNDFThe private key or public key of Antom or the merchant is not found.

Check whether the private key or public key exists. If not, upload the private key in Antom Dashboard.

PROCESS_FAILFA general business failure occurred.

Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. 

SYSTEM_ERRORFA system error occurred.

Contact Antom Technical Support for detailed reasons. 

REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.

Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support.  

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

Call the interface again to resolve the issue. If not resolved, contact Antom Technical Support.  

MERCHANT_NOT_REGISTEREDFThe merchant is not registered.

Please register the merchant by using the registration interface. Contact Antom Technical Support if failed to call the registration interface.  

UNKNOWN_CLIENTFThe client is unknown.

Contact Antom Technical Support for detailed reasons.