Remove Subscription
POSTdana/recurring/subscription/removeSubscription.htm
This API is used to remove the user’s subscription
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:
dana.recurring.openapi.subscription.removeSubscriptionclientId
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)
accessToken
string
1 - 512 charactersRequiredContains customer token, which has been obtained from binding process
reserve
string
1 - 256 charactersReserved for future implementation (Key/Value)
subscriptionId
string
1 - 64 charactersRequiredSubscription identifier
merchantId
string
21 charactersConditionalMerchant identifier that is unique per each merchant
Conditional Info
Y:= Using merchantId client oAuth result
subMerchantId
string
1 - 64 charactersConditionalSub merchant identifier, known as externalDivisionId must be registered in the DANA system before use. To register a new externalDivisionId, use the Create Division API
Conditional Info
Y:= Used for sub merchant level
envInfo
json object
RequiredEnvironment information. The envInfo include the parameter of:
- sourcePlatform: The value must be
IPG - terminalType: The value must be
APP
needNotify
string
Flag to indicate DANA notification to merchant. Has values always:
false{
"request":{
"head":{
"version":"1.0",
"function":"dana.recurring.openapi.subscription.removeSubscription",
"clientId":"2014000014442",
"clientSecret":"2014000014442",
"reqTime":"2001-07-04T12:08:56+07:00",
"reqMsgId":"1234567asdfasdf1123fda",
"accessToken":"xxxxx",
"reserve":"{}"
},
"body":{
"subscriptionId":"4215125121412",
"merchantId":"216620000000464757705",
"subMerchantId":"216650000000464829701",
"envInfo":{
"sourcePlatform":"IPG",
"terminalType":"APP"
},
"needNotify":"false"
},
"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:
dana.recurring.openapi.subscription.removeSubscriptionclientId
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)
accessToken
string
1 - 512 charactersRequiredContains customer token, which has been obtained from binding process
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 ResultStatus. The 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
{
"response":{
"head":{
"version":"1.0",
"function":"dana.recurring.openapi.subscription.removeSubscription",
"clientId":"211020000000000000044",
"clientSecret":"2014000014442",
"respTime":"2001-07-04T12:08:56+07:00",
"reqMsgId":"1234567asdfasdf1123fda",
"accessToken":"xxxxx",
"reserve":"{}"
},
"body":{
"resultInfo":{
"resultStatus":"S",
"resultCodeId":"00000000",
"resultCode":"SUCCESS",
"resultMsg":"success"
}
}
},
"signature":"signature string"
}
| ResultStatus | ResultCodeId | ResultCode | ResultMessage | Solution |
|---|---|---|---|---|
| S | 00000000 | SUCCESS | success | Mark Remove Subscription process as Success |
| F | 00000004 | PARAM_ILLEGAL | parameter illegal | Mark Remove Subscription process as Failed. Retry request with proper parameter |
| U | 00000900 | SYSTEM_ERROR | system error | Mark Remove Subscription process as Failed. Retry request periodically. If error is raising, can contact to DANA to check the process |
| F | AE15113158004866 | SCHEDULE_SUBSCRIPTION_NOT_EXIST | schedule subscription is not exist | Mark Remove Subscription process as Failed. Remove subscription on merchant side |
| F | AE15113158004013 | ILLEGAL_STATUS | illegal subscription schedule status | Mark Remove Subscription process as Failed. Waiting from pending payment process |