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

amountobjectrequired

additionalInfoobjectoptional

Responses
curl -L \
  --request POST \
  --url 'https://{api-domain}/direct-debit/core/v1/debit/payment-host-to-host' \
  --header 'X-TIMESTAMP: 2020-12-21T07:56:11.000Z' \
  --header 'X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5' \
  --header 'X-PARTNER-ID: 821508239190' \
  --header 'X-EXTERNAL-ID: 418075533589' \
  --header 'X-DEVICE-ID: 95221' \
  --header 'Authorization: 95221' \
  --header 'Content-Type: application/json' \
  --data '{
    "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"
    }
  }'
{
  "responseCode": "2000500",
  "responseMessage": "Successful",
  "webRedirectUrl": "https://app-uat.doku.com/link/283702597342040",
  "partnerReferenceNo": "INV-0001"
}

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

Paramater without (*) is optional/conditional

Last updated

Was this helpful?