Dana Subscription

Dana Subscription Cancellation Notification

Asynchronous cancellation notification for DANA subscriptions.

Request URL

URL: notifyUrl (value from create order)

HTTPMethod: POST

EndpointUrl: path of the URL, e.g. URL=https://merchant-domain.com/v2.2/dana/notify, Path=/v2.2/dana/notify

Subscription Cancellation Notification Request (Paylabs -> Merchant)

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details see Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
serviceCodeString(64)NoService Code, fixed value: sub.payment
merchantIdString(20)YesMerchant ID
storeIdString(30)NoIf using branch ID
paymentTypeString(20)YesPayment Type
merchantTradeNoString(32)YesMerchant subscription ID
createTimeString(16)NoyyyyMMddHHmmss
statusString(32)No06 Subscription canceled

Subscription Cancellation Notification Response (Merchant -> Paylabs)

Header

Data Signing Rules

Field NameTypeValueRequired
Content-TypeString(30)Fixed value "application/json;charset=utf-8"Yes
X-TIMESTAMPString(29)Current time, format 2022-09-16T16:58:47.964+07:00Yes
X-SIGNATUREString(64)Signature. For details see Data Signing RulesYes
X-PARTNER-IDString(20)Merchant IDYes
X-REQUEST-IDString(64)Unique ID for each requestYes

Body

Error Code

ParameterTypeRequiredRemarks
requestIdString(64)YesUnique identifier on every request
errCodeString(32)Yes0 means success, otherwise see Error Code
errCodeDesString(128)NoError description
merchantIdString(20)YesMerchant ID
storeIdString(30)NoIf using branch ID

Example

Request

POST URL provided by Merchant
# 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": "N010001PY-1761273693.31210331761643480131",
  "serviceCode": "sub.remove",
  "paymentType": "StaticDanaSub",
  "merchantSubId": "PY-1761273693.3121033"
}

Response

POST URL provided by Merchant
# 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":"N01029020230619290000003911687350380290",
  "errCode":"0"
}