NAV Navbar
php shell

Introduction

Welcome to the Duitku API documentation page. Integrate this API to start transacting using Duitku on your site. Duitku API is a third-party API that is useful as a payment gateway system. The Duitku API helps you in accepting online payments from your customers. With just one Duitku API you can accept payments from a variety of available payment methods.

Integration flowchart

To connect with the Duitku API, there are things you need to know.

Merchant Code

The merchant code is the project code obtained from the Duitku merchant page. This code is useful as an identifier of your project in each transaction later. You can get this code on every project you register on the merchant portal. You can see the steps or how to make the project here.

API Key

API stands for Application Programming Interface. The API key here is the authentication code to be able to access the Duitku API. The API key is used to prevent malicious users. Like the merchant code, you can get the API key on every project that you register on the merchant portal along with the merchant code.

Postman Collection

If you are familiar with postman, we also provide a postman collection that can help you understand how the Duitku API interacts.

Run in Postman

Library

You can use Duitku Library for integration and to start transaction using Duitku on your web or application. For further step you may see Duitku Library on the package repository at each library. Click the link below.

Get Payment Method

This process is used to get an active payment method from the merchant(your) project. This API contains the name of the payment method, the fee, and the URL to the image of the payment method. You can use it as a payment channel list on your project and you will get a paymentMethod that will be used for processing transaction request. In this process, you can skip it to the transaction request.

Request HTTP

Method : HTTP POST

Type : application/json

Development : https://sandbox.duitku.com/webapi/api/merchant/paymentmethod/getpaymentmethod

Production : https://passport.duitku.com/webapi/api/merchant/paymentmethod/getpaymentmethod

Request Parameter

curl -X POST https://sandbox.duitku.com/webapi/api/merchant/paymentmethod/getpaymentmethod
     -H "Content-Type: application/json" 
     -d "{\"merchantcode\": \"DXXXX\",
  \"amount\": \"10000\",
  \"datetime\": \"2022-01-25 16:23:08\",
  \"signature\": \"497fbf783f6d17d4b1e1ef468917bdc8\"}"

<?php
    // Set your merchant code 
    $merchantCode = "DXXXX"; 
    // Set your api key
    $apiKey = "DXXXXCX80TZJ85Q70QCI";
    // Note: sandbox and passport environment is defferent 

    $datetime = date('Y-m-d H:i:s');  
    $paymentAmount = 10000;
    $signature = hash('sha256',$merchantCode . $paymentAmount . $datetime . $apiKey);

    $params = array(
        'merchantcode' => $merchantCode,
        'amount' => $paymentAmount,
        'datetime' => $datetime,
        'signature' => $signature
    );

    $params_string = json_encode($params);

    $url = 'https://sandbox.duitku.com/webapi/api/merchant/paymentmethod/getpaymentmethod'; 

    $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)
    {
        $results = json_decode($request, true);
        print_r($results, false);
    }
    else{
        $request = json_decode($request);
        $error_message = "Server Error " . $httpCode ." ". $request->Message;
        echo $error_message;
    }
?>
Name Type Required Description Example
merchantcode string(50)

Merchant code from Duitku DXXXX
amount integer

Transaction amount. No decimal code (.) and no decimal digit. 10000
datetime datetime

Format: yyyy-MM-dd HH:mm:ss 2022-01-25 16:23:08
signature string(255)

Formula: Sha256(merchantcode + paymentAmount + datetime + apiKey) 497fbf783f6d17d4b1e1ef468917bdc8

Response Parameter

Type : application/json

{
    "paymentFee": [        
        {
            "paymentMethod": "VA",
            "paymentName": "MAYBANK VA",
            "paymentImage": "https://images.duitku.com/hotlink-ok/VA.PNG",
            "totalFee": "0"
        },
        {
            "paymentMethod": "BT",
            "paymentName": "PERMATA VA",
            "paymentImage": "https://images.duitku.com/hotlink-ok/PERMATA.PNG",
            "totalFee": "0"
        },
    ],
    "responseCode": "00",
    "responseMessage": "SUCCESS"
}

Name Type Description
paymentFee paymentFee List payment channel.
responseCode string Response code.
responseMessage string Response message.

Request Transaction

