Skip to main content

Query Subscription by Id

POST/dana/recurring/subscription/querySubscriptionById.htm

This API is used to obtain information of subscription based on subscription identifier.

API Type
DANA Open API
Expected Timeout
3 second
SNAP Service Code
-
Accept
application/json
Content Type
application/json

version
string
1 - 8 charactersRequired
API version. As per the respective API reference
function
string
1 - 128 charactersRequired
According to specifications defined by each business domain
Value: dana.recurring.openapi.subscription.querySubscriptionById
clientId
string
1 - 36 charactersRequired
Client identifier which provided by DANA and used to identify partner and application system
clientSecret
string
1 - 64 charactersRequired
As a secret key of client. Assigned client secret during registration
reqTime
string
25 charactersRequired
Request time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequired
Identify an unique system request. Each request will be assigned with a unique identifier (UUID)
reserve
string
1 - 256 characters
Reserved for future implementation (Key/Value)

subscriptionId
string
1 - 64 charactersRequired
Subscription identifier
envInfo
json object
Required
Environment information. The envInfo include the parameter of:
  • sourcePlatform: The value must be IPG
  • terminalType: The value must be APP
{
"request":{
"head":{
"version":"1.0",
"function":"dana.recurring.openapi.subscription.querySubscriptionById",
"clientId":"2014000014442",
"clientSecret":"2014000014442",
"reqTime":"2020-06-09T23:24:26+07:00",
"reqMsgId":"1234567asdfasdf1123fda",
"reserve":"{}"
},
"body":{
"subscriptionId":"20200417111215800000DANAW3ID009600000009",
"envInfo":{
"sourcePlatform":"IPG",
"terminalType":"APP"
}
}
},
"signature":"signature string"
}

version
string
1 - 8 charactersRequired
API version. As per the respective API reference
function
string
1 - 128 charactersRequired
According to specifications defined by each business domain
Value: dana.recurring.openapi.subscription.querySubscriptionById
clientId
string
1 - 36 charactersRequired
Client identifier which provided by DANA and used to identify partner and application system
clientSecret
string
1 - 64 charactersRequired
As a secret key of client. Assigned client secret during registration
respTime
string
25 charactersRequired
Response time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequired
Identify an unique system request. Each request will be assigned with a unique identifier (UUID)
reserve
string
1 - 256 characters
Reserved for future implementation (Key/Value)

resultInfo
json object
Required
Define the detail of result information
resultStatus
string
1 charactersRequired
Result status, refer to result code list ResultStatusThe status of the request can be:
  • S: Success
  • F: Failure
  • U: Unknown
Can be added if these 3 statuses are insufficient for business requirements
resultCodeId
string
1 - 16 charactersRequired
Result code identifier, refer to result code list ResultCodeId
resultCode
string
1 - 64 charactersRequired
Result code string, refer to ResultCode
resultMsg
string
1 - 256 characters
Result message, refer to result code list ResultMsg
subscriptionQueryInfo
json object
Required
Define the detail of subscription information. Refer to subscriptionQueryInfo
Note

If the record is not found, the response will be null

subscriptionId
string
1 - 64 charactersRequired
Subscription identifier
billId
string
1 - 64 charactersRequired
Bill identifier
bizType
string
8 charactersRequired
Subscription biz type. The value must be filled with USER_BIZ
goodsType
string
1 - 17 charactersRequired
General goods type for merchant which determined by DANA.
  • IPG: The value must be filled with EXTERNAL_MERCHANT
recurringType
string
13 charactersRequired
Recurring type. The value must be filled with AUTODEDUCTION
status
string
1 - 8 charactersRequired
Status of subscription. The possible values are:
  • PRE INIT means the first payment haven't paid yet
  • ACTIVE means the subscription process is ongoing
  • ARCHIVED means subscription is removed
subscriptionTitle
string
1 - 128 charactersRequired
Subscription title, the value must be the same with goodsName
subscriptionMessage
string
1 - 256 characters
Detail of subscription title
scheduleStatus
string
1 - 15 charactersRequired
Status of schedule. The possible values are:
  • SCHEDULED means uses for triggering user reminder
  • INITIAL means waiting from merchant to init the payment
  • PAYMENT_PROCESS means waiting from Finish Notify process
paymentMethod
string
1 - 7 charactersRequired
Payment method of subscription transaction, the value must be BALANCE
totalAmount
string
Required
Subscription transaction amount. Contains two sub-fields:
  • cent: Amount, including the cents
  • currencyValue: Currency code based on ISO
nextPaymentDate
json object
Required
Define the detail of next payment date information. Refer to nextPaymentDate
day
integer
1 - 2 charactersRequired
Day of next payment
hour
integer
1 - 2 charactersRequired
Hour of next payment
minute
integer
1 - 2 charactersRequired
Minutes of next payment
second
integer
1 - 2 charactersRequired
Second of next payment
month
integer
1 - 2 charactersRequired
Month of next payment, using Java numeric format start from 0
e.g.,
  • January = 0
  • February = 1
