notifySubscription
Antom uses the notifySubscription API to send the subscription result to the merchant when the subscription creation reaches a final state of success or failure.
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
subscriptionRequestId String REQUIRED
The unique ID assigned by a merchant to identify a subscription request.
More information:
- Maximum length: 64 characters
subscriptionId String
The unique ID assigned by Antom to identify a subscription.
This parameter is not returned when the user fails to create subscription plan.
More information:
- Maximum length: 64 characters
subscriptionStatus String REQUIRED
The subscription status. Valid values are:
- ACTIVE: indicates that the subscription becomes active.
- TERMINATED: indicates that the subscription is terminated.
More information:
- Maximum length: 32 characters
subscriptionNotificationType String REQUIRED
The notification type about the subscription.
- CREATE: indicates that the subscription was created.
- CHANGE: indicates that the subscription was changed.
- CANCEL: indicates that the subscription is canceled and the service is not provided after the current subscription period ends.
- TERMINATE: indicates that the subscription is terminated and the service is not provided.
More information:
- Maximum length: 32 characters
subscriptionStartTime Datetime REQUIRED
The date and time when the subscription becomes active.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
subscriptionEndTime Datetime REQUIRED
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".
periodRule PeriodRule REQUIRED
The subscription period rule, used to define a subscription's billing period.