These are the main steps in the transaction process, starting with making a transaction request to the Duitku system. This process will be intended for making payments (via virtual account numbers, QRIS, e-wallet, etc.). You can create a payment page that is useful for directing customers on how to pay their bills to you. Please make a transaction request by making an HTTP request as follows. If you passed the get payment method, you can fill in the paymentMethod with the payment method reference.

HTTP Request

Method : HTTP POST

Type : application/json

Development : https://sandbox.duitku.com/webapi/api/merchant/v2/inquiry

Production : https://passport.duitku.com/webapi/api/merchant/v2/inquiry

Request Parameters

<?php
    $merchantCode = 'DXXXXX'; // from duitku
    $apiKey = 'XXXXXXXXXX7968XXXXXXXXXFB05332AF'; // from duitku
    $paymentAmount = 40000;
    $paymentMethod = 'VC'; // VC = Credit Card
    $merchantOrderId = time() . ''; // from merchant, unique
    $productDetails = 'Payment example for example merchant';
    $email = '[email protected]'; // Customer's email
    $phoneNumber = '08123456789'; // Customer's phone(optional)
    $additionalParam = ''; // optional
    $merchantUserInfo = ''; // optional
    $customerVaName = 'John Doe'; // Name will be showed on bank side 
    $callbackUrl = 'http://www.contoh.com/callback'; // callback
    $returnUrl = 'http://www.contoh.com/return'; // redirect
    $expiryPeriod = 10; // set expiration time in minutes
    $signature = md5($merchantCode . $merchantOrderId . $paymentAmount . $apiKey);

    // Customer Detail
    $firstName = "John";
    $lastName = "Doe";

    // Address
    $alamat = "Jl. Kembangan Raya";
    $city = "Jakarta";
    $postalCode = "11530";
    $countryCode = "ID";

    $address = array(
        'firstName' => $firstName,
        'lastName' => $lastName,
        'address' => $alamat,
        'city' => $city,
        'postalCode' => $postalCode,
        'phone' => $phoneNumber,
        'countryCode' => $countryCode
    );

    $customerDetail = array(
        'firstName' => $firstName,
        'lastName' => $lastName,
        'email' => $email,
        'phoneNumber' => $phoneNumber,
        'billingAddress' => $address,
        'shippingAddress' => $address
    );

    $item1 = array(
        'name' => 'Test Item 1',
        'price' => 10000,
        'quantity' => 1);

    $item2 = array(
        'name' => 'Test Item 2',
        'price' => 30000,
        'quantity' => 3);

    $itemDetails = array(
        $item1, $item2
    );

    /*For payment method OL and SL
    $accountLink = array (
        'credentialCode' => '7cXXXXX-XXXX-XXXX-9XXX-944XXXXXXX8',
        'ovo' => array (
            'paymentDetails' => array ( 
                0 => array (
                    'paymentType' => 'CASH',
                    'amount' => 40000,),),),
        'shopee' => array (
            'useCoin' => false,
            'promoId' => '',),
    );*/

    /*For payment Credit Card
    $creditCardDetail = array (
        'acquirer' => '014',
        'binWhitelist' => array (
            '014',
            '400000'
        )
    );*/

    $params = array(
        'merchantCode' => $merchantCode,
        'paymentAmount' => $paymentAmount,
        'paymentMethod' => $paymentMethod,
        'merchantOrderId' => $merchantOrderId,
        'productDetails' => $productDetails,
        'additionalParam' => $additionalParam,
        'merchantUserInfo' => $merchantUserInfo,
        'customerVaName' => $customerVaName,
        'email' => $email,
        'phoneNumber' => $phoneNumber,
        //'accountLink' => $accountLink,
        //'creditCardDetail' => $creditCardDetail,
        'itemDetails' => $itemDetails,
        'customerDetail' => $customerDetail,
        'callbackUrl' => $callbackUrl,
        'returnUrl' => $returnUrl,
        'signature' => $signature,
        'expiryPeriod' => $expiryPeriod
    );

    $params_string = json_encode($params);
    //echo $params_string;
    $url = 'https://sandbox.duitku.com/webapi/api/merchant/v2/inquiry'; // Sandbox
    // $url = 'https://passport.duitku.com/webapi/api/merchant/v2/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)
    {
        $results = json_decode($request, true);
        //header('location: '. $result['paymentUrl']);
        print_r($results, false);
        // echo "paymentUrl :". $result['paymentUrl'] . "<br />";
        // echo "merchantCode :". $result['merchantCode'] . "<br />";
        // echo "reference :". $result['reference'] . "<br />";
        // echo "vaNumber :". $result['vaNumber'] . "<br />";
        // echo "amount :". $result['amount'] . "<br />";
        // echo "statusCode :". $result['statusCode'] . "<br />";
        // echo "statusMessage :". $result['statusMessage'] . "<br />";
    }
    else
    {
        $request = json_decode($request);
        $error_message = "Server Error " . $httpCode ." ". $request->Message;
        echo $error_message;
    }
