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 charactersRequiredAPI version. As per the respective API reference
function
string
1 - 128 charactersRequiredAccording to specifications defined by each business domain
Value:
Value:
dana.recurring.openapi.subscription.querySubscriptionByIdclientId
string
1 - 36 charactersRequiredClient identifier which provided by DANA and used to identify partner and application system
clientSecret
string
1 - 64 charactersRequiredAs a secret key of client. Assigned client secret during registration
reqTime
string
25 charactersRequiredRequest time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequiredIdentify an unique system request. Each request will be assigned with a unique identifier (UUID)
reserve
string
1 - 256 charactersReserved for future implementation (Key/Value)
subscriptionId
string
1 - 64 charactersRequiredSubscription identifier
envInfo
json object
RequiredEnvironment 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 charactersRequiredAPI version. As per the respective API reference
function
string
1 - 128 charactersRequiredAccording to specifications defined by each business domain
Value:
Value:
dana.recurring.openapi.subscription.querySubscriptionByIdclientId
string
1 - 36 charactersRequiredClient identifier which provided by DANA and used to identify partner and application system
clientSecret
string
1 - 64 charactersRequiredAs a secret key of client. Assigned client secret during registration
respTime
string
25 charactersRequiredResponse time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
reqMsgId
string
1 - 64 charactersRequiredIdentify an unique system request. Each request will be assigned with a unique identifier (UUID)
reserve
string
1 - 256 charactersReserved for future implementation (Key/Value)
resultInfo
json object
RequiredDefine the detail of result information
resultStatus
string
1 charactersRequiredResult status, refer to result code list ResultStatusThe status of the request can be:
S: SuccessF: FailureU: Unknown
resultCodeId
string
1 - 16 charactersRequiredResult code identifier, refer to result code list ResultCodeId
resultCode
string
1 - 64 charactersRequiredResult code string, refer to ResultCode
resultMsg
string
1 - 256 charactersResult message, refer to result code list ResultMsg
subscriptionQueryInfo
json object
RequiredDefine the detail of subscription information. Refer to subscriptionQueryInfo
Note
If the record is not found, the response will be null
subscriptionId
string
1 - 64 charactersRequiredSubscription identifier
billId
string
1 - 64 charactersRequiredBill identifier
bizType
string
8 charactersRequiredSubscription biz type. The value must be filled with
USER_BIZgoodsType
string
1 - 17 charactersRequiredGeneral goods type for merchant which determined by DANA.
- IPG: The value must be filled with
EXTERNAL_MERCHANT
recurringType
string
13 charactersRequiredRecurring type. The value must be filled with
AUTODEDUCTIONstatus
string
1 - 8 charactersRequiredStatus of subscription. The possible values are:
PRE INITmeans the first payment haven't paid yetACTIVEmeans the subscription process is ongoingARCHIVEDmeans subscription is removed
subscriptionTitle
string
1 - 128 charactersRequiredSubscription title, the value must be the same with goodsName
subscriptionMessage
string
1 - 256 charactersDetail of subscription title
scheduleStatus
string
1 - 15 charactersRequiredStatus of schedule. The possible values are:
SCHEDULEDmeans uses for triggering user reminderINITIALmeans waiting from merchant to init the paymentPAYMENT_PROCESSmeans waiting from Finish Notify process
paymentMethod
string
1 - 7 charactersRequiredPayment method of subscription transaction, the value must be
BALANCEtotalAmount
string
RequiredSubscription transaction amount. Contains two sub-fields:
- cent: Amount, including the cents
- currencyValue: Currency code based on ISO
nextPaymentDate
json object
RequiredDefine the detail of next payment date information. Refer to nextPaymentDate
day
integer
1 - 2 charactersRequiredDay of next payment
hour
integer
1 - 2 charactersRequiredHour of next payment
minute
integer
1 - 2 charactersRequiredMinutes of next payment
second
integer
1 - 2 charactersRequiredSecond of next payment
month
integer
1 - 2 charactersRequiredMonth of next payment, using Java numeric format start from 0
e.g.,
e.g.,
- January =
0 - February =
1
year
integer
4 charactersRequiredYear of next payment
timeZone
string
5 charactersRequiredThe timezone, in format GMT+value
startPeriod
string
28 charactersSubscription start period, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example:
Example:
Tue Aug 11 21:57:09 GMT 2020endPeriod
string
28 charactersSubscription end period, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example:
Example:
Tue Aug 11 21:57:09 GMT 2020period
string
Period of subscription
currentPeriod
string
Current period of subscription
subscriptionIntervalInfo
json object
RequiredDefine the detail of subscription interval information. Refer to subscriptionIntervalInfo
type
string
1 - 7 charactersRequiredInterval type. The possible values are:
MONTHLYWEEKLYDAILY
MONTHLYvalue
integer
RequiredSubscription interval value. e.g.,
2 means the subscription is made for every 2 monthscreatedDate
string
28 charactersRequiredSubscription created date, in format 3 word of day 3 word of month date HH:MM:SS GMT year
Example:
Example:
Tue Aug 11 21:57:09 GMT 2020goodsInfo
array of json object
RequiredDefine the detail of goods information. Refer to goodsInfo
extGoodsId
string
1 - 64 charactersRequiredMerchant goods/product identifier
goodsId
string
1 - 64 charactersMerchant goods/product identifier
goodsName
string
1 - 64 charactersRequiredMerchant goods name
goodsType
string
1 - 17 charactersRequiredGeneral goods type for merchant which determined by DANA.
IPG: The value must be filled withEXTERNAL_MERCHANT
goodsDesc
string
1 - 1024 charactersMerchant goods description
minPrice
json string
RequiredThe 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
RequiredThe 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 charactersExtended information
currency
string
1 - 3 charactersRequiredThe 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"
}
| ResultStatus | ResultCodeId | ResultCode | ResultMessage | Solution |
|---|---|---|---|---|
| S | 00000000 | SUCCESS | success | Mark Query Subscription by Id process as Success |
| F | 00000004 | PARAM_ILLEGAL | parameter illegal | Mark Query Subscription by Id process as Failed. Retry request with proper parameter |
| U | 00000900 | SYSTEM_ERROR | system error | Mark Query Subscription by Id process as Failed. Retry request periodically. If error is raising, can contact to DANA to check the process |