> For the complete documentation index, see [llms.txt](https://developers.doku.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.doku.com/accept-payments/direct-api/snap/integration-guide/e-wallet/dana.md).

# DANA

## Integration Steps

Overview of integration process with DANA.

1. [Payment](#1.-payment)
2. [Payment Notification](#id-2.-payment-notification)
3. [Additional Feature](#id-3.-additional-feature)

***

### 1. Payment&#x20;

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**

<table><thead><tr><th width="176">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/debit/payment-host-to-host</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Paramater without (\*) is optional/conditional

## POST /direct-debit/core/v1/debit/payment-host-to-host

> Payment

```json
{"openapi":"3.0.3","info":{"title":"Swagger E-Wallet SNAP DANA","version":"1.0.11"},"servers":[{"url":"https://{api-domain}"}],"paths":{"/direct-debit/core/v1/debit/payment-host-to-host":{"post":{"summary":"Payment","parameters":[{"in":"header","name":"X-TIMESTAMP","schema":{"type":"string","format":"utc timestamp"},"required":true,"description":"Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format"},{"in":"header","name":"X-SIGNATURE","schema":{"type":"string"},"description":"Algorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)","required":true},{"in":"header","name":"X-PARTNER-ID","schema":{"type":"string"},"required":true,"description":"Unique ID for a partner (DOKU'S Client ID)"},{"in":"header","name":"X-EXTERNAL-ID","schema":{"type":"string"},"required":true,"description":"Numeric String. Reference number that should be unique in the same day (request-id)"},{"in":"header","name":"X-DEVICE-ID","schema":{"type":"string"},"description":"Device identification on which the API services are currently being accessed by the end user (customer). Can’t contain symbols"},{"in":"header","name":"X-IP-ADDRESS","schema":{"type":"string"},"description":"conditional. IP address of the end user (customer) using IPv4 format"},{"in":"header","name":"Authorization","schema":{"type":"string","description":"Access Token obtained from Get B2B Token API"},"required":true,"description":"Access Token obtained from Get B2B Token API | Go to [here](https://dokucom.gitbook.io/api-reference/direct-api/get-token-api/b2b) for detailed documentation"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequest"}}}},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}}}}}},"components":{"schemas":{"PaymentRequest":{"type":"object","required":["partnerReferenceNo","amount","urlParam"],"properties":{"partnerReferenceNo":{"type":"string","description":"invoice number from partner | max: 64 | Mandatory "},"validUpTo":{"type":"string","description":"Expired time payment url | format: 2024-07-10T11:57:58+07:00 "},"pointOfInitiation":{"type":"string","description":"Point of initiation from partner | value: app/pc/mweb | max: 20"},"urlParam":{"type":"object","required":["url","type","isDeepLink"],"properties":{"url":{"type":"string","description":"URL partner for redirect back from DANA | format: www.merchant.co.id | max: 255 | Mandatory"},"type":{"type":"string","description":"Pay Return | Value should be always PAY_RETURN | Mandatory"},"isDeepLink":{"type":"string","description":"Is Merchant use deep link or not | value: Y/N | Mandatory"}}},"amount":{"$ref":"#/components/schemas/AmountObject"},"additionalInfo":{"type":"object","required":["channel"],"properties":{"channel":{"type":"string","description":"Value should be always EMONEY_DANA_SNAP | Mandatory"},"orderTitle":{"type":"string","description":"Order title from merchant"},"supportDeepLinkCheckoutUrl":{"type":"string","description":"Value 'true' for Jumpapp behaviour, 'false' for webview, false by default"}}}}},"AmountObject":{"type":"object","required":["value","currency"],"properties":{"value":{"type":"string","description":"Transaction Amount. Total Amount with 2 decimal, format ISO 4217 | Mandatory | min length: 1 | max length: 16.2"},"currency":{"type":"string","description":"Currency. | Mandatory | min length: 1 | max length: 3"}}},"PaymentResponse":{"type":"object","required":["responseCode","responseMessage","webRedirectUrl"],"properties":{"responseCode":{"type":"string","description":"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."},"responseMessage":{"type":"string","description":"Response Message"},"webRedirectUrl":{"type":"string","description":"Redirect URL to Merchant's page/platform for customer to input OTP/PIN"},"partnerReferenceNo":{"type":"string","description":"Invoice Number from Partner"}}}}}}
```

### 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](/get-started-with-doku-api/notification.md).

### 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**

<table><thead><tr><th width="181">Environment</th><th>Endpoint</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Sandbox</td><td><a href="https://api-sandbox.doku.com">https://api-sandbox.doku.com</a></td></tr><tr><td>API Production</td><td><a href="https://api.doku.com">https://api.doku.com</a></td></tr><tr><td>Path</td><td><code>.../direct-debit/core/v1/debit/refund</code></td></tr></tbody></table>

**Sample of Request Header, Request Body and Response Body**

Notes:&#x20;

Parameter with (\*) is mandatory&#x20;

Parameter without (\*) is optional/conditional

## POST /direct-debit/core/v1/debit/refund

> Refund Payment

```json
{"openapi":"3.0.3","info":{"title":"Direct Debit Core System - Refund (EMONEY_DANA_SNAP)","version":"1.0.0"},"servers":[{"url":"https://api.doku.com","description":"Base URL"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"B2B access token obtained from the Get B2B Token API (`/authorization/v1/access-token/b2b`)"}},"schemas":{"RefundRequest":{"type":"object","description":"Request body for initiating a refund on the EMONEY_DANA_SNAP channel","required":["originalPartnerReferenceNo","partnerRefundNo","refundAmount","additionalInfo"],"properties":{"originalPartnerReferenceNo":{"type":"string","description":"Invoice number of the original payment transaction to be refunded.\nThis is the `partnerReferenceNo` (invoice) from the original payment request.\n","maxLength":64},"originalExternalId":{"type":"string","description":"The `X-EXTERNAL-ID` header value from the original payment request.\nUsed to precisely locate the original transaction.\n","maxLength":36},"partnerRefundNo":{"type":"string","description":"Merchant's unique reference number for this refund.\nMust be unique per `originalPartnerReferenceNo`. Used for idempotency and reconciliation.\n","maxLength":64},"reason":{"type":"string","description":"Human-readable reason for the refund","maxLength":256},"refundAmount":{"$ref":"#/components/schemas/AmountDto"},"additionalInfo":{"$ref":"#/components/schemas/AdditionalInfoDto"}}},"AmountDto":{"type":"object","description":"Transaction amount","required":["value","currency"],"properties":{"value":{"type":"string","description":"Amount in two-decimal format.\n- For a **full refund**, this must equal the original payment amount.\n- For a **partial refund**, this must be less than the original payment amount.\n  The cumulative total of all partial refunds must not exceed the original amount.\n","maxLength":19},"currency":{"type":"string","description":"ISO 4217 currency code. Must match the currency of the original payment.","maxLength":3}}},"AdditionalInfoDto":{"type":"object","required":["channel"],"properties":{"channel":{"type":"string","description":"value should be always EMONEY_DANA_SNAP"}}},"RefundResponse":{"type":"object","description":"Response body for a successful refund request","required":["responseCode","responseMessage","originalPartnerReferenceNo","originalReferenceNo","refundNo","partnerRefundNo","refundAmount","refundTime"],"properties":{"responseCode":{"type":"string","description":"Response code: HTTP Status (3) + Service Code `58` (2) + Case Code (2).\nExample: `2005800` = HTTP 200 + service `58` + case `00` (Successful).\n"},"responseMessage":{"type":"string","description":"Human-readable response message"},"originalPartnerReferenceNo":{"type":"string","description":"Invoice number of the original payment transaction, echoed from the original transaction"},"originalReferenceNo":{"type":"string","description":"DANA acquirer reference number from the original payment transaction.\nCan be used for reconciliation with DANA.\n"},"refundNo":{"type":"string","description":"Refund reference number assigned by the DANA acquirer.\nUse this for reconciliation and dispute resolution with DANA.\n"},"partnerRefundNo":{"type":"string","description":"Merchant's refund reference number, echoed from the request"},"refundAmount":{"$ref":"#/components/schemas/AmountDto"},"refundTime":{"type":"string","description":"Timestamp when the refund was completed, in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)"}}},"ErrorResponse":{"type":"object","description":"Standard error response body.\nResponse code format: HTTP Status (3) + Service Code `58` (2) + Case Code (2).\n\n| Case Code | Meaning                                       |\n|-----------|-----------------------------------------------|\n| `00`      | General Error / Duplicate External ID         |\n| `01`      | Transaction Not Found / Missing Mandatory Field |\n| `15`      | Transaction Not Permitted / Duplicate Refund No |\n","properties":{"responseCode":{"type":"string","description":"Error response code"},"responseMessage":{"type":"string","description":"Error message"}}}}},"paths":{"/direct-debit/core/v1/debit/refund":{"post":{"summary":"Refund Payment","operationId":"refundEmoneyDanaSnap","tags":["Refund"],"parameters":[{"name":"X-PARTNER-ID","in":"header","required":true,"description":"Merchant's client ID registered with DOKU","schema":{"type":"string","maxLength":36}},{"name":"X-EXTERNAL-ID","in":"header","required":true,"description":"Unique reference ID for this refund request (per-day uniqueness required).\nUsed for idempotency and tracing. Numeric string.\n","schema":{"type":"string","maxLength":32}},{"name":"Authorization","in":"header","required":true,"description":"B2B access token obtained from the Get B2B Token API","schema":{"type":"string"}},{"name":"X-TIMESTAMP","in":"header","required":true,"description":"Request timestamp in ISO 8601 format (yyyy-MM-ddTHH:mm:ss+07:00)","schema":{"type":"string"}},{"name":"X-SIGNATURE","in":"header","required":true,"description":"HMAC-SHA512 symmetric signature for request integrity verification","schema":{"type":"string"}},{"name":"Authorization-Customer","in":"header","required":false,"description":"Customer B2B2C token (`dokuB2b2cToken`) obtained during the DANA binding process.\nRequired if the original payment was made using a bound DANA token.\n","schema":{"type":"string"}},{"name":"X-IP-ADDRESS","in":"header","required":false,"description":"IP address of the end customer's device","schema":{"type":"string"}},{"name":"X-DEVICE-ID","in":"header","required":false,"description":"Device ID of the end customer's device","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Refund successfully processed by DANA.\nThe `refundNo` field contains the acquirer's refund reference number for reconciliation.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponse"}}}},"400":{"description":"Bad request — missing or invalid fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failure — invalid or expired B2B token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — refund amount exceeds the remaining refundable balance of the original transaction.\nThe cumulative refunded amount (including previous partial refunds) must not exceed\nthe original transaction amount.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found — the original transaction referenced by `originalPartnerReferenceNo` was not found or is not in a refundable state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict — duplicate `X-EXTERNAL-ID` within the same day, or `partnerRefundNo` already used for this invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error or DANA acquirer malfunction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.doku.com/accept-payments/direct-api/snap/integration-guide/e-wallet/dana.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
