NAV Navbar
php

First Step

Welcome to Duitku Disbursement API page. This API can only be used if the disbursement feature has been activated for your account.

Intro

Disbursement Inquiry

Inquiry process is used to get the information of the name of the account owner of the transfer destination. After getting this information, customers can determine whether the purpose of such a transfer is in accordance with the intended or not. If appropriate, the customer can proceed to the transfer process.

Disbursement Inquiry Request

Method : HTTP POST

Type : application/json

Dev : http://sandbox.duitku.com/webapi/api/disbursement/inquirysandbox

Production : https://passport.duitku.com/webapi/api/disbursement/inquiry

Request Parameters

<?php
    $userId = 'USERID_HERE'; 
    $amountTransfer = '10000'; 
    $bankAccount = '001001001';
    $bankCode = '014'; 
    $email = '[email protected]'; 
    $purpose = 'Test Disbursement with duitku';
    $timestamp = round(microtime(true) * 1000); 
    $key = '27f3f181fbe8a7e3f5ed0cc9031fe9bd'; 
    $senderId = '123456789'; 
    $senderName = 'John Doe'; 
    $paramSignature = $email . $timestamp . $bankCode . $bankAccount . $amountTransfer . $purpose . $key; 

    $signature = hash('sha256', $paramSignature);

    $params = array(
        'userId' => $userId,
        'amountTransfer' => $amountTransfer,
        'bankAccount' => $bankAccount,
        'bankCode' => $bankCode,
        'email' => $email,
        'purpose' => $purpose,
        'timestamp' => $timestamp,
        'senderId' => $senderId,
        'senderName' => $senderName,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/disbursement/inquirysandbox'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/disbursement/inquiry'; // Production
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);                                                                  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($params_string))                                                                       
    );   
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    //execute post
    $request = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if($httpCode == 200)
    {
        $result = json_decode($request, true);
        header('location: '. $result['paymentUrl']);
        echo "email :". $result['email'] . "<br />";
        echo "bankCode :". $result['bankCode'] . "<br />";
        echo "bankAccount :". $result['bankAccount'] . "<br />";
        echo "amountTransfer :". $result['amountTransfer'] . "<br />";
        echo "accountName :". $result['accountName'] . "<br />";
        echo "custRefNumber :". $result['custRefNumber'] . "<br />";
        echo "disburseId :". $result['disburseId'] . "<br />";
        echo "responseCode :". $result['responseCode'] . "<br />";
        echo "responseDesc :". $result['responseDesc'] . "<br />";
    }
    else
        echo $httpCode;
?>

Example Output from code above

{
  "email": "sample string 1"
  "reference": "sample string 2"
  "bankCode": "sample string 3"
  "bankAccount": "sample string 4"
  "amountTransfer": "sample string 5"
  "custRefNumber": "sample string 6"
  "disburseId": "sample string 7"
  "responseCode": "sample string 8"
  "responseDesc": "sample string 9"
}
Parameter Type Required Description Example
userId int Y Merchant Id, provided by Duitku 200
amountTransfer integer Y Disbursement transfer amount (No decimal code and no decimal digit) 10000
bankAccount string(255) Y Destination account number 001001001
bankCode string(3) Y Destination Bank Code 014 (contoh untuk BCA)
email string{255} Y Email registered on Duitku [email protected]
purpose string(255) N Description of transfer purpose
timestamp double Y Unix Timestamp in miliseconds 1506486841000
senderId int Y Id provided by Partner 123456789
senderName string(255) Y Your customers
signature string(255) Y Data signature create by Sender system to identify that the message is valid Formula: SHA256(email + timestamp + bankCode + bankAccount + amountTransfer + purpose + secretKey)

Disbursement Transfer

Message transfer format is used to make the transfer process from the customer account to the account with the purpose of using data from the customer with the data obtained from the inquiry process which have been made previously.

Disbursement Transfer Request

Method : HTTP POST

Type : application/json

Dev : https://sandbox.duitku.com/webapi/api/disbursement/transfersandbox