?>
curl --location --request POST 'https://sandbox.duitku.com/webapi/api/merchant/v2/inquiry' \
--header 'Content-Type: application/json' \
--data 
'{ 
   "merchantCode":"DXXXX",
   "paymentAmount":40000,
   "paymentMethod":"VC",
   "merchantOrderId":"abcde12345",
   "productDetails":"Payment example for example merchant",
   "additionalParam":"",
   "merchantUserInfo":"",
   "customerVaName":"John Doe",
   "email":"[email protected]",
   "phoneNumber":"08123456789",
   "itemDetails":[ 
      { 
         "name":"Test Item 1",
         "price":10000,
         "quantity":1
      },
      { 
         "name":"Test Item 2",
         "price":30000,
         "quantity":3
      }
   ],
   "customerDetail":{ 
      "firstName":"John",
      "lastName":"Doe",
      "email":"[email protected]",
      "phoneNumber":"08123456789",
      "billingAddress":{ 
         "firstName":"John",
         "lastName":"Doe",
         "address":"Jl. Kembangan Raya",
         "city":"Jakarta",
         "postalCode":"11530",
         "phone":"08123456789",
         "countryCode":"ID"
      },
      "shippingAddress":{ 
         "firstName":"John",
         "lastName":"Doe",
         "address":"Jl. Kembangan Raya",
         "city":"Jakarta",
         "postalCode":"11530",
         "phone":"08123456789",
         "countryCode":"ID"
      }
   },
   "callbackUrl":"http:\/\/example.com\/callback",
   "returnUrl":"http:\/\/example.com\/return",
   "signature":"506f88f1000dfb4a6541ff94d9b8d1e6",
   "expiryPeriod":10
}'

Parameter Type Required Description Example
merchantCode string(50)

Merchant code, is a project that used for transaction in Duitku. DXXXX
paymentAmount integer

Transaction payment amount. 40000
merchantOrderId string(50)

Transaction number from merchant. abcde12345
productDetails string(255)

Description about product/service on sale. Payment example for example merchant
email string(255)

Your customer's email. [email protected]
additionalParam string(255)

Additional parameter for merchant purpose (optional).
paymentMethod string(2)

Payment method code for being used. VC
merchantUserInfo string(255)

Customer's username or email on merchant site (optional).
customerVaName string(20)

The name that would be shown at bank payment system. John Doe
phoneNumber string(50)

Customer's phone number (optional). 08123456789
itemDetails ItemDetails

Product item details (optional).
customerDetail CustomerDetail

Customer's details.
returnUrl string(255)

A link that is used for redirect after exit payment page, being paid or not. http://www.contoh.com/return
callbackUrl string(255)

A link for callback transaction. http://www.contoh.com/callback
signature string(255)

Transaction security identification code. Formula: MD5(merchantCode + merchantOrderId + paymentAmount + apiKey). 506XXXf1XXXdfb4aXXX1ffXXX9b8d1e6
expiryPeriod int

Transaction expiry period on minutes. For details expiryPeriod can be found here. 10
accountLink AccountLink

Parameter details for accountlink payment method(optional).
creditCardDetail creditCardDetail

A detail parameter for credit card payment method (optional).

Fixed VA

Fixed Virtual Account is a virtual account number that can be customized by merchants so that it becomes static or according to their wishes. Merchants can adjust this number after the VA prefix number provided by Duitku. Provided that the numbers added do not exceed the maximum digit length for the VA number.

For integration using Fixed Virtual Account you can use our SNAP API, to see the documentation click here.

OVO H2H

Response Parameters

After requesting a transaction to the Duitku API. Duitku server will give a response. You can use this response as payment data for your customers.

