API Reference
DOKU DocsChangelogDOKU Github
  • Getting Started with DOKU API
    • User Registration
    • Idempotency Request
    • Notification
      • Setup Notification URL
      • HTTP Notification Sample for SNAP
      • HTTP Notification Sample - Non SNAP
      • Best Practice
      • Retry Notification
      • Override Notification URL
    • Signature Component
      • Non-SNAP
        • Signature Component from Request Header
        • Signature Componen from Response Header
        • Signature from API Get Method
        • Sample Code
      • SNAP
        • Symmetric Signature
        • Asymmetric Signature
    • Response Code
      • HTTP Status and Case Code
    • Check Status API
      • Non-SNAP
      • SNAP
    • Retrieve Payment Credential
  • Accept Payment
    • DOKU Checkout
      • Integration Guide
        • Backend Integration
        • Frontend Integration
        • Simulate payment and Notification
      • Supported Payment Methods
      • Status Order
      • Additional Feature
        • Tokenization
        • Promo on DOKU Checkout Page
        • Track Campaign Source on Google Analytics
      • Checkout Settings
    • Direct API
      • Non-SNAP
        • Cards
          • Payment Page Integration Guide
          • Host-To-Host Integration Guide
          • Mastercard Automatic Billing Updater (ABU) Integration Guide
            • Backend Integration
        • e-Wallet
          • Overview
          • DOKU e-Wallet
          • OVO Push Payment
          • ShopeePay
          • LinkAja
        • Paylater
          • Akulaku
          • Kredivo
          • Indodana
        • Digital Banking
          • Jenius Pay
        • Convenience Store
          • Alfa Group
          • Indomaret
      • SNAP
        • Integration Guide
          • Get Token API
            • B2B
            • B2B2C
          • Virtual Account
            • CIMB Virtual Account
            • BSI Virtual Account
            • BCA Virtual Account
            • BNC Virtual Account
            • BNI Virtual Account
            • Mandiri Virtual Account
            • BRI Virtual Account
            • BTN Virtual Account
            • Permata Virtual Account
            • Danamon Virtual Account
            • BSS Virtual Account
          • E-Wallet
            • DOKU Wallet
            • DANA
            • OVO
            • ShopeePay
          • Direct Debit
            • Allo Bank Direct Debit
            • BRI Direct Debit
            • CIMB Direct Debit
            • Mandiri Direct Debit
          • Kartu Kredit Indonesia Cepat Secure(KKI CPTS)
            • Host to Host Integration
          • QRIS
    • Finance and Settlement
      • Split Settlement
      • Custom Settlement Report
      • Hold and Release Settlement
      • Bulk Registration Bank
    • Test on DOKU Demo Site
    • DOKU Payment Simulator
  • Developer Kit
    • Postman Collection
    • Libraries and SDK
  • Wallet As A Service
    • Sub Account
  • Partnership
    • Partner API
      • Check Requirements API
      • Generate Token API
      • Upload File API
      • Business Registration API
      • Create Business Lite API
      • Get Business Data API
  • Payout
    • Kirim DOKU
  • FLEXIBILL
    • Account Billing
      • Batch Upload
    • DOKU Biller
      • Response Code
      • Samples
  • PAYCHAT API
    • Send WhatsApp Message
  • Archive
    • Non-SNAP
      • Tokenization V1
      • e-Wallet
        • OVO Recurring
        • OVO Open API
    • SNAP
      • Virtual Account
        • BCA v1.0
        • BRI v1.0
        • BNI v1.0
        • BNC v1.0
        • Mandiri v1.0
        • BTN v1.0
        • Permata v1.0
        • Danamon Virtual Account
      • e-Wallet
        • OVO Open API
        • DANA
        • ShopeePay
      • Direct Debit
        • CIMB Direct Debit
        • BRI Direct Debit
        • Allobank
Powered by GitBook

DOKU API

  • Legacy Documentation
On this page

Was this helpful?

  1. Accept Payment
  2. Direct API
  3. SNAP
  4. Integration Guide
  5. E-Wallet

DANA

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

PreviousDOKU WalletNextOVO

Last updated 6 months ago

Was this helpful?

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 Sandbox

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

2. Payment Notification

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 Sandbox

API Production

Path

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

Sample of Request Header, Request Body and Response Body

Notes:

Parameter with (*) is mandatory

Paramater without (*) is optional/conditional

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

handle the notification from DOKU
Payment
Payment Notification
Additional Feature
https://api-sandbox.doku.com
https://api.doku.com
https://api-sandbox.doku.com
https://api.doku.com

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

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
post
POST /direct-debit/core/v1/debit/payment-host-to-host HTTP/1.1
Host: {api-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization: 95221
Content-Type: application/json
Accept: */*
Content-Length: 331

{
  "partnerReferenceNo": "INV-0001",
  "validUpto": "2024-07-10T11:57:58+07:00",
  "pointOfInitiation": "app",
  "urlParam": {
    "url": "www.merchant.co.id",
    "type": "PAY_RETURN",
    "isDeepLink": "Y/N"
  },
  "amount": {
    "value": "10000.00",
    "currency": "IDR"
  },
  "additionalInfo": {
    "channel": "EMONEY_DANA_SNAP",
    "orderTitle": "Shoes",
    "supportDeepLinkCheckoutUrl": "false"
  }
}
200

Successful

{
  "responseCode": "2000500",
  "responseMessage": "Successful",
  "webRedirectUrl": "https://app-uat.doku.com/link/283702597342040",
  "partnerReferenceNo": "INV-0001"
}
  • Integration Steps
  • 1. Payment
  • POSTPayment
  • 2. Payment Notification
  • 3. Additional Feature
  • Online Refund
  • POSTRefund

Refund

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

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
originalPartnerReferenceNostringRequired

Partner Reference No from Purchase Transaction | max: 64 | Mandatory

Example: INV-0001
originalExternalIdstringOptional

External ID from Purchase Transaction | max: 64 |

Example: REQ-0001
reasonstringOptional

Reason for Refund | max: 255

Example: Request by Customer
partnerRefundNostringRequired

Partner Refund No from Partner | max: 64 | Mandatory

Example: INV-REF-0001
Responses
200
Successful
application/json
post
POST /direct-debit/core/v1/debit/refund HTTP/1.1
Host: {api-domain}
X-TIMESTAMP: 2020-12-21T07:56:11.000Z
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID: 821508239190
X-EXTERNAL-ID: 418075533589
X-DEVICE-ID: 95221
Authorization: 95221
Content-Type: application/json
Accept: */*
Content-Length: 238

{
  "additionalInfo": {
    "channel": "EMONEY_DANA_SNAP"
  },
  "originalPartnerReferenceNo": "INV-0001",
  "originalExternalId": "REQ-0001",
  "refundAmount": {
    "value": "10000.00",
    "currency": "IDR"
  },
  "reason": "Request by Customer",
  "partnerRefundNo": "INV-REF-0001"
}
200

Successful

{
  "responseCode": "2000700",
  "responseMessage": "Successful",
  "refundAmount": {
    "value": "10000.00",
    "currency": "IDR"
  },
  "refundTime": "2024-01-01T09:09:00.123"
}