Production : https://passport.duitku.com/webapi/api/disbursement/transfer

Parameters

<?php
    $disburseId = 'XXXXX'; 
    $secretKey = 'XXXXX'; 
    $userId = '10000'; 
    $email = '[email protected]';
    $bankCode = '014'; 
    $bankAccount = '001001001'; 
    $amountTransfer = 'Test Disbursement with duitku';
    $accountName = 'Merchant name'; 
    $custRefNumber = 'XXXXXX'; 
    $purpose = 'Test disbursement Duitku'; 
    $timestamp = round(microtime(true) * 1000); 
    $paramSignature = $email . $timestamp . $bankCode . $bankAccount . $accountName . $custRefNumber . $amountTransfer . $purpose . $disburseId . $secretKey; 

    $signature = hash('sha256', $paramSignature);

    $params = array(
        'disburseId' => $disburseId,
    'userId' => $userId,
    'email' => $email,
    'bankCode' => $bankCode,        
    'bankAccount' => $bankAccount,      
        'amountTransfer' => $amountTransfer,
        'accountName' => $accountName,
        'custRefNumber' => $custRefNumber,
        'purpose' => $purpose,
        'timestamp' => $timestamp,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/disbursement/transfersandbox'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/disbursement/transfer'; // Production
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);                                                                  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($params_string))                                                                       
    );   
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    //execute post
    $request = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if($httpCode == 200)
    {
        $result = json_decode($request, true);
        header('location: '. $result['paymentUrl']);
        echo "email :". $result['email'] . "<br />";
        echo "bankCode :". $result['bankCode'] . "<br />";
        echo "bankAccount :". $result['bankAccount'] . "<br />";
        echo "amountTransfer :". $result['amountTransfer'] . "<br />";
        echo "accountName :". $result['accountName'] . "<br />";
        echo "custRefNumber :". $result['custRefNumber'] . "<br />";
        echo "responseCode :". $result['responseCode'] . "<br />";
        echo "responseDesc :". $result['responseDesc'] . "<br />";
    }
    else
        echo $httpCode;
?>

Example Output from code above

{
  "email": "sample string 1",
  "bankCode": "sample string 2",
  "bankAccount": "sample string 1",
  "amountTransfer": "sample string 2",
  "accountName": "sample string 1",
  "custRefNumber: "sample string 2",
  "responseCode": "sample string 2",
  "responseDesc": "sample string 3"
}
Parameter Type Required Description Example
disburseId string(255) Y The value is the same as Inquiry Response XXXXX
userId int Y The value is the same as Inquiry Request 200
email string(255) Y The value is the same as Inquiry Request [email protected]
bankCode string(3) Y The value is the same as Inquiry Request 014 (contoh untuk BCA)
bankAccount string(255) Y The value is the same as Inquiry Request 001001001
amountTransfer int Y The value is the same as Inquiry Request [email protected]
accountName string(255) Y Bank Account owner, response from inquiry process John Doe
custRefNumber string(255) Y Customer reference number, response from inquiry process XXXXXXXX
purpose string(255) Y The value is the same as Inquiry Request 123456789
timestamp double Y Unix Timestamp in miliseconds 1507024378000
signature string(255) Y Data signature create by Sender system to identify that the message is valid Formula: SHA256(email + timestamp + bankCode + bankAccount + accountName + custRefNumber + amountTransfer + purpose + disburseId + secretKey)

Inquiry Status

Inquiry Status message format is used to perform queries on the status of a transfer transaction that has been sent previously.

Inquiry Status Request

Method : HTTP POST

Type : application/json

Production : https://passport.duitku.com/webapi/api/disbursement/inquirystatus

Parameters