{
  "merchantCode": "DXXXX",
  "reference": "DXXXXCX80TZJ85Q70QCI",
  "paymentUrl": "https://sandbox.duitku.com/topup/topupdirectv2.aspx?ref=BCA7WZ7EIDXXXXWEC",
  "vaNumber": "7007014001444348",
  "qrString": "00020101021226660014ID.LINKAJA.WWW011893600911002151500102152006170915150010303UME51450015ID.OR.GPNQR.WWW02150000000000000000303UME520454995802ID5911Toko Jualan6013Jakarta Barat61051153062210117LQKI2LPMJQPKCIIS553033605405400006304502A",
  "amount": "40000",
  "statusCode": "00",
  "statusMessage": "SUCCESS"
}
Parameter Type Description Example
merchantCode string(50) Merchant code, your project code which has been returned from Duitku server. Indicates which project you are using in the transaction. DXXXX
reference string(255) Reference number from Duitku (need to be save on your system). DXXXXCX80TXXX5Q70QCI
paymentUrl string(255) Payment link for direction to Duitku payment page. https://sandbox.duitku.com/topup/topupdirectv2.aspx?ref=BCA7WZ7EIDXXX7WEC
vaNumber string(20) Payment number or virtual account. 7007014001444348
amount integer Payment amount. 40000
qrString string(255) QR string is used if you use QRIS payment (you need to generate QR code from this string).

Callback

<?php
$apiKey = 'XXXXXXXXXX7968XXXXXXXXXFB05332AF'; // your API key
$merchantCode = isset($_POST['merchantCode']) ? $_POST['merchantCode'] : null; 
$amount = isset($_POST['amount']) ? $_POST['amount'] : null; 
$merchantOrderId = isset($_POST['merchantOrderId']) ? $_POST['merchantOrderId'] : null; 
$productDetail = isset($_POST['productDetail']) ? $_POST['productDetail'] : null; 
$additionalParam = isset($_POST['additionalParam']) ? $_POST['additionalParam'] : null; 
$paymentMethod = isset($_POST['paymentCode']) ? $_POST['paymentCode'] : null; 
$resultCode = isset($_POST['resultCode']) ? $_POST['resultCode'] : null; 
$merchantUserId = isset($_POST['merchantUserId']) ? $_POST['merchantUserId'] : null; 
$reference = isset($_POST['reference']) ? $_POST['reference'] : null; 
$signature = isset($_POST['signature']) ? $_POST['signature'] : null; 
$publisherOrderId = isset($_POST['publisherOrderId']) ? $_POST['publisherOrderId'] : null; 
$spUserHash = isset($_POST['spUserHash']) ? $_POST['spUserHash'] : null; 
$settlementDate = isset($_POST['settlementDate']) ? $_POST['settlementDate'] : null; 
$issuerCode = isset($_POST['issuerCode']) ? $_POST['issuerCode'] : null; 

//log callback untuk debug 
// file_put_contents('callback.txt', "* Callback *\r\n", FILE_APPEND | LOCK_EX);

if(!empty($merchantCode) && !empty($amount) && !empty($merchantOrderId) && !empty($signature))
{
    $params = $merchantCode . $amount . $merchantOrderId . $apiKey;
    $calcSignature = md5($params);

    if($signature == $calcSignature)
    {
        //Callback is valid
        //You might update your payment status here
        // file_put_contents('callback.txt', "* Berhasil *\r\n\r\n", FILE_APPEND | LOCK_EX);

    }
    else
    {
        // file_put_contents('callback.txt', "* Bad Signature *\r\n\r\n", FILE_APPEND | LOCK_EX);
        throw new Exception('Bad Signature')
    }
}
else
{
    // file_put_contents('callback.txt', "* Bad Parameter *\r\n\r\n", FILE_APPEND | LOCK_EX);
    throw new Exception('Bad Parameter')
}
?>
curl --location --request POST 'http:\/\/example.com\/callback' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merchantOrderId=abcde12345' \
--data-urlencode 'amount=150000' \
--data-urlencode 'merchantCode=DXXXX' \
--data-urlencode 'productDetails=Pembayaran untuk Toko Contoh' \
--data-urlencode 'additionalParam=contoh param' \
--data-urlencode 'paymentCode=VA' \
--data-urlencode 'resultCode=00' \
--data-urlencode '[email protected]' \
--data-urlencode 'reference=DXXXXCX80TXXX5Q70QCI' \
--data-urlencode 'signature=506f88f1000dfb4a6541ff94d9b8d1e6'\
--data-urlencode 'publisherOrderId=MGUHWKJX3M1KMSQN5'\
--data-urlencode 'spUserHash=xxxyyyzzz'\
--data-urlencode 'settlementDate=2023-07-25'\
--data-urlencode 'issuerCode=93600523'

