# Backend Integration

### Backend Integration to initiate payment[​](https://dashboard.doku.com/docs/docs/jokul-checkout/jokul-checkout-integration/#1-obtain-paymenturl-on-backend) <a href="#id-1-obtain-paymenturl-on-backend" id="id-1-obtain-paymenturl-on-backend"></a>

To obtain the `payment.url`, you will need to hit this API through your Backend :&#x20;

### Endpoint

<table><thead><tr><th width="241">Type</th><th>Value</th></tr></thead><tbody><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API endpoint (sandbox)</td><td><a href="https://api-sandbox.doku.com/checkout/v1/payment">https://api-sandbox.doku.com/checkout/v1/payment</a></td></tr><tr><td>API endpoint (production)</td><td><a href="https://api.doku.com/checkout/v1/payment">https://api.doku.com/checkout/v1/payment</a></td></tr></tbody></table>

***

### Request&#x20;

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 <a href="#id-1-obtain-paymenturl-on-backend" id="id-1-obtain-paymenturl-on-backend"></a>

<table><thead><tr><th width="167">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>client-id</code></strong></td><td>Client ID retrieved from DOKU Back Office</td></tr><tr><td><strong><code>request-id</code></strong></td><td>Unique random string (max 128 characters) generated from merchant side to protect duplicate request</td></tr><tr><td><strong><code>request-timestamp</code></strong></td><td>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</td></tr><tr><td><strong><code>signature</code></strong></td><td>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 <a href="../../../get-started-with-doku-api/signature-component/non-snap/signature-component-from-request-header">this section</a> to generate the signature</td></tr></tbody></table>

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 : &#x20;

{% tabs %}
{% tab title="Basic Request" %}

```json
{
    "order": {
        "amount": 20000,
        "invoice_number": "INV-20210231-0001"
    },
    "payment": {
        "payment_due_date": 60
    }
}
```

<table><thead><tr><th>Body Parameter</th><th width="122">Type</th><th>Mandatory</th><th valign="bottom">Description</th></tr></thead><tbody><tr><td><code>order.amount</code></td><td><code>number</code></td><td>Mandatory</td><td valign="bottom">In IDR Currency and without decimal<br>Max length: <code>12</code></td></tr><tr><td><code>order.invoice_number</code></td><td><code>string</code></td><td>Mandatory</td><td valign="bottom">Generated by merchant to identify the order. Max length: <code>64</code><br><strong>Notes:</strong> If you have Credit Card channel activated, the maximum length is <code>30</code> chars due to the acquirer's requirements<br><br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.</td></tr><tr><td><code>payment.payment_due_date</code></td><td><code>number</code></td><td>Optional</td><td valign="bottom">The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6</td></tr></tbody></table>

This basic request only could be implement for selected payment method, such as : &#x20;

1. Virtual Account
2. Credit Card
3. QRIS&#x20;
4. Convenience Store
5. E-money (OVO and Linkaja)
   {% endtab %}

{% tab title="Full Request" %}

