inquireSubscriptionPayment

POST /v1/subscriptions/inquireSubscriptionPayment

Call this API to retrieve a list of payments for a subscription. After the API is called successfully, you can obtain the subscription’s transaction information, such as transaction time, phase number, payment method, amount, and disputes.

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

merchantAccountId String  

A unique ID to identify a specific merchant account.

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

paymentStatuses Array<String>  

Filter transactions whose status matches any value in the following list:

  • SUCCESS: Filter transactions that are success.
  • FAIL: Filter transactions that are failed.

Defaults to returning transactions of all status if not specified.

More information:

  • Maximum length: 32 characters
  • Maximum size: 3 elements

currentPage Integer  

Current page number.

If not specified, all subscriptions on page 1 are retrieved by default.

More information:

  • Value range: 1 - 2147483647

pageSize Integer  

Page size.

If not specified, a page size of 10 is used by default.

More information:

  • Value range: 1 - 10

Response parameters

result Result  REQUIRED

Indicates whether this API is called successfully.  

Show child parameters

payments Array<SubscriptionTransaction>  REQUIRED

List of transactions of the specified subscriptionId.

Can be EMPTY if no criteria match or subscriptionId does not exists.

Show child parameters

paginator Paginator  REQUIRED

Pagination information.

Show child parameters
API Explorer
Sample CodesRun in Sandbox

Request

URL
Method
POST
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.  

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.  

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.  

INVALID_APIFThe called API is invalid or not active.

Contact Antom Technical Support to resolve the issue. 

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.

NO_INTERFACE_DEFFAPI is not defined.

Check whether the URL is correct. Please refer to the endpoint in the API documentation.

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.