The callbackUrl parameter in the request transaction will be used by Duitku to confirm payments made by your customers. When your customer successfully makes a payment, Duitku will send an HTTP POST which includes the result of paying a bill from the customer. You need to provide a page to accept the callback request. In order to be able to process the results of transactions that have been carried out by customers.

Parameters

Method : HTTP POST

Type : x-www-form-urlencoded

Parameter Description Example
merchantCode Merchant code, sent by the Duitku server to inform which project code is on used. DXXXX
amount Transaction amount. 150000
merchantOrderId Transaction number from merchant. abcde12345
productDetail Description about product/service on transaction. Payment example for example merchant
additionalParam Additional parameters that you send at the beginning of the transaction request.
paymentCode Payment method code. VC
resultCode Result code callback notification.
00 - Success
01 - Failed
00
merchantUserId Customer's username or email on your site. [email protected]
reference Transaction reference number from Duitku. Please keep it for the purposes of recording or tracking transactions. DXXXXCX80TXXX5Q70QCI
signature Transaction identification code. Contains transaction parameters which are hashed using the MD5 hashing method. Security parameters as a reference that the request received comes from the Duitku server. Formula: MD5(merchantcode + amount + merchantOrderId + apiKey). 506f88f1000dfb4a6541ff94d9b8d1e6
publisherOrderId Unique transaction payment number from Duitku. Please keep it for the purposes of recording or tracking transactions. MGUHWKJX3M1KMSQN5
spUserHash Will be sent to your callback if the payment method using ShopeePay(QRIS, App, and Account Link). If this string parameter contains alphabet and numeric, then it might been paid by Shopee itself. xxxyyyzzz
settlementDate Settlement date estimation information.
Format: YYYY-MM-DD
2023-07-25
issuerCode QRIS issuer code information.
See issuer list here.
*except QRIS Link Aja
93600523

Redirect

When sending the transaction request along with the callbackUrl parameter, you also pass the returnUrl parameter. In contrast to callbacks, which are useful for receiving the status of payments made by customers. Redirects are useful when after you direct a customer to a paymentUrl the customer will be redirected back to your site or shop page. After the transaction is successful or canceled, Duitku will direct the customer back to your site using the URL along with the following parameters.

Example

GET: http://www.merchantweb.com/redirect.php?merchantOrderId=abcde12345&resultCode=00&reference=DXXXXCX80TXXX5Q70QCI

Parameters

Parameter Description Example
merchantOrderId Order Id from merchant abcde12345
reference Reference from Duitku DXXXXCX80TXXX5Q70QCI
resultCode Result code after transaction.
00 - Success
01 - Pending
02 - Canceled
00

Check Transaction

After requesting a transaction, you can take steps to view the payment status on a certain order ID. You can also show your customers the status. Alternatively, you can also use it as an API for transaction verification. To ensure that the correct transaction information has changed. You can insert a transaction check when you receive a callback so that the payment status is guaranteed.

Check Transaction HTTP Request

Method: HTTP POST

Type: x-www-form-urlencoded

Development: https://sandbox.duitku.com/webapi/api/merchant/transactionStatus

Production: https://passport.duitku.com/webapi/api/merchant/transactionStatus

Check Transaction Request Parameters

<?php
    $merchantCode = 'DXXXX'; // from duitku
    $apiKey = 'XXXXXXXXXX7968XXXXXXXXXFB05332AF'; // from duitku
    $merchantOrderId = 'abcde12345'; // from you (merchant), unique

    $signature = md5($merchantCode . $merchantOrderId . $apiKey);

    $params = array(
        'merchantCode' => $merchantCode,
        'merchantOrderId' => $merchantOrderId,
        'signature' => $signature
    );

    $params_string = json_encode($params);
    $url = 'https://sandbox.duitku.com/webapi/api/merchant/transactionStatus';
    $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)
    {
        $results = json_decode($request, true);
        print_r($results, false);
        // echo "merchantOrderId :". $results['merchantOrderId'] . "<br />";
        // echo "reference :". $results['reference'] . "<br />";
        // echo "amount :". $results['amount'] . "<br />";
        // echo "fee :". $results['fee'] . "<br />";
        // echo "statusCode :". $results['statusCode'] . "<br />";
        // echo "statusMessage :". $results['statusMessage'] . "<br />";
    }
    else
    {
        $request = json_decode($request);
        $error_message = "Server Error " . $httpCode ." ". $request->Message;
        echo $error_message;
    }
