API Reference
DOKU DocsChangelogDOKU Github
  • Getting Started with DOKU API
    • User Registration
    • Idempotency Request
    • Notification
      • Setup Notification URL
      • HTTP Notification Sample for SNAP
      • HTTP Notification Sample - Non SNAP
      • Best Practice
      • Retry Notification
      • Override Notification URL
    • Signature Component
      • Non-SNAP
        • Signature Component from Request Header
        • Signature Componen from Response Header
        • Signature from API Get Method
        • Sample Code
      • SNAP
        • Symmetric Signature
        • Asymmetric Signature
    • Response Code
      • HTTP Status and Case Code
    • Check Status API
      • Non-SNAP
      • SNAP
    • Retrieve Payment Credential
  • Accept Payment
    • DOKU Checkout
      • Integration Guide
        • Backend Integration
        • Frontend Integration
        • Simulate payment and Notification
      • Supported Payment Methods
      • Status Order
      • Additional Feature
        • Tokenization
        • Promo on DOKU Checkout Page
        • Track Campaign Source on Google Analytics
      • Checkout Settings
    • Direct API
      • Non-SNAP
        • Cards
          • Payment Page Integration Guide
          • Host-To-Host Integration Guide
          • Mastercard Automatic Billing Updater (ABU) Integration Guide
            • Backend Integration
        • e-Wallet
          • Overview
          • DOKU e-Wallet
          • OVO Push Payment
          • ShopeePay
          • LinkAja
        • Paylater
          • Akulaku
          • Kredivo
          • Indodana
        • Digital Banking
          • Jenius Pay
        • Convenience Store
          • Alfa Group
          • Indomaret
      • SNAP
        • Integration Guide
          • Get Token API
            • B2B
            • B2B2C
          • Virtual Account
            • CIMB Virtual Account
            • BSI Virtual Account
            • BCA Virtual Account
            • BNC Virtual Account
            • BNI Virtual Account
            • Mandiri Virtual Account
            • BRI Virtual Account
            • BTN Virtual Account
            • Permata Virtual Account
            • Danamon Virtual Account
            • BSS Virtual Account
          • E-Wallet
            • DOKU Wallet
            • DANA
            • OVO
            • ShopeePay
          • Direct Debit
            • Allo Bank Direct Debit
            • BRI Direct Debit
            • CIMB Direct Debit
            • Mandiri Direct Debit
          • Kartu Kredit Indonesia Cepat Secure(KKI CPTS)
            • Host to Host Integration
          • QRIS
    • Finance and Settlement
      • Split Settlement
      • Custom Settlement Report
      • Hold and Release Settlement
      • Bulk Registration Bank
    • Test on DOKU Demo Site
    • DOKU Payment Simulator
  • Developer Kit
    • Postman Collection
    • Libraries and SDK
  • Wallet As A Service
    • Sub Account
  • Partnership
    • Partner API
      • Check Requirements API
      • Generate Token API
      • Upload File API
      • Business Registration API
      • Create Business Lite API
      • Get Business Data API
  • Payout
    • Kirim DOKU
  • FLEXIBILL
    • Account Billing
      • Batch Upload
    • DOKU Biller
      • Response Code
      • Samples
  • PAYCHAT API
    • Send WhatsApp Message
  • Archive
    • Non-SNAP
      • Tokenization V1
      • e-Wallet
        • OVO Recurring
        • OVO Open API
    • SNAP
      • Virtual Account
        • BCA v1.0
        • BRI v1.0
        • BNI v1.0
        • BNC v1.0
        • Mandiri v1.0
        • BTN v1.0
        • Permata v1.0
        • Danamon Virtual Account
      • e-Wallet
        • OVO Open API
        • DANA
        • ShopeePay
      • Direct Debit
        • CIMB Direct Debit
        • BRI Direct Debit
        • Allobank
Powered by GitBook

DOKU API

  • Legacy Documentation
On this page
  • Backend Integration to initiate payment​
  • Endpoint
  • Request
  • Request Header Explanation
  • Response

Was this helpful?

  1. Accept Payment
  2. DOKU Checkout
  3. Integration Guide