<?php
    $disburseId = 'XXXXX'; 
    $secretKey = 'XXXXX'; 
    $userId = '10000'; 
    $email = '[email protected]';
    $timestamp = round(microtime(true) * 1000); 
    $paramSignature = $email . $timestamp . $disburseId . $secretKey; 

    $signature = hash('sha256', $paramSignature);

    $params = array(
        'disburseId' => $disburseId,
    'userId' => $userId,
    'email' => $email,
    'timestamp' => $timestamp,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/disbursement/inquirystatus'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/disbursement/inquirystatus'; // Production
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);                                                                  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($params_string))                                                                       
    );   
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    //execute post
    $request = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if($httpCode == 200)
    {
        $result = json_decode($request, true);
        header('location: '. $result['paymentUrl']);
        echo "email :". $result['email'] . "<br />";
        echo "bankCode :". $result['bankCode'] . "<br />";
        echo "bankAccount :". $result['bankAccount'] . "<br />";
        echo "amountTransfer :". $result['amountTransfer'] . "<br />";
        echo "accountName :". $result['accountName'] . "<br />";
        echo "custRefNumber :". $result['custRefNumber'] . "<br />";
        echo "responseCode :". $result['responseCode'] . "<br />";
        echo "responseDesc :". $result['responseDesc'] . "<br />";
    }
    else
        echo $httpCode;
?>

Example Output from code above

{
  "email": "sample string 1",
  "bankCode": "sample string 2",
  "bankAccount": "sample string 1",
  "amountTransfer": "sample string 2",
  "accountName": "sample string 1",
  "custRefNumber: "sample string 2",
  "responseCode": "sample string 2",
  "responseDesc": "sample string 3"
}
Parameter Type Required Description Example
disburseId string(255) Y Disbursement ID from Duitku, please save it for checking purpose XXXXX
userId int Y User ID Provided by Duitku 200
email string(255) Y Email registered on Duitku. [email protected]
timestamp double Y Unix Timestamp in miliseconds 1507024378000
signature string(255) Y Data signature create by Sender system to identify that the message is valid Formula: SHA256(email + timestamp + disburseId + secretKey)

Inquiry Check Balance

Check balance is used for checking balance available for disbursement.

Inquiry Check Balance Request

Method : HTTP POST

Type : application/json

Dev : https://sandbox.duitku.com/webapi/api/disbursement/checkbalance

Production : https://passport.duitku.com/webapi/api/disbursement/checkbalance

Parameters

<?php
    $secretKey = 'XXXXX'; 
    $userId = '10000'; 
    $email = '[email protected]';
    $timestamp = round(microtime(true) * 1000); 
    $paramSignature = $email . $timestamp . $secretKey; 

    $signature = hash('sha256', $paramSignature);

    $params = array(
        'userId' => $userId,
    'email' => $email,
    'timestamp' => $timestamp,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/disbursement/checkbalance'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/disbursement/checkbalance'; // Production
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);                                                                  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($params_string))                                                                       
    );   
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    //execute post
    $request = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if($httpCode == 200)
    {
        $result = json_decode($request, true);
        echo "userId :". $result['userId'] . "<br />";
    echo "email :". $result['email'] . "<br />";
        echo "balance :". $result['balance'] . "<br />";
        echo "effectiveBalance :". $result['effectiveBalance'] . "<br />";
        echo "responseCode :". $result['responseCode'] . "<br />";
        echo "responseDesc :". $result['responseDesc'] . "<br />";
    }
    else
        echo $httpCode;
?>

Example Output from code above

{
  "userId": "sample string 1",
  "email": "sample string 2",
  "balance": "sample string 1",
  "effectiveBalance: "sample string 2",
  "responseCode": "sample string 2",
  "responseDesc": "sample string 3"
}
Parameter Type Required Description Example
userId int Y User ID Provided by Duitku. 200
email string(255) Y Email registered on Duitku. [email protected]
timestamp double Y Unix Timestamp in miliseconds for checking purpose. 1507024378000
signature string(255) Y Data signature create by Sender system to identify that the message is valid Formula: SHA256(email + timestamp + secretKey)

Inquiry List Bank

Take a list of banks with API.

Inquiry List Bank Request

Method : HTTP POST

Type : application/json

Dev : https://sandbox.duitku.com/webapi/api/disbursement/listBank

