Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

notifySubscription

Antom uses this 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  REQUIRED

The unique ID assigned by Antom to identify a subscription.  

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. 

Show child parameters

Response parameters

result Result  REQUIRED

A fixed value, which is sent to Antom to acknowledge that the notification is received. 

Show child parameters
API Explorer

Request

Case
Subscription creation notification
Request Body

Response

Response Body

Result process logic

Send the following message with fixed values to Antom after receiving the notification, to acknowledge that the notification from Antom is received:

Sample Code

If no such message is returned to Antom due to operation issues or network issues, Antom will intermittently send the notification until the required message is returned by the merchant. Resending of the notification will be performed within 24 hours after the first notification is sent. The notification will be resent up to eight times, with an interval of 0s, 2min, 10min, 10min, 1h, 2h, 6h, and 15h.

Note: In the sandbox environment, if you do not return information in the specified format, Antom will not resend asynchronous notifications to you.