?>

curl -X POST https://sandbox.duitku.com/webapi/api/merchant/transactionStatus
     -H "Content-Type: application/json" 
     -d "{\"merchantcode\": \"DXXXX\",
  \"merchantOrderId\": \"abcde12345\",
  \"signature\": \"497fbf783f6d17d4b1e1ef468917bdc8\"
  }"

Parameter Description Example
merchantCode Merchant code, obtained from the Duitku merchant page. DXXXX
merchantOrderId Merchant transaction number/order ID abcde12345
signature Transaction identification code. Contains transaction parameters which are hashed using the MD5 hashing method. Formula: md5(merchantCode + merchantOrderId + apiKey). 497fbf783f6d17d4b1e1ef468917bdc8

Check Transaction Response Parameters

{
  "merchantOrderId": "abcde12345",
  "reference": "DXXXXCX80TZJ85Q70QCI",
  "amount": "100000",
  "fee":"0.00",
  "statusCode": "00",
  "statusMessage": "SUCCESS"
}
Parameter Description
merchantOrderId Merchant transaction number/order ID
reference Reference is Duitku transaction reference number
amount Transaction Amount
fee Payment Fee.
statusCode Status code transaction.
00 - Success
01 - Process
02 - Failed/Expired
statusMessage Status message

Testing

After you go through the integration steps above, you can check your payment. The following is a list of payment trials that can be used in the Sandbox Environment:

Credit Card

3D Secure Transaction

Card Type Credit Card Number Valid Thru CVV
VISA 4000 0000 0000 0044 03/33 123
MASTERCARD 5500 0000 0000 0004 03/33 123

Virtual Account

Demo transaction virtual account sandbox Click-here.

E-Money

Shopee

For shopee testing you can download shopeeapp staging apk here.

Jenius Pay

E-mail Password CashTag OTP
[email protected] P@ssw0rd123 $testjenpay4 any 6 digits combination

For Jenius Pay testing, it is only available on the Jenius website, which can be accessed here

QRIS

For Shopee QRIS use Shopeeapp as like shopee e-money. For Gudang Voucher can use within virtual account demo success.

Paylater

Indodana

Phone Number PIN
081282325566 000000

Atome

Successful Scenario

Country Code Mobile OTP
ID +62811000122 7524

Failure Scenario

Country Code Mobile OTP
ID +62810000001500 1111

JSON Object

List(collection) of JSON objects that Duitku has.

Item Details

"itemDetails": [{
    "price": 50000,
    "quantity": 2,
    "name": "Apel",
  }]
Parameter Type Required Description Example
name string(255)

🗸

Name of the item Apel
quantity integer

🗸

Quantity of the item bought 2
price integer

🗸

Price of the Item. Note: Don't add decimal 50000

Customer Detail

"customerDetail": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phoneNumber": "08123456789",
    "billingAddress": {
      "firstName": "John",
      "lastName": "Doe",
      "address": "Jl. Kembangan Raya",
      "city": "Jakarta",
      "postalCode": "11530",
      "phone": "08123456789",
      "countryCode": "ID"
    },
    "shippingAddress": {
      "firstName": "John",
      "lastName": "Doe",
      "address": "Jl. Kembangan Raya",
      "city": "Jakarta",
      "postalCode": "11530",
      "phone": "08123456789",
      "countryCode": "ID"
    }
}
Parameter Type Required Description Example
firstName string(255)

Customer's first name John
lastName string(255)

Customer's last name Doe
email string(255)

Customer's email
phoneNumber string(255)

Customer's phone number 081234567890
billingAddress Address

Customer's billing address
shippingAddress Address

Customer's shipping address

Address

{
  "firstName": "John",
  "lastName": "Doe",
  "address": "Jl. Kembangan Raya",
  "city": "Jakarta",
  "postalCode": "11530",
  "phone": "08123456789",
  "countryCode": "ID"
}
Parameter Type Required Description Example
firstName string(255)

Customer's first name John
lastName string(255)

Customer's last name Doe
address string(255)

Billing address or shipping address. Jl. Kembangan Raya
city string(255)

