DOKU Biller

This documentation provides a comprehensive guide to understanding and using the DOKU Biller REST API. For the needs of data exchange, the format message used is based on JSON (JavaScript Object Notation). So it will facilitate the process of exchanging data between systems that already exist in the PT. Nusa Satu Inti Artha (DOKU) with a system developed by the partners.

To interact with the API, you need an API key. You can obtain your API key from the API settings page. If this is your first time using the API, we recommend starting with the Getting Started Guide to learn how to generate an API key and set up your environment.

Overview

General flow

Note:

  1. Transactions originate from DOKU's merchant front-end application and are forwarded to DOKU Biller server. For server integration, DOKU must register the partner's IP address in the whitelist table.

  2. DOKU Biller main server verifies the balance using the client id and processes the request to the biller.

  3. The biller server processes the request based on "ID Pelanggan" and returns a response to DOKU Biller Server.

We offer two transaction flow methods: synchronous and asynchronous . Below are the differences between these flows.

Synchronous

Flow sequence diagram: Synchronous

The image shows a sequence diagram illustrating the synchronous flow between a Partner and DOKU system. The flow consists of three main steps:

  1. Inquiry Process: Partner sends an inquiry request to DOKU and receives an inquiry response

  2. Payment Process: Partner sends a payment request to DOKU and receives a payment response, in this case the partner receives the final transaction status.

  3. Optional Advice Process: Partner can optionally send an advice request to DOKU and receive an advice response

The diagram uses dotted lines to show responses coming back from DOKU to the Partner, and solid lines to show requests going from Partner to DOKU.

Asynchronous

Flow sequence diagram: Synchronous

The image shows a sequence diagram illustrating an asynchronous flow between a Partner and DOKU system. The flow consists of three main steps:

  1. Inquiry Process: Partner sends an inquiry request and receives a response from DOKU

  2. Payment Process: Partner sends a payment request and receives a payment response from DOKU

  3. Callback Request: DOKU sends a callback request back to the Partner

The diagram uses solid lines to show requests from Partner to DOKU, and dotted lines to show responses from DOKU back to Partner, clearly depicting the asynchronous nature of the communication.

For payment responses with response code 5586, the partner system needs to either hit the advice module to get the final status or wait for a callback. Below is a sample response for the pending status.

{
    "transactionid": 58021,
    "responsecode": "5586",
    "responsemessage": "Transaction in progress (Pending), hit advice to get final status transaction.",
    "systrace": 5787,
    "transactiondate": "2022-06-16 15:04:31",
    "partnerdata": ""
}


API Details

User objects represent users within the API. These objects are used in various API responses to provide details about the user involved in different actions.

Inquiry

Inquiry will be used for

  • checking user bills for specific products such as PDAM, PLN, TELKOM, etc. or

  • to check availablility denom for specific biller such as

Request

No
Name
Type
Length
Required
Description

1

MALLID

N

10

Code to determine partner.

2

BILLERID

N

7

Code to determine product.

4

ACCOUNTNUMBER

AN

20

similar with "ID Pelanggan", "Phone number", "No Tagihan", etc.

5

SYSTRACE

N

7

Unique number in one day generated by partner.

6

WORDS

AN

255

Security combination for verification: SHA1(MALLID + SYSTRACE + Sharedkey + ACCOUNTNUMBER)

7

ADDITIONALDATA1

N

255

default value is 5000

8

ADDITIONALDATA2

N

255

9

ADDITIONALDATA3

N

255

Conditional for each biller: - PLN Prepaid (Mandatory): Fill with denom. i.e: 50000, 100000, etc. - Others (Optional) : Leave it blank.

10

PARTNERDATA

ANS

255

Will return with the same value to partner in response

Response 1

The response below is the response format for the types of billers that have bills. i.e: PLN POSTPAID, TELKOM, PDAM, MULTIFINANCE, etc.

{
    "billername": "BILLER NAME", -- Alpha Numeric
    "subscriberid": "CustomerID", -- Alpha Numeric
    "subscribername": "Customer Name", -- Alpha Numeric
    "paymenttype": "CLOSE/OPEN PAYMENT", -- Alpha Numeric
    "responsecode": "0000", -- Alpha Numeric
    "responsemessage": "RESPONSE MESSAGE", -- Alpha Numeric
    "systrace": "Systrace number", -- Numeric
    "inquiryid": "INQUIRY ID", –- Numeric
    "partnerdata": "",
    "transactiondate": "",
    "billerdetails":"",
    {
        "billdetails":
        {
            "billid": "1",
            "adminfee": "Admin fee",  -- Numeric
            "amount": "Billing amount",  -- Numeric
            "totalamount": "billing amount + admin fee"  -- Numeric
        }
        "display":
        {
            {
                "name":"FIELD NAME 1...n",
                "value":"VALUE of FIELD NAME 1..n"
            }
                [data array, different data for each biller]
            }
        },
}

Response 2

The response below is the response format for the types of billers that doesn't have bills, and have denomination. i.e: TELCO RELOAD (PULSA), DATA PACKAGE, TOP UP GAME, TOP UP E-MONEY, etc.