Production : https://passport.duitku.com/webapi/api/disbursement/listBank

Parameters

<?php
    $secretKey = 'XXXXX'; 
    $userId = '10000'; 
    $email = '[email protected]';
    $timestamp = round(microtime(true) * 1000); 
    $paramSignature = $email . $timestamp . $secretKey; 

    $signature = hash('sha256', $paramSignature);

    $params = array(
        'userId' => $userId,
    'email' => $email,
    'timestamp' => $timestamp,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/disbursement/listBank'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/disbursement/listBank'; // Production
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params_string);                                                                  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($params_string))                                                                       
    );   
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    //execute post
    $request = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if($httpCode == 200)
    {
        header('Content-Type: application/json');
        $return = json_encode(json_decode($request), JSON_PRETTY_PRINT);
        echo $return;
    }
    else
        echo $httpCode;
?>

Example Output from code above

{
  "responseCode": "sample string 1",
  "responseDesc": "sample string 2",
  "Banks": [ {
    "bankCode": "sample string 3",
    "bankName": "sample string 4",
   } ]
}
Parameter Type Required Description Example
userId int Y User ID Provided by Duitku. 200
email string(255) Y Email registered on Duitku. [email protected]
timestamp double Y Unix Timestamp in miliseconds for checking purpose. 1507024378000
signature string(255) Y Data signature create by Sender system to identify that the message is valid Formula: SHA256(email + timestamp + secretKey)

Status Code

ResponseCode Description
00 Approved or completed successfully
EE General Error
TO Response time out from ATM Bersama Network (Do not retry)
LD Link problem between Duitku and ATM Bersama Network
NF Transaction has not recorded on Remittance gateway
76 Invalid destination account
-120 User id not found / not allowed to use this API
-141 Invalid Amount
-213 Wrong email address
-960 Timestamp is expired ( 5 minutes )
-191 Wrong signature
-149 Bank not found
-510 Insufficient Fund
-100 Other Error (Do not retry)

Error Code

ResponseCode Description
00 Approved or completed successfully
01 Refer to card issuer
03 Invalid merchant
04 Pick-up / capture card
05 Do not honor
12 Invalid transaction
13 Invalid amount
14 Invalid card number (no such number)
15 No such issuer
20 Invalid response
30 Format error
31 Bank not supported by switch
33 Expired card
36 Restricted card
38 Allowable PIN tries exceeded
39 No credit account
40 Requested function not supported
41 Lost card
43 Stolen card
51 Insufficient funds / over credit limit
52 No chequing account
68 Response received too late. / Time out When getting this response you need to wait for bank confirmation. (Jangan diulang)
91 Issuer, Destination or switch is inoperative

Testing

Here is a list of dummy disbursement credentials that can be used for transaction in the Sandbox Environment

Merchant Test Disbursement

User Test

UserID Email Key
3551 [email protected] de56f832487bc1ce1de5ff2cfacf8d9486c61da69df6fd61d5537b6b7d6d354d

Skenario Test Disbursement

Here is a list of parameters BankAccount which must be set on the disbursement inquiry and disbursement transfer parameters in the Sandbox Environment

Disbursement Inquiry Test

Parameter Response
BankAccount Response Code
------- -------
8760673566 00
8760673511 TO
8760673512 -100
8760673513 LD
8760673514 91
8760673515 89

Disbursement Transfer Test

If merchant get response code like TO, 68, -100 it means there is a problem in the transfer process, it is not recommended to do this process a second time

Parameter Response
BankAccount Response Code
------- -------
8760673566 00
8760673559 LD
8760673560 91
8760673561 TO
8760673562 -510
8760673563 89
8760673564 68
8760673565 -100

Skenario Disbursement Clearing

Berikut adalah daftar parameter BankAccount yang harus di set pada parameter disbursement Clearing inquiry dan disbursement Clearing transfer di Sandbox Environtment

Clearing Inquiry Test