```json
{
"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",
          "VIRTUAL_ACCOUNT_BNC",
          "VIRTUAL_ACCOUNT_BTN",
          "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**

<table><thead><tr><th width="187">Body Parameter</th><th>Description</th></tr></thead><tbody><tr><td><a href="#order-object">order</a></td><td>Information about the order items.</td></tr><tr><td><a href="#payment-object">payment</a></td><td>Information about payment relation.</td></tr><tr><td><a href="#customer-object">customer</a></td><td>Specific information regarding the customer.</td></tr><tr><td><a href="#shipping-address-object">shipping_address</a></td><td>Specific information regarding the shipping address. Some payment methods are required to send this parameter.</td></tr><tr><td><a href="#billing-address-object">billing_address</a></td><td>Specific information regarding the billing address. There is payment method that required to send this parameter.</td></tr><tr><td><a href="#additional-info-object">additional_info</a></td><td>Some additional information parameter in order to fulfill non-mandatory parameters</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

#### Order object

```json
{
"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"
    }
  ]
}
```

<table><thead><tr><th>Body Parameter</th><th width="110">Type`</th><th width="151">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>order.amount</code></td><td>number</td><td>Mandatory</td><td>Order amount in IDR currency and without decimal. <br>Max length: <code>12</code></td></tr><tr><td><code>order.invoice_number</code></td><td>string</td><td>Mandatory</td><td><p>Unique identifier generated by merchant to identify the order.</p><p>Max length: <code>64</code>, except credit card which 30 chars only <br><br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.</p></td></tr><tr><td><code>order.currency</code></td><td>string</td><td>Optional</td><td>3 alphabetic currency code ISO 4217<br>Min-max Length: <code>3</code><br>Default value: <code>IDR</code></td></tr><tr><td><code>order.callback_url</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Jenius</strong>.</td><td>The "Back to Merchant" button is configured using the URL provided in <code>callback_url</code>. If only <code>callback_url</code> 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 <code>callback_url_result</code>, then <code>callback_url</code> will only affect the "Back to Merchant" button on the main page, while <code>callback_url_result</code> will specifically affect the button on the result page.</td></tr><tr><td><code>order.callback_url_cancel</code></td><td>string</td><td>Conditional,<br>Currently only available for payment methods : <strong>Indodana</strong></td><td>The URL specified for merchant redirection in the event of order cancellation.</td></tr><tr><td><code>order.callback_url_result</code></td><td>string</td><td>Optional</td><td>The URL designated for button "Back to merchant" in result page. </td></tr><tr><td><code>order.language</code></td><td>string</td><td>Optional</td><td>Default language shown when redirect to checkout page<br>Max length: <code>2</code></td></tr><tr><td><code>order.auto_redirect</code></td><td>boolean</td><td>Mandatory</td><td>When set to <strong>true</strong>, the transaction result page redirects to the callback URL; otherwise, it redirects to the payment result page.</td></tr><tr><td><code>order.disable_retry_payment</code></td><td>boolean</td><td>Conditional,<br>Only applied for payment methods : <code>Credit Card</code>, <code>DOKU Wallet</code>, <code>Akulaku</code>, <code>OVO</code>, <code>ShopeePay</code></td><td>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.</td></tr><tr><td><code>order.recover_abandoned_cart</code></td><td>boolean</td><td>Conditional, only applicable for VA, O2O, and Credit Card</td><td>If you bring this parameter and set as <code>true</code>, your customer can recover their order than has been expired as long as the <code>expired_recover_cart</code> is not due yet.</td></tr><tr><td><code>order.expired_recovered_cart</code></td><td>number</td><td>Conditional, only applicable for VA, O2O, and Credit Card</td><td>This is the expired time of the order that is already recovered. The expired time's max length is 44640 minutes.</td></tr><tr><td><code>order.line_items.id</code></td><td>string</td><td>Conditional<br>Mandatory for Payment Methods : <strong>Akulaku, Kredivo, Indodana, Allobank</strong></td><td>Item ID of the item in this transaction.<br>Max Length: <code>64</code><br><br><code>Note :</code><br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol on Invoice number value.</td></tr><tr><td><code>order.line_items.name</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Jenius</strong>, <strong>Kredivo, Indodana, KKI, Akulaku, Allobank</strong></td><td>Name of the product item.<br>Max Length: <code>255</code><br><br><code>Note</code> <br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.</td></tr><tr><td><code>order.line_items.price</code></td><td>number</td><td>Conditional, <br>Mandatory for Payment Methods : <strong>Jenius</strong>, <strong>Kredivo, Akulaku, Indodana, KKI, Allobank</strong></td><td>Price of the product item. Total price and quantity must match with the <code>order.amount</code>.<br><br><code>Note</code> <br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.</td></tr><tr><td><code>order.line_items.quantity</code></td><td>number</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Jenius</strong>, <strong>Kredivo, Akulaku, Indodana, KKI, Allobank</strong></td><td>Quantity of the product item.<br><br><code>Note</code> <br>If you are using KKI, all the symbols are not allowed. Ensure you do not put any symbol.</td></tr><tr><td><code>order.line_items.sku</code></td><td>string</td><td>Conditional.<br>Mandatory for Payment Methods : <strong>Akulaku</strong>, <strong>Kredivo, Indodana</strong>.</td><td>SKU of the product item. </td></tr><tr><td><code>order.line_items.category</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Akulaku</strong>, <strong>Kredivo, Indodana</strong>.</td><td>Category of the product item. For Indodana, the category should be based on these <a href="#list-category">list</a>.</td></tr><tr><td><code>order.line_items.url</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Kredivo</strong> </td><td>URL to the product item on merchant site. </td></tr><tr><td><code>order.line_items.image_url</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Indodana</strong></td><td>URL the image of the product item on merchant site.</td></tr><tr><td><code>order.line_items.type</code></td><td>string</td><td>Conditional,<br>Mandatory for Payment Methods : <strong>Indodana, Kredivo</strong></td><td>Type of the item in this transaction.</td></tr></tbody></table>