City of the address Jakarta
postalCode string(255)

Postal code of the address 11530
phone string(255)

Phone number for billing or shipping 08123456789
countryCode string(255)

ISO 3166-1 alpha-3 ID

Parameter for payment methods that use OVO Account Link and Shopee Account Link.

"accountLink": {
    "credentialCode": "A0F22572-4AF1-E111-812C-B01224449936",
    "ovo": {
        "paymentDetails": [{
            "paymentType": "CASH",
            "amount": "10000"
        }]
    },
    "shopee": {
        "useCoin": false,
        "promoId": ""
    }
},

Parameter Type Required Description Example
credentialCode string(50)

Credential Code provide by Duitku. B3A72721-7FFB-EC11-812D-B4617B397E08
ovo OVO.

Mandatory for OVO payment.
shopee Shopee.

Mandatory for Shopee payment.

Ovo Detail

"ovo": {
    "paymentDetails": [
        {
            "paymentType": "CASH",
            "amount": "10000"
        }
    ]
}

Parameter Type Required Description Example
paymentDetails array object

Detail param for request payment OVO.
paymentType string(10)

Type of your payment. CASH
amount int

Transaction payment amount. 10000

Shopee Detail

"shopee": {
  "promo_ids": "",
  "useCoin": false
}

Parameter Type Required Description Example
promo_ids string(50)

Voucher code. campaign111
useCoin boolean

Used for shopee coin from linked ShopeePay account. Set true when pay transaction would like to use coins(Only for ShopeePay account link). false

Payment Fee

{
  "paymentMethod": "VA",
  "paymentName": "MAYBANK VA",
  "paymentImage": "https://images.duitku.com/hotlink-ok/VA.PNG",
  "totalFee": "0"
}
Parameter Type Description
paymentMethod String(2) Payment method code.
paymentName String(255) Payment method name.
paymentImage String(255) Payment method image url.
totalFee String(255) Payment Fee.

Credit Card Detail

The following are additional parameters for transaction requests using the optional creditcard switcher channel.

"creditCardDetail": {
  "acquirer":"014",
  "binWhitelist":["014","022", "400000"]
}
Parameter Type Required Description Example
acquirer string(3)

You can specify which bank Acquirer will be used for the transaction.
014 for BCA.
022 for CIMB.
014
binWhitelist array string(3)

Parameters to limit which card that allowed on the transaction. Using bank code(3 digits) or credit card bin number(6 digits). Maximum list is 15 bin(s). 014, 022, 400000

Payment Method

Payment method available on duitku.

Payment Type Payment Code Description
Credit Card

VC

(Visa / Master Card / JCB)
Virtual Account

BC

BCA Virtual Account

M2

Mandiri Virtual Account

VA

Maybank Virtual Account

I1

BNI Virtual Account

B1

CIMB Niaga Virtual Account

BT

Permata Bank Virtual Account

A1

ATM Bersama

AG

Bank Artha Graha

NC

Bank Neo Commerce/BNC

BR

BRIVA

S1

Bank Sahabat Sampoerna

DM

Danamon Virtual Account

BV

BSI Virtual Account
Ritel

FT

Pegadaian/ALFA/Pos

IR

Indomaret
E-Wallet

OV

OVO (Support Void)

SA

ShopeePay Apps (Support Void)

LF

LinkAja Apps (Fixed Fee)

LA

LinkAja Apps (Percentage Fee)

DA

DANA

SL

ShopeePay Account Link

OL

OVO Account Link

JP

Jenius Pay
QRIS

SP

ShopeePay

LQ

LinkAja

NQ

Nobu

DQ

Dana

GQ

Gudang Voucher

SQ

Nusapay
Credit*

DN

Indodana Paylater

AT

ATOME

Expiry Period

List the values ​​of the expiryPeriod parameter if Default or NULL. Transaction expiry period on minutes.

Payment Channel Default Expiry Period Maximum Expiry Period
Credit Card 30 minutes*
Virtual Account 1440 minutes >1440 minutes
Retail 1440 minutes >1440 minutes
OVO 10 minutes** 1440 minutes
Shopee Pay Apps 10 minutes 60 minutes
LinkAja Apps 24 minutes* 1440 minutes
DANA 1440 minutes 1440 minutes
Shopee Pay Account Link 30 minutes*
OVO Account Link 15 minutes*
QRIS Payment 10 minutes 60 minutes
NOBU QRIS Payment 24 minutes 1440 minutes
Indodana Paylater 1440 minutes 1440 minutes
ATOME 720 minutes 720 minutes
Jenius Pay 10 minutes 10 minutes
Nusapay 10 minutes