Parameter Response
BankAccount Response Code
------- -------
8760673466 00
8760673411 EE
8760673412 TO
8760673413 LD
8760673414 NF
8760673415 -100
8760673416 66
8760673417 68
8760673418 88
8760673419 90
8760673420 91

Clearing Transfer Test

Parameter Response
BankAccount Response Code
------- -------
8760673466 00
8760673451 LD
8760673452 NF
8760673453 TO
8760673454 -510
8760673455 90
8760673456 68
8760673457 91

Daftar Bank

List of supported banks in disbursement:

Supported Banks

Bank Code Bank Name
002 Bank BRI
008 Bank Mandiri
009 Bank BNI
011 Bank Danamon
013 Bank Permata
014 Bank Central Asia
016 Bank Maybank Indonesia
019 Bank Panin
022 CIMB Niaga
023 Bank UOB Indonesia
028 Bank OCBC NISP
031 Citi Bank
036 Bank CCB (Ex-Bank Windu Kentjana)
037 Bank Artha Graha
042 MUFG Bank
046 Bank DBS
050 Standard Chartered Bank
054 Bank Capital
061 ANZ Indonesia
069 Bank Of China
076 Bank Bumi Arta
087 Bank HSBC Indonesia
089 BANK RABOBANK
095 Bank JTrust Indonesia
097 Bank Mayapada
110 Bank BJB
111 Bank DKI
112 Bank BPD DIY
113 Bank Jateng
114 Bank Jatim
115 Bank Jambi
116 Bank Aceh
117 Bank Sumut
118 Bank Nagari
119 Bank Riau Kepri
120 Bank Sumsel Babel
121 Bank Lampung
122 Bank Kalsel
123 Bank Kalbar
124 Bank Kaltimtara
125 Bank Kalteng
126 Bank Sulselbar
127 Bank Sulut Go
128 Bank NTB Syariah
129 Bank BPD Bali
130 Bank NTT
131 Bank Maluku Malut
132 Bank Papua
133 Bank Bengkulu
134 Bank Sulteng
135 Bank Sultra
137 Bank Banten
146 Bank Of India Indonesia
147 Bank Muamalat Indonesia
151 Bank Mestika
152 Bank Shinhan Indonesia
153 BANK SINARMAS
157 Bank Maspion Indonesia
161 Bank Ganesha
164 Bank ICBC Indonesia
167 Bank QNB Indonesia
200 Bank BTN
212 Bank Woori Saudara
213 Bank BTPN
405 Bank Victoria Syariah
422 Bank BRI Syariah
425 Bank BJB Syariah
426 Bank Mega
427 Bank BNI Syariah
441 Bank Bukopin
451 Bank Syariah Mandiri
472 Bank Jasa Jakarta
484 Bank KEB Hana
485 MNC Bank
490 Bank Neo Commerce
494 Bank BRI Agroniaga
498 Bank SBI
501 Bank Digital BCA (Ex-Bank Royal)
503 Bank Nobu
506 Bank Mega Syariah
513 Bank Ina Perdana
517 Bank Panin Dubai Syariah
520 Bank Prima Master
521 Bank Syariah Bukopin
523 BANK SAHABAT SAMPOERNA
526 BANK DINAR INDONESIA
535 BANK KESEJAHTERAAN EKONOMI
536 BANK BCA SYARIAH
542 BANK ARTOS INDONESIA
547 BANK BTPN SYARIAH
548 BANK MULTIARTA SENTOSA
553 BANK MAYORA
555 BANK INDEX SELINDO
564 BANK SINAR HARAPAN BALI (BANK MANTAB)
566 BANK VICTORIA INTERNATIONAL
567 BANK HARDA INTERNASIONAL
600 BPR/LSB
688 BPR KS
699 BPR EKA
789 INDOSAT (DOMPETKU)
911 TELKOMSEL (TCASH)
945 BANK AGRIS
949 BANK CHINATRUST INDONESIA
950 BANK COMMONWEALTH

Changelog

The latest API document version is: v1.1

Version 1.1

Nov 2018

Version 1.0

php