DOKU e-Wallet

Doku e-Wallet API Guide Explanation

Integration steps

Here is the overview of how to integrate with DOKU e-Wallet:

  1. Obtain payment.url by generating order

  2. Display DOKU Wallet payment page to customer

  3. Acknowledge payment result

Direct API - DOKU e-Wallet Sequence Diagram


1. Obtain payment.url by generating order

To generate order, you will need to hit this API through your Backend:

API Request

Here is the sample of request header to generate order:

Client-Id: MCH-0001-10791114622547
Request-Id: baec7d95-f30a-4b78-b711-6ebe0ccdf50b
Request-Timestamp: 2021-07-07T08:45:42Z
Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=

Request Header Explanation

Here is the sample request body to generate order:

{
    "order": {
        "invoice_number":"TEST-1234",
        "amount": 9000,
        "line_items": [
            {
                "name": "T-Shirt Red",
                "price": 3000,
                "quantity": 2
            },
            {
                "name": "Polo Navy",
                "price": 3000,
                "quantity": 1
            }
        ],
        "success_url": "https://your-success-url.domain/",
        "failed_url": "https://your-failed-url.domain/",
        "notify_url": "https://merchant.com/notify-url",
        "auto_redirect": false
    }
}

Request Body Explanation

API Response

After hitting the above API request, DOKU will give the response.

Client-Id: MCH-0001-10791114622547
Request-Id: baec7d95-f30a-4b78-b711-6ebe0ccdf50b
Response-Timestamp: 2021-07-07T08:45:42Z
Signature: HMACSHA256=9UPUFzOqJc47aJzD9ESOTcWg6TMsg3mqSP+DnUO8ENE=

Response Header Explanation

Here is the sample of response body:

{
    "order": {
        "invoice_number": "JT-JOKUL-PP_20220125093936",
        "line_items": [
            {
                "name": "T-Shirt Red",
                "price": 3000,
                "quantity": 2
            },
            {
                "name": "Polo Navy",
                "price": 3000,
                "quantity": 1
            }
        ]
    },
    "doku_wallet_payment_page": {
        "url": "https://staging.doku.com/wallauth/jokultransaction?sessionId=ff54640d-8a3d-4efb-a867-47785971c7c9"
    }
}

Response Body Explanation


2. Display DOKU Wallet payment page to customer

Once you have the payment.url, you can now display the payment page by redirecting your customer to the DOKU Wallet payment page.

After the customer completed the payment, they will be redirected to the defined success_url that you set on the API request.


3. Acknowledge payment result

After the payment is being made by your customer, DOKU will send HTTP Notification to your defined Notification URL. Learn how to handle the notification from DOKU:


Last updated