Issuer List (QRIS)

Code Issuer
93600999 AHDI
93600947 Aladin Syariah
93600567 Allo Bank Indonesia
93600531 Amar
93600822 Astrapay
93600116 Bank Aceh Syariah
93600037 Bank Artha Graha Internasional
93600133 Bank BPD Bengkulu
93600124 Bank BPD Kalimantan Timur dan Kalimantan Utara
93600161 Bank Ganesha
93600513 Bank Ina Perdana
93600113 Bank Jateng
93600123 Bank Kalbar
93600122 Bank Kalsel
93600441 Bank KB Bukopin
93600121 Bank Lampung
93600157 Bank Maspion
93600553 Bank Mayora
93600548 Bank Multiarta Sentosa
93600490 Bank Neo Commerce
93600128 Bank NTB Syariah
93600019 Bank Panin
93600132 Bank Papua
93600115 Bank Pembangunan Daerah Jambi
93600494 Bank Raya
93600119 Bank Riau Kepri
93600523 Bank Sahabat Sampoerna
93600152 Bank Shinhan
93600126 Bank Sulsel
93600120 Bank Sumselbabel
93600023 Bank UOB Indonesia
93600808 Bayarind
93600014 BCA
93600536 BCA Syariah
93600501 BCAD
93600815 Bimasakti Multi Sinergi
93600110 BJB
93600425 BJB Syariah
93600919 BluePay
93600009 BNI
93600129 BPD Bali
93600112 BPD DIY
93600130 BPD NTT
93600114 BPD-JATIM
93600002 BRI
93600422 BRIS Pay
93600200 BTN
93600076 Bumi Arta
93600031 Citibank
93600950 Commonwealth
93600915 Dana
93600011 Danamon
93600046 DBS MAX QRIS
93600111 DKI
93600899 Doku
93600998 DSP
93600827 Fello
93600777 Finpay
93600813 GAJA
93600914 Go-Pay
93600916 Gudang Voucher
93600484 Hana bank
93600789 IMkas
93600920 Isaku
93600542 JAGO
93600213 Jenius
93600812 Kaspro
93600911 LinkAja
93600008 Mandiri Pay
93600016 Maybank
93600426 Mega
93600821 Midazpay
93600485 Motion Banking
93600147 Muamalat
93600118 Nagari
93600814 Netzme
93600022 Niaga
93600503 Nobu
93600028 OCBC
93600811 OTTOCASH
93600912 OVO
93600820 PAC Cash
93600818 Paydia
93600917 Paytrend
93600013 Permata
93608161 POS Indonesia
93600167 QNB Indonesia
93600921 Saldomu
93600535 Seabank
93600918 ShopeePay
93600153 Sinarmas
93600816 SPIN
93600451 Syariah Indonesia
93600898 T-Money
93600828 TrueMoney
93600835 Virgo
93600830 YODU
93600817 Yukk
93600825 Zipay

HTTP Code

Code Message Description
200 SUCCESS Succesfully processed.
400 Minimum Payment 10000 IDR Your payment is less than the terms.
Maximum Payment exceeded Your payment exceeds the terms.
paymentMethod is mandatory Check your paymentMethod parameter.
merchantOrderId is mandatory Check your merchant Order Id parameter.
length of merchantOrderId can't > 50 Your merchant Order Id parameter exceeds the limit.
Invalid Email Address Check your email parameter.
length of email can't > 50 Check your email parameter.
length of phoneNumber can't > 50 Check your phoneNumber parameter.
401 Wrong signature Check your signature parameter and other related parameters.
404 Merchant not found Check your merchantCode parameters.
Payment channel not available The payment method you are using is not yet active. Contact live chat or via [email protected].
409 Payment amount must be equal to all item price There is a difference between paymentAmount and total price in itemDetails.

Changelog

Version 2.0

Jul 2024

Jun 2024

Mar 2024

Nov 2023

Okt 2023

Aug 2023

Jan 2023

Oct 2022

Aug 2022

Apr 2022

Mar 2022

Aug 2021

Jun 2021

Feb 2021

Jan 2020

Jan 2019

Version 1.0