Backend Integration

PreviousIntegration GuideNextFrontend Integration

Last updated 1 month ago

Was this helpful?

Backend Integration to initiate payment

To obtain the payment.url, you will need to hit this API through your Backend :

Endpoint

Type
Value

HTTP Method

POST

API endpoint (sandbox)

API endpoint (production)


Request

Here is the sample of request header to obtain payment.url:

Client-Id: MCH-0001-10791114622547
Request-Id: fdb69f47-96da-499d-acec-7cdc318ab2fe
Request-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=1jap2tpgvWt83tG4J7IhEwUrwmMt71OaIk0oL0e6sPM=

Request Header Explanation

Parameter
Description

client-id

Client ID retrieved from DOKU Back Office

request-id

Unique random string (max 128 characters) generated from merchant side to protect duplicate request

request-timestamp

Timestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z

signature

Here is the sample of request body to obtain payment.url, you can send a simple request for a basic payment page and you can send the parameter according to your needs :

{
    "order": {
        "amount": 20000,
        "invoice_number": "INV-20210231-0001"
    },
    "payment": {
        "payment_due_date": 60
    }
}
Body Parameter
Type
Mandatory
Description

order.amount

number

Mandatory

In IDR Currency and without decimal Max length: 12

order.invoice_number

string

Mandatory

Generated by merchant to identify the order. Max length: 64 Notes: If you have Credit Card channel activated, the maximum length is 30 chars due to the acquirer's requirements If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.

payment.payment_due_date

number

Optional

The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6

This basic request only could be implement for selected payment method, such as :

  1. Virtual Account

  2. Credit Card

  3. QRIS

  4. Convenience Store

  5. E-money (OVO and Linkaja)

{
"order": {
  "amount": 80000,
  "invoice_number": "INV-{{$timestamp}}",
  "currency": "IDR",
  "callback_url": "http://merchantcallbackurl.domain/",
  "callback_url_cancel": "https://merchantcallbackurl-cancel.domain",
  "callback_url_result": "https://merchantcallbackurl-cancel.domain",
  "language":"EN",
  "auto_redirect":true,
  "disable_retry_payment" :true,
  "recover_abandoned_cart": true,
  "expired_recovered_cart":2,
  "line_items": [
    {
        "id":"001",
        "name":"Fresh flowers",
        "quantity":1,
        "price":40000,
        "sku": "FF01",
        "category": "gift-and-flowers",
        "url": "http://item-url.domain/",
        "image_url":"http://image-url.domain/",
        "type":"ABC"
    },
    {
        "id":"002",
        "name":"T-shirt",
        "quantity":1,
        "price":40000,
        "sku": "T01",
        "category": "clothing",
        "url": "http://item-url.domain/",
        "image_url":"http://image-url.domain/",
        "type":"ABC"
    }
  ]
},
  "payment": {
      "payment_due_date": 60,
      "type" : "SALE",
      "payment_method_types": [
          "VIRTUAL_ACCOUNT_BCA",
          "VIRTUAL_ACCOUNT_BANK_MANDIRI",
          "VIRTUAL_ACCOUNT_BANK_SYARIAH_MANDIRI",
          "VIRTUAL_ACCOUNT_DOKU",
          "VIRTUAL_ACCOUNT_BRI",
          "VIRTUAL_ACCOUNT_BNI",
          "VIRTUAL_ACCOUNT_BANK_PERMATA",
          "VIRTUAL_ACCOUNT_BANK_CIMB",
          "VIRTUAL_ACCOUNT_BANK_DANAMON",
          "ONLINE_TO_OFFLINE_ALFA",
          "CREDIT_CARD",
          "DIRECT_DEBIT_BRI",
          "EMONEY_SHOPEEPAY",
          "EMONEY_OVO",
          "EMONEY_DANA",
          "QRIS",
          "PEER_TO_PEER_AKULAKU",
          "PEER_TO_PEER_KREDIVO",
          "PEER_TO_PEER_INDODANA"
      ]
  },
  "customer":{
      "id":"JC-01",
      "name":"Zolanda",
      "last_name":"Anggraeni",
      "phone":"628121212121",
      "email": "zolanda@example.com",
      "address":"taman setiabudi",
      "postcode":"120129",
      "state":"Jakarta",
      "city":"Jakarta Selatan",
      "country":"ID"
},
"shipping_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
},
"billing_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
},
"additional_info":{
  "allow_tenor" : [0,3,6,12],
  "doku_wallet_notify_url" : "https://dw-notification.merchantdomain",
  "override_notification_url": "https://another.example.com/payments/notifications"
}
}