year
integer
4 charactersRequired
Year of next payment
timeZone
string
5 charactersRequired
The timezone, in format GMT+value
startPeriod
string
28 characters
Subscription start period, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example: Tue Aug 11 21:57:09 GMT 2020
endPeriod
string
28 characters
Subscription end period, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example: Tue Aug 11 21:57:09 GMT 2020
period
string
Period of subscription
currentPeriod
string
Current period of subscription
subscriptionIntervalInfo
json object
Required
Define the detail of subscription interval information. Refer to subscriptionIntervalInfo
type
string
1 - 7 charactersRequired
Interval type. The possible values are:
  • MONTHLY
  • WEEKLY
  • DAILY
For now, this value only support MONTHLY
value
integer
Required
Subscription interval value. e.g., 2 means the subscription is made for every 2 months
createdDate
string
28 charactersRequired
Subscription created date, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example: Tue Aug 11 21:57:09 GMT 2020
goodsInfo
array of json object
Required
Define the detail of goods information. Refer to goodsInfo
extGoodsId
string
1 - 64 charactersRequired
Merchant goods/product identifier
goodsId
string
1 - 64 characters
Merchant goods/product identifier
goodsName
string
1 - 64 charactersRequired
Merchant goods name
goodsType
string
1 - 17 charactersRequired
General goods type for merchant which determined by DANA.
  • IPG: The value must be filled with EXTERNAL_MERCHANT
goodsDesc
string
1 - 1024 characters
Merchant goods description
minPrice
json string
Required
The detail of minimum price, which use as an estimation of minimal subscription price. Contains two sub-fields:
  • cent: Amount, including the cents
  • currencyValue: Currency code based on ISO
maxPrice
json string
Required
The detail of maximum price, which use as an estimation of maximal subscription price. Contains two sub-fields:
  • cent: Amount, including the cents
  • currencyValue: Currency code based on ISO
extInfo
array of string
1 - 4096 characters
Extended information
currency
string
1 - 3 charactersRequired
The currency

{
"response":{
"head":{
"version":"1.0",
"function":"dana.recurring.openapi.subscription.querySubscriptionById",
"clientId":"2014000014442",
"clientSecret":"2014000014442",
"respTime":"2020-06-09T23:24:26+07:00",
"reqMsgId":"1234567asdfasdf1123fda",
"reserve":"{}"
},
"body":{
"resultInfo":{
"resultStatus":"S",
"resultCodeId":"00000000",
"resultCode":"SUCCESS",
"resultMsg":"success"
},
"subscriptionQueryInfo":{
"subscriptionId":"20200818111315800000DANAW3ID844300247264",
"billId":"211121212",
"bizType":"USER_BIZ",
"goodsType":"EXTERNAL_MERCHANT",
"recurringType":"AUTODEDUCTION",
"status":"ACTIVE",
"subscriptionTitle":"dana_sample_1 reminder",
"subscriptionMessage":"This is a message09",
"scheduleStatus":"SCHEDULED",
"paymentMethod":"BALANCE",
"totalAmount":"{\"cent\":\"120000\",\"currencyValue\":\"360\"}",
"nextPaymentDate":{
"day":10,
"hour":10,
"minute":10,
"second":10,
"month":10,
"year":2010,
"timeZone":"GMT+7"
},
"startPeriod":"Tue Aug 11 21:57:09 GMT 2020",
"endPeriod":"Fri Sep 11 21:57:09 GMT 2020",
"period":"1",
"currentPeriod":"0",
"subscriptionIntervalInfo":{
"type":"MONTHLY",
"value":1
},
"createdDate":"Tue Aug 18 13:15:00 GMT 2020",
"goodsInfo":[
{
"extGoodsId":"sample-goods-123",
"goodsId":"goods sample",
"goodsName":"goods sample",
"goodsType":"EXTERNAL_MERCHANT",
"goodsDesc":"This is a goods description",
"minPrice":"{\"cent\":\"120000\",\"currencyValue\":\"360\"}",
"maxPrice":"{\"cent\":\"120000\",\"currencyValue\":\"360\"}",
"extInfo":"{\"provider\":\"sample\"}",
"currency":"IDR"
}
]
}
}
},
"signature":"signature string"
}

ResultStatusResultCodeIdResultCodeResultMessageSolution
S 00000000SUCCESSsuccess
Mark Query Subscription by Id process as Success
F 00000004PARAM_ILLEGALparameter illegal
Mark Query Subscription by Id process as Failed. Retry request with proper parameter
U 00000900SYSTEM_ERRORsystem error
Mark Query Subscription by Id process as Failed. Retry request periodically. If error is raising, can contact to DANA to check the process
ask AIAI Assistant
Need help with our documentation?
Start from our frequently asked questions or feel free to ask anything else.

AI generated responses may contain mistakes.