Antom, leading provider of tailored payment solutions

notifyPayment

Antom uses notifyPayment to send the payment result of each subscription period to the merchant when the payment 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

result Result  REQUIRED

Details about the payment result, such as payment status, result code, and result message. 

paymentId String  REQUIRED

The unique ID assigned by Antom to identify a payment for each subscription period.  

More information:

  • Maximum length: 64 characters

paymentAmount Amount  REQUIRED

The payment amount of each subscription period. 

paymentCreateTime Datetime  REQUIRED

The date and time when the payment of each subscription period is created. 

More information:

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

paymentTime Datetime  

The date and time when the payment of each subscription period reaches a final state of success.
This parameter is returned when the value of result.resultStatus is S.  

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

periodStartTime Datetime  

The start date and time of the current subscription period.
This parameter is not returned when you pass totalPeriods parameter in create API.

More information:

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

periodEndTime Datetime  

The end date and time of the current subscription period.
This parameter is not returned when you pass totalPeriods parameter in create API.

More information:

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

phaseNo String  REQUIRED

Indicates the current phase of the subscription period. For example, if the subscription begins in May and operates on a monthly cycle for one year, then June represents the second phase, with phaseNo = "2".

More information:

  • Maximum length: 64 characters

customizedInfo CustomizedInfo  

Your customized data provided during the subscription creating process.
This parameter is returned when you provided value to the customizedInfo parameter in the create API.

Response parameters

result Result  REQUIRED

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

Request

json
{
  "phaseNo": "1",
  "periodStartTime": "2022-11-03T17:00:00-07:00",
  "periodEndTime": "2022-10-04T09:00:00-07:00",
  "paymentAmount": {
    "currency": "PHP",
    "value": "122"
  },
  "paymentCreateTime": "2022-12-05T11:34:05-08:00",
  "paymentId": "20221205194010800100188860204600921",
  "paymentTime": "2022-12-05T11:33:56-08:00",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success",
    "resultStatus": "S"
  },
  "subscriptionId": "20221205190000000000000450000007269",
  "subscriptionRequestId": "amsmdsubscription_20221206_033332_074"
}

Response

json
{
  "result": {
    "resultStatus": "S",
    "resultCode": "SUCCESS",
    "resultMessage": "success."
  }
}

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 Codetext
{
 "result": {
    "resultCode":"SUCCESS",
    "resultStatus":"S",
    "resultMessage":"success"
 }
}
If no such message is returned to Antom due to operation issues or network issues, Antom automatically resends the notification up to eight times within 24 hours or until the correct response is received. The sending intervals are as follows: 0 sec, 2 min, 10 min, 10 min, 1 h, 2 h, 6 h, and 15 h. 

Result/Error codes

CodeValueMessageFurther action
SUCCESSSSuccess
The interface is called successfully.  
ACCESS_DENIEDFAccess is denied.
Contact Antom Technical Support for detailed reasons.  
INVALID_ACCESS_TOKENFThe access token is expired, revoked, or does not exist.
Contact Antom Technical Support for detailed reasons.  
CURRENCY_NOT_SUPPORTFThe currency is not supported.
Contact Antom Technical Support for detailed reasons.  
ORDER_IS_CLOSEDFThe transaction is closed and cannot be paid again.
Contact Antom Technical Support for detailed reasons.  
PAYMENT_AMOUNT_EXCEED_LIMITFThe payment amount is greater than the maximum amount allowed by the contract or wallet.
Check whether the payment amount exceeds the limit or use a lower amount and try again. Contact Antom Technical Support to know the specific limitation. 
PAYMENT_COUNT_EXCEED_LIMITFThe maximum number of payments exceeds the limit that is specified by the wallet.
Contact Antom Technical Support to know the specific limitation. 
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.  
MERCHANT_BALANCE_NOT_ENOUGHFThe merchant balance is not enough.
Call the interface again after the merchant has sufficient balance. 
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.   
SYSTEM_ERRORFA system error occurred.
Do not retry, and contact Antom Technical Support for more details.  
USER_BALANCE_NOT_ENOUGHFThe user's balance is insufficient for the payment.
Contact Antom Technical Support for detailed reasons.  
USER_STATUS_ABNORMALFThe user status is abnormal on the payment method side.
Contact Antom Technical Support to know the specific reasons.