#### Payment Object

```json
"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"
      ]
  }
```

<table><thead><tr><th>Body parameter</th><th width="96">Type</th><th width="113">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>payment.payment_method_types</code></td><td>array</td><td>optional</td><td>Payment method that will shown to users in Checkout Page. <br>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.<br>The value are listed <a href="../supported-payment-methods">here</a>.</td></tr><tr><td><code>payment.type</code></td><td>string</td><td>Optional</td><td><strong>Possible Value :</strong>  <br><code>"SALE", "INSTALLMENT", "AUTHORIZE"</code><br><br>If you set the type as Authorize, the status will be stated as <strong>On Hold.</strong> <br>The status will change, if the customer do payment. <br><br>Only applicable in Credit Card.</td></tr><tr><td><code>payment.payment_due_date</code></td><td>number</td><td>optional</td><td>The payment due date of the checkout page in minutes. Default : 60 minutes. Max Length: 6</td></tr></tbody></table>

#### Customer Object

```json
"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"
}
```

<table><thead><tr><th width="203">Body parameter</th><th width="96">Type</th><th width="128">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>customer.id</code></td><td>string</td><td>Conditional, mandatory to enable tokenized payments (BRI Direct Debit, Allobank, Credit Card tokenization) and Akulaku Paylater.</td><td>Unique customer identifier generated by merchant.<br>Allowed chars: <code>alphabetic, numeric, special chars</code><br>Max Length: <code>50</code></td></tr><tr><td><code>customer.name</code></td><td>string</td><td>Conditional,<br>mandatory for payment methods <strong>Jenius, Akulaku, Indodana, Kredivo</strong></td><td>Customer name.<br><br>Allowed chars: <code>alphabetic</code><br>Max Length: <code>255</code></td></tr><tr><td><code>customer.last_name</code></td><td>string</td><td>Optional</td><td>Customer last name.<br>Max Length: <code>16</code></td></tr><tr><td><code>customer.email</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana, Kredivo, Allobank</strong></td><td>Customer email. <br>Allowed chars: <code>alphabetic, numeric, special chars</code><br>Max Length: <code>128</code></td></tr><tr><td><code>customer.phone</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana, Akulaku, Kredivo</strong></td><td>Customer phone number. Format: <code>{calling_code}{phone_number}</code>.<br>Example: 6281122334455<br>Max Length: <code>16</code></td></tr><tr><td><code>customer.address</code></td><td>string</td><td>Conditional, <br>mandatory for payment method <strong>Akulaku</strong></td><td>Customer address.<br>Allowed chars: <code>alphabetic, numeric, special chars</code><br>Max Length: <code>400</code></td></tr><tr><td><code>customer.postcode</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Akulaku</strong></td><td>Customer address' post code</td></tr><tr><td><code>customer.state</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Akulaku</strong></td><td>Customer state or province. </td></tr><tr><td><code>customer.city</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Akulaku</strong></td><td>Customer address' city</td></tr><tr><td><code>customer.country</code></td><td>string</td><td>Optional</td><td>2 alphabetic country code ISO 3166-1<br>Allowed chars: <code>alphabetic</code><br>Min-max Length: <code>2</code></td></tr></tbody></table>

#### Shipping Address Object

```json
"shipping_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
}
```

<table><thead><tr><th>Body Parameter</th><th width="104">Type</th><th width="199">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>shipping_address.first_name</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>Customer's first name used as shipping address</td></tr><tr><td><code>shipping_address.last_name</code></td><td>string</td><td>Optional</td><td>Customer's last name used as shipping address.</td></tr><tr><td><code>shipping_address.address</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>Customer's address used as shipping address.</td></tr><tr><td><code>shipping_address.city</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>City of customer's shipping address.</td></tr><tr><td><code>shipping_address.postal_code</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>Postal code of customer's shipping address.</td></tr><tr><td><code>shipping_address.phone</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>Customer's phone used as shipping address.</td></tr><tr><td><code>shipping_address.country_code</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Kredivo and Indodana</strong></td><td>Country of customer's shipping address.</td></tr></tbody></table>

