> For the complete documentation index, see [llms.txt](https://developers.doku.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.doku.com/accept-payments/direct-api/non-snap/paylater/indodana.md).

# Indodana

DOKU has partenered with various Paylater Providers and one of them is Indodana to provide Buy Now Pay Later. Learn more about how DOKU can help you integrate with Indodana here.

***

### Integration steps <a href="#integration-steps" id="integration-steps"></a>

Here is the overview of how to integrate with Indodana:

1. Obtain `payment.url` by generating order
2. Display Indodana payment page to customer
3. Acknowledge payment result

<figure><img src="/files/o9ZvaugNvqXZRmuYmx6A" alt=""><figcaption></figcaption></figure>

***

#### 1. Obtain `payment.url` by generating order <a href="#id-1-obtain-paymenturl-by-generating-order" id="id-1-obtain-paymenturl-by-generating-order"></a>

## Generate Order / Obtain payment.url

> Creates an order and generates the payment page URL for Indodana Paylater. Merchants redirect customers to this URL to complete the payment.

```json
{"openapi":"3.0.3","info":{"title":"DOKU Indodana Paylater API","version":"2.0.0"},"servers":[{"url":"https://api-sandbox.doku.com","description":"Sandbox Environment"},{"url":"https://api.doku.com","description":"Production Environment"}],"paths":{"/indodana-peer-to-peer/v2/generate-order":{"post":{"summary":"Generate Order / Obtain payment.url","description":"Creates an order and generates the payment page URL for Indodana Paylater. Merchants redirect customers to this URL to complete the payment.","operationId":"generateOrder","parameters":[{"name":"Client-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Client ID retrieved from DOKU Back Office"},{"name":"Request-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Unique random string (max 128 characters) generated from merchant side to protect duplicate request"},{"name":"Request-Timestamp","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Timestamp request on UTC time in ISO8601 UTC+0 format (e.g. yyyy-MM-ddTHH:mm:ssZ)"},{"name":"Signature","in":"header","required":true,"schema":{"type":"string"},"description":"HMAC-SHA256 signature generated using Merchant Client Secret"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOrderRequest"}}}},"responses":{"200":{"description":"SUCCESS","headers":{"Client-Id":{"schema":{"type":"string"},"description":"Same as the request"},"Request-Id":{"schema":{"type":"string"},"description":"Same as the request"},"Response-Timestamp":{"schema":{"type":"string","format":"date-time"},"description":"Timestamp Response on UTC with format ISO8601 UTC+0 from DOKU"},"Signature":{"schema":{"type":"string"},"description":"Signature generated by DOKU based on the response body"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOrderResponse"}}}}}}}},"components":{"schemas":{"GenerateOrderRequest":{"type":"object","required":["order","peer_to_peer_info","customer","billing_address"],"properties":{"order":{"$ref":"#/components/schemas/OrderRequest"},"peer_to_peer_info":{"$ref":"#/components/schemas/PeerToPeerInfoRequest"},"customer":{"$ref":"#/components/schemas/Customer"},"billing_address":{"$ref":"#/components/schemas/Address"},"shipping_address":{"$ref":"#/components/schemas/Address"},"additional_info":{"$ref":"#/components/schemas/AdditionalInfo"}}},"OrderRequest":{"type":"object","required":["invoice_number","amount","line_items","callback_url_cancel"],"properties":{"invoice_number":{"type":"string","maxLength":64,"description":"Generated by merchant to identify the order and must be unique per request. Allowed chars: alphabetic, numeric, special chars."},"amount":{"type":"integer","description":"In IDR currency and without decimal. Allowed chars: numeric. Max length: 16."},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}},"callback_url":{"type":"string","maxLength":256,"description":"Merchant URL that the customer will be redirected to after the order is completed."},"callback_url_cancel":{"type":"string","maxLength":256,"description":"Merchant URL that the customer will be redirected to if the order is cancelled."}}},"LineItem":{"type":"object","required":["name","price","quantity","id","category"],"properties":{"name":{"type":"string","maxLength":128,"description":"Name of the product item."},"price":{"type":"number","description":"Price of the product item. Total price and quantity must match with the order.amount. Max length 16.2."},"quantity":{"type":"integer","description":"Quantity of the product item. Max length 8."},"id":{"type":"string","maxLength":64,"description":"SKU/item ID of the item in this transaction."},"category":{"type":"string","description":"Category of the item in this transaction.","enum":["airlines","arts-crafts-and-collectibles","automotive","baby","beauty-and-fragrances","biller","books-and-magazines","business-to-business-including-mlm","charity-and-non-profit","clothing","community","digital-content","electronics-and-telecom","entertainment-and-media","financial-services-and-products","financial-services-and-technology","food-and-beverage","food-retail-and-service","games-voucher","gifts-and-flowers","government","health-and-personal-care","home-and-garden","hotel-and-travel","insurance","marketplace","nonprofit","offline-store","others","over-the-air","overseas","pets-and-animals","property","public-services","religion-and-spirituality","retail","services","sports-and-outdoors","telco","ticketing","toys-and-hobbies","transportation","travel","vehicle-sales","vehicles-service-and-accessories"]},"url":{"type":"string","maxLength":256,"description":"URL of the product in the merchant site/platform."},"image_url":{"type":"string","maxLength":256,"description":"URL of the image of the product in the merchant site/platform."},"type":{"type":"string","description":"Type of the item in this transaction."}}},"PeerToPeerInfoRequest":{"type":"object","required":["merchant_unique_reference"],"properties":{"expired_time":{"type":"integer","description":"Order expired time in minutes. Max length: 5."},"merchant_unique_reference":{"type":"string","description":"Unique reference number generated by merchant."}}},"Customer":{"type":"object","required":["first_name","email","phone"],"properties":{"first_name":{"type":"string","maxLength":16,"description":"Customer first name."},"last_name":{"type":"string","maxLength":16,"description":"Customer last name."},"email":{"type":"string","format":"email","description":"Customer email address."},"phone":{"type":"string","maxLength":16,"description":"Customer phone number. Format: {calling_code}{phone_number} without '+' prefix. Example: 6281122334455"}}},"Address":{"type":"object","required":["first_name","address","city","postal_code","phone","country_code"],"properties":{"first_name":{"type":"string","description":"Address first name."},"last_name":{"type":"string","description":"Address last name."},"address":{"type":"string","description":"Address details of the customer/shopper."},"city":{"type":"string","description":"City of the address."},"postal_code":{"type":"string","description":"Postal code of the address."},"phone":{"type":"string","description":"Phone number for the address."},"country_code":{"type":"string","description":"Three-letter ISO country code (e.g., IDN)."}}},"AdditionalInfo":{"type":"object","properties":{"override_notification_url":{"type":"string","format":"uri","description":"This parameter overrides the default Notification URL configured in DOKU Back Office."}}},"GenerateOrderResponse":{"type":"object","required":["order","payment","peer_to_peer_info"],"properties":{"order":{"type":"object","required":["amount","invoice_number"],"properties":{"amount":{"type":"integer","description":"Same as the request."},"invoice_number":{"type":"string","description":"Same as the request."}}},"payment":{"type":"object","required":["status","url"],"properties":{"status":{"type":"string","enum":["PENDING","FAILED"],"description":"The current payment status."},"url":{"type":"string","format":"uri","description":"Indodana payment page URL to display to the customer."}}},"peer_to_peer_info":{"$ref":"#/components/schemas/PeerToPeerInfoResponse"},"additional_info":{"$ref":"#/components/schemas/AdditionalInfo"}}},"PeerToPeerInfoResponse":{"type":"object","required":["merchant_unique_reference"],"properties":{"identifier":{"type":"array","description":"List of transaction identifiers coming from acquiring. Merchant can save these for reference.","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"merchant_unique_reference":{"type":"string","description":"Same as the request."},"created_date":{"type":"string","description":"Date time of Indodana order generation with the format yyyyMMddHHmmss."},"expired_date":{"type":"string","description":"Date time of Indodana order expiration with the format yyyyMMddHHmmss."},"created_date_utc":{"type":"string","format":"date-time","description":"Date time of Indodana order generation in UTC format."},"expired_date_utc":{"type":"string","format":"date-time","description":"Date time of Indodana order expiration in UTC format."}}}}}}
```

#### 2. Display Indodana payment page to customer <a href="#id-2-display-indodana-payment-page-to-customer" id="id-2-display-indodana-payment-page-to-customer"></a>

Once you have the `payment.url`, you can now display the payment page by redirecting your customer to the Indodana payment page.

After the customer completed the payment, they will be redirected to the defined `order.callback_url` that you set on the API request.

***

#### 3. Acknowledge payment result <a href="#id-3-acknowledge-payment-result" id="id-3-acknowledge-payment-result"></a>

After the payment is being made by your customer, DOKU will send **HTTP Notification** to your defined `Notification URL`. Learn how to handle the notification from DOKU:

* [Handling DOKU HTTP Notification](/get-started-with-doku-api/notification/http-notification-sample-for-snap.md)

***

### Additional features <a href="#additional-features" id="additional-features"></a>

We provide various additional features to suited your needs. Learn more here.

## Refund Order / Void Transaction

> Refunds a transaction that has been completed using Indodana Paylater.

```json
{"openapi":"3.0.3","info":{"title":"DOKU Indodana Paylater API","version":"2.0.0"},"servers":[{"url":"https://api-sandbox.doku.com","description":"Sandbox Environment"},{"url":"https://api.doku.com","description":"Production Environment"}],"paths":{"/indodana-peer-to-peer/v2/refund":{"post":{"summary":"Refund Order / Void Transaction","description":"Refunds a transaction that has been completed using Indodana Paylater.","operationId":"refundOrder","parameters":[{"name":"Client-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Client ID retrieved from DOKU Back Office"},{"name":"Request-Id","in":"header","required":true,"schema":{"type":"string"},"description":"Unique random string (max 128 characters) generated from merchant side to protect duplicate request"},{"name":"Request-Timestamp","in":"header","required":true,"schema":{"type":"string","format":"date-time"},"description":"Timestamp request on UTC time in ISO8601 UTC+0 format"},{"name":"Signature","in":"header","required":true,"schema":{"type":"string"},"description":"HMAC-SHA256 signature generated using Merchant Client Secret"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"SUCCESS","headers":{"Client-Id":{"schema":{"type":"string"},"description":"Same as the request"},"Request-Id":{"schema":{"type":"string"},"description":"Same as the request"},"Response-Timestamp":{"schema":{"type":"string","format":"date-time"},"description":"Response timestamp in ISO 8601 format"},"Signature":{"schema":{"type":"string"},"description":"HMAC SHA256 signature for response authentication"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponse"}}}}}}}},"components":{"schemas":{"RefundRequest":{"type":"object","required":["order","peer_to_peer_info","payment","refund"],"properties":{"order":{"type":"object","required":["invoice_number"],"properties":{"invoice_number":{"type":"string","description":"The invoice number of the order to refund."}}},"peer_to_peer_info":{"type":"object","required":["merchant_unique_reference","identifier"],"properties":{"merchant_unique_reference":{"type":"string","description":"The unique reference number of the original order generated by the merchant."},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}}}},"payment":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}}}},"refund":{"type":"object","required":["merchant_unique_reference","amount","reason","cancelled_by"],"properties":{"merchant_unique_reference":{"type":"string","description":"A unique reference number generated by the merchant for this refund request."},"amount":{"type":"integer","description":"The refund amount."},"reason":{"type":"string","description":"The reason for the refund."},"cancelled_by":{"type":"string","description":"Name of the person/role requesting the refund."}}}}},"Identifier":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"Identifier key name."},"value":{"type":"string","description":"Identifier value."}}},"RefundResponse":{"type":"object","required":["order","payment","refund","transaction","peer_to_peer_info"],"properties":{"order":{"type":"object","required":["amount","invoice_number"],"properties":{"amount":{"type":"integer","description":"Refunded amount."},"invoice_number":{"type":"string","description":"Invoice number of the order."}}},"payment":{"type":"object","required":["status","identifier"],"properties":{"status":{"type":"string","description":"Payment refund status."},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}}}},"refund":{"type":"object","required":["status","amount","reason","identifier","merchant_unique_reference","cancelled_by"],"properties":{"status":{"type":"string","description":"Status of the refund request."},"amount":{"type":"integer","description":"Refunded amount."},"reason":{"type":"string","description":"Reason for the refund."},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"merchant_unique_reference":{"type":"string","description":"Refund unique reference."},"cancelled_by":{"type":"string","description":"Name of the person/role requesting the refund."}}},"transaction":{"type":"object","required":["status","date","original_request_id"],"properties":{"status":{"type":"string","description":"Transaction status."},"date":{"type":"string","format":"date-time","description":"Timestamp of the transaction update."},"original_request_id":{"type":"string","description":"Request ID of the original transaction."}}},"peer_to_peer_info":{"type":"object","required":["status","identifier","merchant_unique_reference"],"properties":{"status":{"type":"string","description":"P2P status."},"identifier":{"type":"array","items":{"$ref":"#/components/schemas/Identifier"}},"merchant_unique_reference":{"type":"string","description":"P2P unique reference."}}}}}}}}
```

#### Split Settlement <a href="#split-settlement" id="split-settlement"></a>

If you are a platform or a marketplace, you can use this feature to settle the funds to your sellers or partners programmatically, save many operational efforts.

* [Settlement](#split-settlement)
