Dana Subscription
Dana Subscription Query API
Query subscription status for DANA.
Request URL
URL: ${ROOT_URL}/dana/v1/sub/querysub
HTTPMethod: POST
EndpointUrl: /dana/v1/sub/querysub
Subscription Query Request Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details see Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique identifier on every request |
| merchantId | String(20) | Yes | Unique ID provided by payment gateway to merchant |
| storeId | String(30) | No | If merchant has branches and wants to create order using branch ID |
| paymentType | String(20) | Yes | Payment type |
| merchantTradeNo | String(32) | Yes | Merchant order number (subscription ID) |
paymentType
| Payment Type | Code |
|---|---|
| DANA E-Wallet (supports refund) | StaticDanaSub,DynamicDanaSub |
Subscription Query Response Parameters
Header
| Field Name | Type | Value | Required |
|---|---|---|---|
| Content-Type | String(30) | Fixed value "application/json;charset=utf-8" | Yes |
| X-TIMESTAMP | String(29) | Current time, format 2022-09-16T16:58:47.964+07:00 | Yes |
| X-SIGNATURE | String(64) | Signature. For details see Data Signing Rules | Yes |
| X-PARTNER-ID | String(20) | Merchant ID | Yes |
| X-REQUEST-ID | String(64) | Unique ID for each request | Yes |
Body
| Parameter | Type | Required | Remarks |
|---|---|---|---|
| requestId | String(64) | Yes | Unique ID for each request |
| errCode | String(32) | No | 0 means success, otherwise see Error Code |
| errCodeDes | String(128) | No | Error description |
| merchantId | String(20) | Yes | Unique ID provided by payment gateway to merchant |
| storeId | String(30) | No | If using branch ID |
| paymentType | String(20) | Yes | Payment type |
| requestAmount | Decimal(12,2) | No | Amount at request |
| amount | decimal(12,2) | Yes | Amount in IDR, two decimals |
| merchantTradeNo | String(32) | Yes | Merchant subscription ID |
| createTime | String(16) | No | yyyyMMddHHmmss |
| status | String(32) | No | 01: Subscription created 02: Payment successful 06: Subscription canceled 09: Subscription creation failed |
| expiredTime | String(v) | No | yyyyMMddHHmmss (checkoutUrl unusable after expiry) |
| notifyUrl | String(200) | No | URL for reminder/cancel/complete notification |
| returnUrl | String(200) | No | Frontend return URL for initial subscription |
| subTitle | String(128) | Yes | Subscription title shown to user |
| subMessage | String(256) | No | Subscription description shown to user |
| + subInterval | Object | Yes | DAILY/WEEKLY/MONTHLY |
| - type | String(10) | Yes | DAILY: Day, WEEKLY: Week, MONTHLY: Month |
| - value | Number(2) | Yes | Interval value, 1-99 |
| + productInfo | Object | Yes | Recurring product/service details |
| - id | String(10) | Yes | Product ID |
| - name | String(32) | Yes | Product Name |
| - price | decimal(12,2) | Yes | Amount in IDR, supports two decimals |
| - type | String(20) | Yes | Product Type |
| - url | String(200) | No | Product URL |
| - quantity | Number(4) | Yes | Product Quantity |
| + paymentInfo | Array<Object> | No | Last transactions |
| - successTime | String(16) | No | yyyyMMddHHmmss |
| - platformTradeNo | String(32) | No | Paylabs platform order number |
| - amount | Decimal(12,2) | No | Amount in IDR with 2 decimals |
| - status | String(32) | No | 01 PENDING 09 FAILED 02 SUCCEEDED |
| - transFeeRate | Decimal(6,6) | No | Transaction fee rate |
| - transFeeAmount | Decimal(12,2) | No | Fee, two decimals |
| - totalTransFee | Decimal(12,2) | No | Total transaction fee (excl. VAT) |
| - vatFee | Decimal(12,2) | No | VAT fee |
Example
Request
POST /dana/v1/sub/querysub
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"merchantId": "010001",
"requestId": "PY822c7f0f-bd43-4503-b569-1793cdc8de63",
"paymentType": "StaticDanaSub",
"merchantSubId": "PY-1761114620.5313134"
}Response
POST /dana/v1/sub/querysub
# HTTP Header
Content-Type: application/json;charset=utf-8
X-TIMESTAMP: 2022-09-16T16:58:47.964+07:00
X-SIGNATURE: xxxxxxxxx
X-PARTNER-ID: 010001
X-REQUEST-ID: xxxxxxxxxxxxxxxxxxxxxxxx
# HTTP Body
{
"merchantId": "010001",
"requestId": "PY822c7f0f-bd43-4503-b569-1793cdc8de63",
"errCode": "0",
"paymentType": "StaticDanaSub",
"requestAmount": 15000.0,
"amount": 15000.0,
"merchantSubId": "PY-1761114620.5313134",
"createTime": "20251022133042",
"status": "02",
"expiredTime": "20251022134042",
"notifyUrl": "https://merchant-domain.com/xxx",
"redirectUrl": "https://paylabs.co.id/home.html",
"subTitle": "test subTitle",
"subMessage": "test subMessage",
"productInfo": {
"id": "1",
"name": "test",
"price": 15000,
"type": "1",
"quantity": 1
},
"subInterval": {
"type": "WEEKLY",
"value": 1
},
"paymentInfo": [
{
"successTime": "20251024055400",
"platformTradeNo": "2025102400100000010",
"amount": 15000.0,
"status": "02",
"transFeeRate": 0.0,
"transFeeAmount": 2500.0,
"totalTransFee": 2500.0,
"vatFee": 275.0
}
]
}