#### Billing Address Object

```json
"billing_address":{
  "first_name":"Joe",
  "last_name":"Doe",
  "address":"Jalan DOKU no 15",
  "city":"Jakarta",
  "postal_code":"11923",
  "phone":"081312345678",
  "country_code":"IDN"
}
```

<table><thead><tr><th>Body Parameter</th><th width="104">Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>billing_address.first_name</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Customer's first name used as billing address</td></tr><tr><td><code>billing_address.last_name</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Customer's last name used as billing address.</td></tr><tr><td><code>billing_address.address</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Customer's address used as billing address.</td></tr><tr><td><code>billing_address.city</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>City of customer's billing address.</td></tr><tr><td><code>billing_address.postal_code</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Postal code of customer's billing address.</td></tr><tr><td><code>billing_address.phone</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Customer's phone used as billing address.</td></tr><tr><td><code>billing_address.country_code</code></td><td>string</td><td>Conditional,<br>mandatory for payment method <strong>Indodana</strong></td><td>Country of customer's billing address.</td></tr></tbody></table>

#### Additional Info Object

```json
"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"
}
```

<table><thead><tr><th>Body parameter</th><th width="80">Type</th><th>Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>additional_info.allow_tenor</code></td><td>number</td><td>Optional</td><td>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.</td></tr><tr><td><code>additional_info.doku_wallet_notify_url</code></td><td>string</td><td>Conditional, only for payment method DOKU Wallet</td><td>Notification url set in this parameter</td></tr><tr><td><code>additional_info.override_notification_url</code></td><td>string</td><td>Optional</td><td>This parameter is intended to override the configured <code>Notification URL</code> with another URL.  Click <a href="../../../get-started-with-doku-api/notification/override-notification-url">here</a> for more information.</td></tr></tbody></table>

### **Response**

**Success Response**&#x20;

<table><thead><tr><th width="152">Type</th><th>Value</th></tr></thead><tbody><tr><td>HTTP Status</td><td>200</td></tr></tbody></table>

{% tabs %}
{% tab title="Basic Response" %}

```json
{
    "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"
        }
    }
}
```

{% endtab %}

{% tab title="Full Response" %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "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"
        }
    }
}
</code></pre>

{% endtab %}
{% endtabs %}

**Response Body Explanation**

<table><thead><tr><th>Body Parameter</th><th width="104">Type</th><th width="115">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td>array</td><td>Mandatory</td><td>Message will display the result of the request. If there are some errors on your request, they will be diplayed in this parameter.</td></tr><tr><td><code>response.order.amount</code></td><td>number</td><td>Mandatory</td><td>Same as the request </td></tr><tr><td><code>response.order.invoice_number</code></td><td>string</td><td>Mandatory</td><td>Same as the request </td></tr><tr><td><code>response.order.currency</code></td><td>string</td><td>Optional</td><td>Same as the request  </td></tr><tr><td><code>response.order.session_id</code></td><td>string</td><td>Optional</td><td>Unique session ID generated by DOKU</td></tr><tr><td><code>response.order.callback_url</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.callback_url_cancel</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.recover_abandoned_cart</code></td><td>boolean</td><td>Conditional</td><td>Same as the request</td></tr><tr><td><code>response.order.expired_recovered_cart</code></td><td>number</td><td>Conditional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.quantity</code></td><td>number</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.price</code></td><td>number</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.sku</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.category</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.url</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.image_url</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.line_items.type</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.language</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.disable_retry_payment</code></td><td>boolean</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.order.auto_redirect</code></td><td>boolean</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.payment.payment_method_types</code></td><td>array</td><td>Optional</td><td>Payment method that will be displayed on the Checkout Page</td></tr><tr><td><code>response.payment.payment_due_date</code></td><td>number</td><td>Mandatory</td><td>Same as the request</td></tr><tr><td><code>response.payment.token_id</code></td><td>string</td><td>Mandatory</td><td>Token generated by DOKU for the Checkout Page</td></tr><tr><td><code>response.payment.url</code></td><td>string</td><td>Mandatory</td><td>Checkout page URL to display for the customer</td></tr><tr><td><code>response.payment.expired_date</code></td><td>string</td><td>Mandatory</td><td>Date time of payment page will be expired with the format of <code>yyyyMMddHHmmss</code>. The expired date uses UTC+7 time. Use this to set the expiry order on merchant side</td></tr><tr><td><code>response.customer.id</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.state</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.city</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.postcode</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.email</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.phone</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.last_name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.address</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.customer.country</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.additional_info.allow_tenor</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.additional_info.close_redirect</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.additional_info.doku_wallet_notify_url</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.additional_info.override_notification_url</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.uuid</code></td><td>string</td><td>Optional</td><td>Unique number generated by DOKU</td></tr><tr><td><code>response.headers.requestId</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.headers.signature</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.headers.date</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.headers.clientId</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.address</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.city</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.phone</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.first_name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.last_name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.postal_code</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.shipping_address.country_code</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.address</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.city</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.phone</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.first_name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.first_name</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.postal_code</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr><tr><td><code>response.billing_address.country_code</code></td><td>string</td><td>Optional</td><td>Same as the request</td></tr></tbody></table>