{
    "billername": "BILLER NAME", -- Alpha Numeric
    "subscriberid": "CustomerID", -- Alpha Numeric
    "subscribername": "Customer Name", -- Alpha Numeric
    "paymenttype": "CLOSE/OPEN PAYMENT", -- Alpha Numeric
    "responsecode": "0000", -- Alpha Numeric
    "responsemessage": "RESPONSE MESSAGE", -- Alpha Numeric
    "systrace": "Systrace number", -- Numeric
    "inquiryid": "INQUIRY ID", –- Numeric
    "partnerdata": "",
    "transactiondate": "",
    "billerdetails":"",
    {
        "billdetails":
        {
            {
                "billid": "1",
                "denom": "5000",  -- Alpha Numeric
                "price": "Billing amount",  -- Numeric
                "remarks": "remarks for denom ie, active period, credit balance. etc.",  -- Note
            }
            {
                "billid": "2...n",
                "denom": "10000",  -- Alpha Numeric
                "price": "Billing amount",  -- Numeric
                "remarks": "remarks for denom ie, active period, credit balance. etc.",  -- Note
            }
                [data array]
          }
       }
}

Payment

Payment request is used for make a purchase or billing payment.

Request

No
Name
Type
Length
Required
Description

1

MALLID

N

10

Code to determine partner.

2

BILLERID

N

7

Code to determine product.

3

ACCOUNTNUMBER

AN

20

similar with "ID Pelanggan", "Phone number", "No Tagihan", etc.

4

SYSTRACE

N

7

Unique number in one day generated by partner.

5

WORDS

AN

255

Security combination for verification: SHA1(MALLID + SYSTRACE + Sharedkey + ACCOUNTNUMBER)

6

ADDITIONALDATA1

N

255

Value = 5000

7

ADDITIONALDATA2

N

255

8

ADDITIONALDATA3

N

255

Conditional for each biller: - PLN Prepaid (Mandatory): Fill with denom. i.e: 50000, 100000, etc. - Others (Optional) : Leave it blank.

9

PARTNERDATA

ANS

255

Will return with the same value to partner in response

10

BILLID

N

The selected billid that customer wants to pay

11

AMOUNT

N

Total amount from inquiry response.

12

INQUIRYID

N

The id from inquiry response.

Response 1

The response below is the response format for the types of billers that have bills. i.e: PLN POSTPAID, TELKOM, PDAM, MULTIFINANCE, etc.

{
    "billername": "BILLER NAME", -- Alpha Numeric
    "referencenumber": "Reference number from biller", -- Alpha Numeric
    "transactionid": "ID transaction from DOKU", -- Alpha Numeric
    "subscriberid": "CustomerID", -- Alpha Numeric
    "subscribername": "Customer Name", -- Alpha Numeric
    "paymenttype": "CLOSE/OPEN PAYMENT", -- Alpha Numeric
    "responsecode": "0000", -- Alpha Numeric
    "responsemessage": "RESPONSE MESSAGE", -- Alpha Numeric
    "systrace": "Systrace number", -- Numeric
    "transactiondate": "transaction date time", -- Numeric
    "partnerdata": "",
    "billerdetails":"",
    {
        "billdetails":
        {
            "billid": "1",
            "adminfee": "Admin fee",  -- Numeric
            "amount": "Billing amount",  -- Numeric
            "totalamount": "billing amount + admin fee"  -- Numeric
        }
        "display":
        {
            {
                "name":"FIELD NAME 1...n",
                "value":"VALUE of FIELD NAME 1..n"
            }
            [data array, different data for each biller]
        }
     },
}

Response 2

The response below is the response format for the types of billers that doesn't have bills, and have denomination. i.e: TELCO RELOAD (PULSA), DATA PACKAGE, TOP UP GAME, TOP UP E-MONEY, etc.

{
    "billername": "BILLER NAME", -- Alpha Numeric
    "referencenumber": "Reference number from biller", -- Alpha Numeric
    "transactionid": "ID transaction from DOKU", -- Alpha Numeric
    "subscriberid": "CustomerID", -- Alpha Numeric
    "subscribername": "Customer Name", -- Alpha Numeric
    "paymenttype": "CLOSE/OPEN PAYMENT", -- Alpha Numeric
    "responsecode": "0000", -- Alpha Numeric
    "responsemessage": "RESPONSE MESSAGE", -- Alpha Numeric
    "systrace": "Systrace number", -- Numeric
    "transactiondate": "transaction date time", -- Numeric
    "partnerdata": "",
    "billerdetails":"",
    {
        "billdetails":
        {
            "billid": "1",
            "price": "the price of selected denom."  -- Numeric
            "code": "the code."  -- Alpha Numeric
        }
        "display":
        {
            {
                "name":"FIELD NAME 1...n",
                "value":"VALUE of FIELD NAME 1..n"
            }
            [data array, different data for each biller]
         }
     },
}

Advice

The Advice function is used to verify the status of a transaction. Its request and response formats are similar to those of a payment transaction.

Callback

The callback request sent to the partner's endpoint follows the same format as a payment response.

Last updated

Was this helpful?