Request Body Explanation

Body Parameter
Description

Information about the order items.

Information about payment relation.

Specific information regarding the customer.

Specific information regarding the shipping address. Some payment methods are required to send this parameter.

Specific information regarding the billing address. There is payment method that required to send this parameter.

Some additional information parameter in order to fulfill non-mandatory parameters

Order object

{
"order": {
  "amount": 80000,
  "invoice_number": "INV-{{$timestamp}}",
  "currency": "IDR",
  "callback_url": "http://merchantcallbackurl.domain/",
  "callback_url_cancel": "https://merchantcallbackurl-cancel.domain",
  "callback_url_result": "https://merchantcallbackurl-cancel.domain",
  "language":"EN",
  "auto_redirect":true,
  "disable_retry_payment" :true,
  "recover_abandoned_cart":true,
  "expired_recovered_cart":2,
  "line_items": [
    {
        "id":"001",
        "name":"Fresh flowers",
        "quantity":1,
        "price":40000,
        "sku": "FF01",
        "category": "gift-and-flowers",
        "url": "http://item-url.domain/",
        "image_url":"http://image-url.domain/",
        "type":"ABC"
    },
    {
        "id":"002",
        "name":"T-shirt",
        "quantity":1,
        "price":40000,
        "sku": "T01",
        "category": "clothing",
        "url": "http://item-url.domain/",
        "image_url":"http://image-url.domain/",
        "type":"ABC"
    }
  ]
}
Body Parameter
Type`
Mandatory
Description

order.amount

number

Mandatory

Order amount in IDR currency and without decimal. Max length: 12

order.invoice_number

string

Mandatory

Unique identifier generated by merchant to identify the order.

Max length: 64, except credit card which 30 chars only If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.

order.currency

string

Optional

3 alphabetic currency code ISO 4217 Min-max Length: 3 Default value: IDR

order.callback_url

string

Conditional, Mandatory for Payment Methods : Jenius.

The "Back to Merchant" button is configured using the URL provided in callback_url. If only callback_url is set, it will apply to the "Back to Merchant" button on both the main page and the result page. However, if the merchant also sets callback_url_result, then callback_url will only affect the "Back to Merchant" button on the main page, while callback_url_result will specifically affect the button on the result page.

order.callback_url_cancel

string

Conditional, Currently only available for payment methods : Indodana

The URL specified for merchant redirection in the event of order cancellation.

order.callback_url_result

string

Optional

The URL designated for button "Back to merchant" in result page.

order.language

string

Optional

Default language shown when redirect to checkout page Max length: 2

order.auto_redirect

boolean

Mandatory

When set to true, the transaction result page redirects to the callback URL; otherwise, it redirects to the payment result page.

order.disable_retry_payment

boolean

Conditional, Only applied for payment methods : Credit Card, DOKU Wallet, Akulaku, OVO, ShopeePay

This condition is applicable only when the merchant sends this parameter with a "true" value. If the merchant does not include this parameter, sends a "false" value, or if the customer fails to complete the payment, the result page will be displayed in the Checkout. From there, the customer can retry payment or modify their payment options if multiple channels are available.

order.recover_abandoned_cart

boolean

Conditional, only applicable for VA, O2O, and Credit Card

If you bring this parameter and set as true, your customer can recover their order than has been expired as long as the expired_recover_cart is not due yet.

order.expired_recovered_cart

number

Conditional, only applicable for VA, O2O, and Credit Card

This is the expired time of the order that is already recovered. The expired time's max length is 44640 minutes.

order.line_items.id

string

Conditional Mandatory for Payment Methods : Akulaku, Kredivo, Indodana

Item ID of the item in this transaction. Max Length: 64 Note : If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.

order.line_items.name

string

Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Indodana, KKI.

Name of the product item. Max Length: 255 Note If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.

order.line_items.price

number

Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Akulaku, Indodana, KKI.

Price of the product item. Total price and quantity must match with the order.amount. Note If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.

order.line_items.quantity

number

Conditional, Mandatory for Payment Methods : Jenius, Kredivo, Akulaku, Indodana, KKI.

Quantity of the product item. Note If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.

order.line_items.sku

string

Conditional. Mandatory for Payment Methods : Akulaku, Kredivo, Indodana.

SKU of the product item.

order.line_items.category

string

Conditional, Mandatory for Payment Methods : Akulaku, Kredivo, Indodana.

order.line_items.url

string

Conditional, Mandatory for Payment Methods : Kredivo and Indodana.

URL to the product item on merchant site.

order.line_items.image_url

string

Conditional, Mandatory for Payment Methods : Indodana.

URL the image of the product item on merchant site.

order.line_items.type

string

Conditional, Mandatory for Payment Methods : Indodana.

Type of the item in this transaction.

Payment Object

"payment": {
      "payment_due_date": 60,
      "type" : "SALE/INSTALLMENT/AUTHORIZE",
      "payment_method_types": [
          "VIRTUAL_ACCOUNT_BCA",
          "VIRTUAL_ACCOUNT_BANK_MANDIRI",
          "VIRTUAL_ACCOUNT_BANK_SYARIAH_MANDIRI",
          "VIRTUAL_ACCOUNT_DOKU",
          "VIRTUAL_ACCOUNT_BRI",
          "VIRTUAL_ACCOUNT_BNI",
          "VIRTUAL_ACCOUNT_BANK_PERMATA",
          "VIRTUAL_ACCOUNT_BANK_CIMB",
          "VIRTUAL_ACCOUNT_BANK_DANAMON",
          "ONLINE_TO_OFFLINE_ALFA",
          "CREDIT_CARD",
          "DIRECT_DEBIT_BRI",
          "EMONEY_SHOPEEPAY",
          "EMONEY_OVO",
          "QRIS",
          "PEER_TO_PEER_AKULAKU",
          "PEER_TO_PEER_KREDIVO",
          "PEER_TO_PEER_INDODANA"
      ]
  }
Body parameter
Type
Mandatory
Description

payment.payment_method_types

array

optional

payment.type

string

Optional

Possible Value : "SALE", "INSTALLMENT", "AUTHORIZE" If you set the type as Authorize, the status will be stated as On Hold. The status will change, if the customer do payment. Only applicable in Credit Card.

payment.payment_due_date

number

optional

The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6

Customer Object

"customer":{
      "id":"JC-01",
      "name":"Zolanda",
      "last_name":"Anggraeni",
      "phone":"628121212121",
      "email": "zolanda@example.com",
      "address":"taman setiabudi",
      "postcode":"120129",
      "state":"Jakarta",
      "city":"Jakarta Selatan",
      "country":"ID"
}
Body parameter
Type
Mandatory
Description

customer.id

string

Conditional, mandatory to enable tokenized payments (BRI Direct Debit, Allobank, Credit Card tokenization) and Akulaku Paylater.

Unique customer identifier generated by merchant. Allowed chars: alphabetic, numeric, special chars Max Length: 50

customer.name

string

Conditional, mandatory for payment methods Jenius, Akulaku, Indodana

Customer name. Allowed chars: alphabetic Max Length: 255

customer.last_name

string

Optional

Customer last name. Max Length: 16

customer.email

string

Conditional, mandatory for payment method Indodana

Customer email. Allowed chars: alphabetic, numeric, special chars Max Length: 128

customer.phone

string

Conditional

Customer phone number. Format: {calling_code}{phone_number}. Example: 6281122334455 Max Length: 16

customer.address

string

Conditional, mandatory for payment method Akulaku

Customer address. Allowed chars: alphabetic, numeric, special chars Max Length: 400

customer.postcode

string

Conditional, mandatory for payment method Akulaku

Customer address' post code

customer.state

string

Conditional, mandatory for payment method Akulaku

Customer state or province.

customer.city

string

Conditional, mandatory for payment method Akulaku

Customer address' city

customer.country

string

Optional

2 alphabetic country code ISO 3166-1 Allowed chars: alphabetic Min-max Length: 2

Shipping Address Object

"shipping_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
}
Body Parameter
Type
Mandatory
Description

shipping_address.first_name

string

Conditional, mandatory for payment method Kredivo and Indodana

Customer's first name used as shipping address

shipping_address.last_name

string

Optional

Customer's last name used as shipping address.

shipping_address.address

string

Conditional, mandatory for payment method Kredivo and Indodana

Customer's address used as shipping address.

shipping_address.city

string

Conditional, mandatory for payment method Kredivo and Indodana

City of customer's shipping address.

shipping_address.postal_code

string

Conditional, mandatory for payment method Kredivo and Indodana

Postal code of customer's shipping address.

shipping_address.phone

string

Conditional, mandatory for payment method Kredivo and Indodana

Customer's phone used as shipping address.

shipping_address.country_code

string

Conditional, mandatory for payment method Kredivo and Indodana

Country of customer's shipping address.

Billing Address Object

"billing_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
}
Body Parameter
Type
Mandatory
Description

billing_address.first_name

string

Conditional, mandatory for payment method Indodana

Customer's first name used as billing address

billing_address.last_name

string

Conditional, mandatory for payment method Indodana

Customer's last name used as billing address.

billing_address.address

string

Conditional, mandatory for payment method Indodana

Customer's address used as billing address.

billing_address.city

string

Conditional, mandatory for payment method Indodana

City of customer's billing address.

billing_address.postal_code

string

Conditional, mandatory for payment method Indodana

Postal code of customer's billing address.

billing_address.phone

string

Conditional, mandatory for payment method Indodana

Customer's phone used as billing address.

billing_address.country_code

string

Conditional, mandatory for payment method Indodana

Country of customer's billing address.

Additional Info Object

"additional_info":{
  "allow_tenor" : [0,3,6,12],
  "doku_wallet_notify_url" : "https://dw-notification.merchantdomain",
  "override_notification_url": "https://another.example.com/payments/notifications"
}
Body parameter
Type
Mandatory
Description

additional_info.allow_tenor

number

Optional

The transaction exclusively supports installment tenors as per its current configuration. The allowed values are 0,3,6,12. To hide the "no installment" option, refrain from inputting 0 (zero) in the parameter.

additional_info.doku_wallet_notify_url

string

Conditional, only for payment method DOKU Wallet

Notification url set in this parameter

additional_info.override_notification_url

string

Optional

Response

Success Response

Type
Value

HTTP Status

200

{
    "message": [
        "SUCCESS"
    ],
    "response": {
        "order": {
            "amount": "20000",
            "invoice_number": "INV-20210231-0001",
            "currency": "IDR",
            "session_id": "2ebffd22d23e436895ce5c38f7ddcf86"
        },
        "payment": {
            "payment_method_types": [
                "JENIUS_PAY",
                "ONLINE_TO_OFFLINE_ALFA",
                "OCTO_CLICKS",
                "PEER_TO_PEER_KREDIVO",
                "VIRTUAL_ACCOUNT_BCA",
                "CREDIT_CARD",
                "EMONEY_OVO",
                "ONLINE_TO_OFFLINE_INDOMARET",
                "EMONEY_DOKU",
                "VIRTUAL_ACCOUNT_BANK_MANDIRI",
                "EPAY_BRI",
                "PEER_TO_PEER_INDODANA",
                "VIRTUAL_ACCOUNT_BRI",
                "EMONEY_LINKAJA",
                "EMONEY_SHOPEE_PAY",
                "VIRTUAL_ACCOUNT_BNI",
                "VIRTUAL_ACCOUNT_BANK_PERMATA",
                "VIRTUAL_ACCOUNT_DOKU",
                "VIRTUAL_ACCOUNT_BANK_CIMB",
                "VIRTUAL_ACCOUNT_BANK_DANAMON",
                "VIRTUAL_ACCOUNT_BANK_SYARIAH_MANDIRI",
                "VIRTUAL_ACCOUNT_MAYBANK",
                "DIRECT_DEBIT_CIMB",
                "EMONEY_DANA",
                "DIRECT_DEBIT_BRI",
                "DIRECT_DEBIT_ALLO",
                "PEER_TO_PEER_BRI_CERIA",
                "VIRTUAL_ACCOUNT_BNC",
                "PERMATA_NET",
                "KLIKPAY_BCA",
                "VIRTUAL_ACCOUNT_BTN",
                "DANAMON_ONLINE_BANKING",
                "VIRTUAL_ACCOUNT_SINARMAS"
            ],
            "payment_due_date": 60,
            "token_id": "2ebffd22d23e436895ce5c38f7ddcf8620244712094712362",
            "url": "https://sandbox.doku.com/checkout-link-v2/2ebffd22d23e436895ce5c38f7ddcf8620244712094712362",
            "expired_date": "20240712104711"
        },
        "additional_info": {
            "origin": {
                "product": "CHECKOUT",
                "system": "mid-jokul-checkout-system",
                "apiFormat": "JOKUL",
                "source": "direct"
            }
        },
        "uuid": 2225240712094712339107164227041411929328,
        "headers": {
            "request_id": "ed06da30-bbbc-4e90-a3c7-390c24476cb9",
            "signature": "HMACSHA256=cyoua5cA6DR5mG/4vw3ice48KjCX+CGdLdSfMumJUuo=",
            "date": "2024-07-12T02:47:11Z",
            "client_id": "BRN-0214-1714016624673"
        }
    }
}
{
    "message": [
        "SUCCESS"
    ],
    "response": {
        "order": {
            "amount": "80000",
            "invoice_number": "INV-1720752332",
            "currency": "IDR",
            "session_id": "5f6304ca900144c7a4fcf802ad6c0898",
            "callback_url": "http://merchantcallbackurl.domain/",
            "callback_url_cancel": "https://merchantcallbackurl-cancel.domain",
            "callback_url_result": "https://merchantcallbackurl-cancel.domain",
            "recover_abandoned_cart":true,
            "expired_recovered_cart":2,
            "line_items": [
                {
                    "name": "Fresh flowers",
                    "quantity": 1,
                    "price": "40000",
                    "sku": "FF01",
                    "category": "gift-and-flowers",
                    "url": "http://item-url.domain/",
                    "image_url": "http://image-url.domain/",
                    "type": "ABC"
                },
                {
                    "name": "T-shirt",
                    "quantity": 1,
                    "price": "40000",
                    "sku": "T01",
                    "category": "clothing",
                    "url": "http://item-url.domain/",
                    "image_url": "http://image-url.domain/",
                    "type": "ABC"
                }
            ],
            "language": "EN",
            "disable_retry_payment": true,
            "auto_redirect": true
        },
        "payment": {
            "payment_method_types": [
                "EMONEY_OVO",
                "ONLINE_TO_OFFLINE_ALFA",
                "PEER_TO_PEER_KREDIVO",
                "VIRTUAL_ACCOUNT_BCA",
                "CREDIT_CARD",
                "VIRTUAL_ACCOUNT_BANK_MANDIRI",
                "VIRTUAL_ACCOUNT_BRI",
                "PEER_TO_PEER_INDODANA",
                "VIRTUAL_ACCOUNT_BNI",
                "VIRTUAL_ACCOUNT_BANK_PERMATA",
                "VIRTUAL_ACCOUNT_DOKU",
                "VIRTUAL_ACCOUNT_BANK_CIMB",
                "VIRTUAL_ACCOUNT_BANK_DANAMON",
                "VIRTUAL_ACCOUNT_BANK_SYARIAH_MANDIRI",
                "EMONEY_DANA",
                "DIRECT_DEBIT_BRI"
            ],
            "payment_due_date": 60,
            "token_id": "5f6304ca900144c7a4fcf802ad6c089820244512094533497",
            "url": "https://sandbox.doku.com/checkout-link-v2/5f6304ca900144c7a4fcf802ad6c089820244512094533497",
            "expired_date": "20240712104531"
        },
        "customer": {
            "id": "JC-01",
            "state": "Jakarta",
            "city": "Jakarta Selatan",
            "postcode": "120129",
            "email": "zolanda@example.com",
            "phone": "628121212121",
            "name": "Zolanda",
            "last_name": "Anggraeni",
            "address": "taman setiabudi",
            "country": "ID"
        },
        "additional_info": {
            "allow_tenor": [
                0,
                3,
                6,
                12
            ],
            "doku_wallet_notify_url": "https://dw-notification.merchantdomain/",
            "origin": {
                "product": "CHECKOUT",
                "system": "mid-jokul-checkout-system",
                "source": "direct",
                "apiFormat": "JOKUL"
            },
            "line_items": [
                {
                    "quantity": 1,
                    "price": "40000",
                    "image_url": "http://image-url.domain/",
                    "name": "Fresh flowers",
                    "sku": "FF01",
                    "category": "gift-and-flowers",
                    "type": "ABC",
                    "url": "http://item-url.domain/"
                },
                {
                    "quantity": 1,
                    "price": "40000",
                    "image_url": "http://image-url.domain/",
                    "name": "T-shirt",
                    "sku": "T01",
                    "category": "clothing",
                    "type": "ABC",
                    "url": "http://item-url.domain/"
                }
            ],
            "override_notification_url": "https://another.example.com/payments/notifications"
        },
        "uuid": 2225240712094533483107164227326411817850,
        "headers": {
            "request_id": "0521fe4d-bd69-4626-9c5c-fc484b81b8bc",
            "signature": "HMACSHA256=eT5aE//GhxqrRvx/XHdV/z2KezkyD6V3EJPHTEv4x8g=",
            "date": "2024-07-12T02:45:31Z",
            "client_id": "BRN-0214-1714016624673"
        },
        "shipping_address": {
            "address": "Jalan DOKU no 15",
            "city": "Jakarta",
            "phone": "081312345678",
            "first_name": "Joe",
            "last_name": "Doe",
            "postal_code": "11923",
            "country_code": "IDN"
        },
        "billing_address": {
            "address": "Jalan DOKU no 15",
            "city": "Jakarta",
            "phone": "081312345678",
            "first_name": "Joe",
            "last_name": "Doe",
            "postal_code": "11923",
            "country_code": "IDN"
        }
    }
}

Response Body Explanation

Body Parameter
Type
Mandatory
Description

message

array

Mandatory

Message will display the result of the request. If there are some errors on your request, they will be diplayed in this parameter.

response.order.amount

number

Mandatory

Same as the request

response.order.invoice_number

string

Mandatory

Same as the request

response.order.currency

string

Optional

Same as the request

response.order.session_id

string

Optional

Unique session ID generated by DOKU

response.order.callback_url

string

Optional

Same as the request

response.order.callback_url_cancel

string

Optional

Same as the request

response.order.recover_abandoned_cart

boolean

Conditional

Same as the request

response.order.expired_recovered_cart

number

Conditional

Same as the request

response.order.line_items.name

string

Optional

Same as the request

response.order.line_items.quantity

number

Optional

Same as the request

response.order.line_items.price

number

Optional

Same as the request

response.order.line_items.sku

string

Optional

Same as the request

response.order.line_items.category

string

Optional

Same as the request

response.order.line_items.url

string

Optional

Same as the request

response.order.line_items.image_url

string

Optional

Same as the request

response.order.line_items.type

string

Optional

Same as the request

response.order.language

string

Optional

Same as the request

response.order.disable_retry_payment

boolean

Optional

Same as the request

response.order.auto_redirect

boolean

Optional

Same as the request

response.payment.payment_method_types

array

Optional

Payment method that will be displayed on the Checkout Page

response.payment.payment_due_date

number

Mandatory

Same as the request

response.payment.token_id

string

Mandatory

Token generated by DOKU for the Checkout Page

response.payment.url

string

Mandatory

Checkout page URL to display for the customer

response.payment.expired_date

string

Mandatory

Date time of payment page will be expired with the format of yyyyMMddHHmmss. The expired date uses UTC+7 time. Use this to set the expiry order on merchant side

response.customer.id

string

Optional

Same as the request

response.customer.state

string

Optional

Same as the request

response.customer.city

string

Optional

Same as the request

response.customer.postcode

string

Optional

Same as the request

response.customer.email

string

Optional

Same as the request

response.customer.phone

string

Optional

Same as the request

response.customer.name

string

Optional

Same as the request

response.customer.last_name

string

Optional

Same as the request

response.customer.address

string

Optional

Same as the request

response.customer.country

string

Optional

Same as the request

response.additional_info.allow_tenor

string

Optional

Same as the request

response.additional_info.close_redirect

string

Optional

Same as the request

response.additional_info.doku_wallet_notify_url

string

Optional

Same as the request

response.additional_info.override_notification_url

string

Optional

Same as the request

response.uuid

string

Optional

Unique number generated by DOKU

response.headers.requestId

string

Optional

Same as the request

response.headers.signature

string

Optional

Same as the request

response.headers.date

string

Optional

Same as the request

response.headers.clientId

string

Optional

Same as the request

response.shipping_address.address

string

Optional

Same as the request

response.shipping_address.city

string

Optional

Same as the request

response.shipping_address.phone

string

Optional

Same as the request

response.shipping_address.first_name

string

Optional

Same as the request

response.shipping_address.last_name

string

Optional

Same as the request

response.shipping_address.postal_code

string

Optional

Same as the request

response.shipping_address.country_code

string

Optional

Same as the request

response.billing_address.address

string

Optional

Same as the request

response.billing_address.city

string

Optional

Same as the request

response.billing_address.phone

string

Optional

Same as the request

response.billing_address.first_name

string

Optional

Same as the request

response.billing_address.first_name

string

Optional

Same as the request

response.billing_address.postal_code

string

Optional

Same as the request

response.billing_address.country_code

string

Optional

Same as the request

Failed Response

Type
Value

HTTP Status

400

{
    "error_messages": [
        "order.invoice_number must be filled",
        "order.amount must greater than 0"
    ]
}


List Category

List category can be used as reference. But this is part of payment channel Indodana with mandatory value need to set in order.line_items.category.

No
Category

1

airlines

2

arts-crafts-and-collectibles

3

automotive

4

baby

5

beauty-and-fragrances

6

biller

7

books-and-magazines

8

business-to-business-including-mlm

9

charity-and-non-profit

10

clothing

11

community

12

digital-content

13

electronics-and-telecom

14

entertainment-and-media

15

fee

16

financial-services-and-products

17

financial-services-and-technology

18

food-and-beverage

19

food-retail-and-service

20

games-voucher

21

gifts-and-flowers

22

government

23

health-and-personal-care

24

home-and-garden

25

hotel-and-travel

26

insurance

27

marketplace

28

nonprofit

29

offline-store

30

others

31

over-the-air

32

overseas

33

pets-and-animals

34

property

35

public-services

36

religion-and-spirituality

37

retail

38

services

39

sports-and-outdoors

40

telco

41

ticketing

42

toys-and-hobbies

43

transportation

45

travel

46

vehicle-sales

47

vehicles-service-and-accessories

Security parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to to generate the signature

Category of the product item. For Indodana, the category should be based on these .

Payment method that will shown to users in Checkout Page. If you wish to showcase all available payment methods, simply omit sending this parameter, and all options will be visible. Alternatively, if you prefer to direct users to a specific payment method, include this parameter and specify the desired payment method by filling in its corresponding value. The value are listed .

This parameter is intended to override the configured Notification URL with another URL. Click for more information.

​
https://api-sandbox.doku.com/checkout/v1/payment
https://api.doku.com/checkout/v1/payment
this section
here
here
order
payment
customer
shipping_address
billing_address
additional_info
list