**Failed Response**

<table><thead><tr><th width="152">Type</th><th>Value</th></tr></thead><tbody><tr><td>HTTP Status</td><td>400</td></tr></tbody></table>

```json
{
    "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.`

<table><thead><tr><th width="86">No</th><th>Category</th></tr></thead><tbody><tr><td>1</td><td>airlines</td></tr><tr><td>2</td><td>arts-crafts-and-collectibles</td></tr><tr><td>3</td><td>automotive</td></tr><tr><td>4</td><td>baby</td></tr><tr><td>5</td><td>beauty-and-fragrances</td></tr><tr><td>6</td><td>biller</td></tr><tr><td>7</td><td>books-and-magazines</td></tr><tr><td>8</td><td>business-to-business-including-mlm</td></tr><tr><td>9</td><td>charity-and-non-profit</td></tr><tr><td>10</td><td>clothing</td></tr><tr><td>11</td><td>community</td></tr><tr><td>12</td><td>digital-content</td></tr><tr><td>13</td><td>electronics-and-telecom</td></tr><tr><td>14</td><td>entertainment-and-media</td></tr><tr><td>15</td><td>fee</td></tr><tr><td>16</td><td>financial-services-and-products</td></tr><tr><td>17</td><td>financial-services-and-technology</td></tr><tr><td>18</td><td>food-and-beverage</td></tr><tr><td>19</td><td>food-retail-and-service</td></tr><tr><td>20</td><td>games-voucher</td></tr><tr><td>21</td><td>gifts-and-flowers</td></tr><tr><td>22</td><td>government</td></tr><tr><td>23</td><td>health-and-personal-care</td></tr><tr><td>24</td><td>home-and-garden</td></tr><tr><td>25</td><td>hotel-and-travel</td></tr><tr><td>26</td><td>insurance</td></tr><tr><td>27</td><td>marketplace</td></tr><tr><td>28</td><td>nonprofit</td></tr><tr><td>29</td><td>offline-store</td></tr><tr><td>30</td><td>others</td></tr><tr><td>31</td><td>over-the-air</td></tr><tr><td>32</td><td>overseas</td></tr><tr><td>33</td><td>pets-and-animals</td></tr><tr><td>34</td><td>property</td></tr><tr><td>35</td><td>public-services</td></tr><tr><td>36</td><td>religion-and-spirituality</td></tr><tr><td>37</td><td>retail</td></tr><tr><td>38</td><td>services</td></tr><tr><td>39</td><td>sports-and-outdoors</td></tr><tr><td>40</td><td>telco</td></tr><tr><td>41</td><td>ticketing</td></tr><tr><td>42</td><td>toys-and-hobbies</td></tr><tr><td>43</td><td>transportation</td></tr><tr><td>45</td><td>travel</td></tr><tr><td>46</td><td>vehicle-sales</td></tr><tr><td>47</td><td>vehicles-service-and-accessories</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.doku.com/accept-payments/doku-checkout/integration-guide/backend-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
