For the complete documentation index, see llms.txt. This page is also available as Markdown.

DANA

DANA offers one time payment type that allow customer to make a payment without account binding/card registration process.

Integration Steps

Overview of integration process with DANA.


1. Payment

Payment process using DANA doesn't require account binding. After customer creates an order and chooses DANA as payment method on merchant's platform, merchant will hit this payment API to get redirect URLs to DANA's platform for customer to complete the payment.

API Endpoint

Environment
Endpoint

HTTP Method

POST

API Production

Path

.../direct-debit/core/v1/debit/payment-host-to-host

Sample of Request Header, Request Body and Response Body

Notes:

Parameter with (*) is mandatory

Paramater without (*) is optional/conditional

Payment

post
Header parameters
X-TIMESTAMPstring · utc timestampRequired

Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format

Example: 2020-12-21T07:56:11.000Z
X-SIGNATUREstringRequired

Algorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)

Example: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-IDstringRequired

Unique ID for a partner (DOKU'S Client ID)

Example: 821508239190
X-EXTERNAL-IDstringRequired

Numeric String. Reference number that should be unique in the same day (request-id)

Example: 418075533589
X-DEVICE-IDstringOptional

Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols

Example: 95221
X-IP-ADDRESSstringOptional

conditional. IP address of the end user (customer) using IPv4 format

Example: 95221
AuthorizationstringRequired

Access Token obtained from Get B2B Token API

Example: 95221
Body
partnerReferenceNostringRequired

invoice number from partner | max: 64 | Mandatory

Example: INV-0001
validUpTostringOptional

Expired time payment url | format: 2024-07-10T11:57:58+07:00

Example: 2024-07-10T11:57:58+07:00
pointOfInitiationstringOptional

Point of initiation from partner | value: app/pc/mweb | max: 20

Example: app
Responses
200

Successful

application/json
responseCodestringRequired

Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-3.-e-wallet . | Mandatory | min length: 1 | max length: 7.

Example: 2000500
responseMessagestringRequired

Response Message

Example: Successful
webRedirectUrlstringRequired

Redirect URL to Merchant's page/platform for customer to input OTP/PIN

Example: https://app-uat.doku.com/link/283702597342040
partnerReferenceNostringOptional

Invoice Number from Partner

Example: INV-0001
post/direct-debit/core/v1/debit/payment-host-to-host
200

Successful

2. Payment Notification

After payment is completed, DOKU will send HTTP Notification to merchant's defined Notification URL.Learn how to handle the notification from DOKU.

3. Additional Feature

Online Refund

This endpoint is used to create refund request for previous successful payment. Merchant can request a transaction refund to DOKU.

API Endpoint

Environment
Endpoint

HTTP Method

POST

API Production

Path

.../direct-debit/core/v1/debit/refund

Sample of Request Header, Request Body and Response Body

Notes:

Parameter with (*) is mandatory

Parameter without (*) is optional/conditional

Refund Payment

post
Authorizations
AuthorizationstringRequired

B2B access token obtained from the Get B2B Token API (/authorization/v1/access-token/b2b)

Header parameters
X-PARTNER-IDstring · max: 36Required

Merchant's client ID registered with DOKU

Example: merchant-client-id-001
X-EXTERNAL-IDstring · max: 32Required

Unique reference ID for this refund request (per-day uniqueness required). Used for idempotency and tracing. Numeric string.

Example: ext-refund-20260526-00001
AuthorizationstringRequired

B2B access token obtained from the Get B2B Token API

Example: Bearer eyJhbGciOiJSUzI1NiJ9...
X-TIMESTAMPstringRequired

Request timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)

Example: 2026-05-26T10:00:00+07:00
X-SIGNATUREstringRequired

HMAC-SHA512 symmetric signature for request integrity verification

Example: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
Authorization-CustomerstringOptional

Customer B2B2C token (dokuB2b2cToken) obtained during the DANA binding process. Required if the original payment was made using a bound DANA token.

Example: Bearer eyJhbGciOiJSUzI1NiJ9...
X-IP-ADDRESSstringOptional

IP address of the end customer's device

Example: 103.31.4.0
X-DEVICE-IDstringOptional

Device ID of the end customer's device

Example: device-id-abc123
Body

Request body for initiating a refund on the EMONEY_DANA_SNAP channel

originalPartnerReferenceNostring · max: 64Required

Invoice number of the original payment transaction to be refunded. This is the partnerReferenceNo (invoice) from the original payment request.

Example: INV-20260526-001
originalExternalIdstring · max: 36Optional

The X-EXTERNAL-ID header value from the original payment request. Used to precisely locate the original transaction.

Example: ext-pay-20260526-00001
partnerRefundNostring · max: 64Required

Merchant's unique reference number for this refund. Must be unique per originalPartnerReferenceNo. Used for idempotency and reconciliation.

Example: REFUND-20260526-001
reasonstring · max: 256Optional

Human-readable reason for the refund

Example: Customer requested full refund
Responses
200

Refund successfully processed by DANA. The refundNo field contains the acquirer's refund reference number for reconciliation.

application/json

Response body for a successful refund request

responseCodestringRequired

Response code: HTTP Status (3) + Service Code 58 (2) + Case Code (2). Example: 2005800 = HTTP 200 + service 58 + case 00 (Successful).

Example: 2005800
responseMessagestringRequired

Human-readable response message

Example: Successful
originalPartnerReferenceNostringRequired

Invoice number of the original payment transaction, echoed from the original transaction

Example: INV-20260526-001
originalReferenceNostringRequired

DANA acquirer reference number from the original payment transaction. Can be used for reconciliation with DANA.

Example: DANA-REF-987654321
refundNostringRequired

Refund reference number assigned by the DANA acquirer. Use this for reconciliation and dispute resolution with DANA.

Example: DANA-REFUND-REF-111
partnerRefundNostringRequired

Merchant's refund reference number, echoed from the request

Example: REFUND-20260526-001
refundTimestringRequired

Timestamp when the refund was completed, in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)

Example: 2026-05-26T10:05:00+07:00
post/direct-debit/core/v1/debit/refund

Last updated