---
title: "Create Order API"
method: POST
path: "/orders"
---

# Create Order API

`POST /orders`

The following endpoint creates an Order

## Request body

- object
  - `amount` string, required — The amount for which the Order was created. Example: "10000" or "10000.23" for amount with decimal value
  - `currency` string, required — The currency associated with the Order's amount. Example: "IDR"
  - `customer` object, required — The customer fields including id, email, mobile, first_name, given_name, address json object, customer_ref_id. One of id, mobile, email is mandatory field whereas others are optional. address is mandatory to use BNPL payment method.
    - `id` string — The customer ID from Durianpay
    - `email` string — The customer's email address. Should of the format jane.doe@gmail.com and should not contain any invalid special characters (¢,£,§,©,etc)
    - `mobile` string — The customer's mobile number. Please ensure that the number follows Indonesia's phone number format : +62xxxxxxxxxx or 08xxxxxxxxxx.
    - `customer_ref_id` string — A unique reference ID from the merchant to identify the customer
    - `given_name` string — The customer's given name
    - `middle_name` string — The customer's middle name
    - `sur_name` string — The customer's surname
    - `address` object — The address fields includes receiver_name, receiver_phone, label, address_line, city, region, postal_code, landmark
      - `receiver_name` string
      - `label` string
      - `address_line` string
      - `city` string
      - `region` string
      - `postal_code` string
      - `landmark` string
  - `payment_option` string — The type of payment option with which order was created. Possible values: "full_payment" or "installment"
  - `order_ref_id` string — The unique identifier of Order from the merchant. Example: "INV/1/2021"
  - `items` object[] — Array of objects with each object including name, brand, category, sku, price, qty, total_price. mandatory to use BNPL and LINKAJA payment method
    - `name` string, required — The item's name
    - `qty` integer, required — The quantity of the item
    - `price` string, required — The price for a single item
    - `logo` string — The URL for the logo of the item
    - `brand` string — The brand of the item
    - `category` string — The category of the item
    - `sku` string — The SKU (Stock Keeping Unit) of the item
    - `total_price` string — The total price of the item
    - `metadata` string — The metadata of the item
  - `description` string — String to store description of the order. Example: "This order is delicate. Handle with Care!"
  - `admin_fee_method` string — Used to specify if the transactional charges are to be included and paid by the merchant or customer. Possible Values: "included" - Transaction Fee is paid by merchant "excluded" - Transaction Fee is paid by customer
  - `metadata` string — Key-Value pair that can be used to store additional information about the entity.
  - `expiry_date` string — The time stamp at which the order will expire. Please ensure that the value is in RFC3339 format and the timezone is in GMT+7. Example: "2022-03-29T10:00:00.000Z"
  - `is_payment_link` boolean — Whether Payment Link is to be generated. Example: true or false

## Response `200`

200

- object
  - `data` object
    - `id` string
    - `customer_id` string
    - `order_ref_id` string
    - `order_ds_ref_id` string
    - `amount` string
    - `payment_option` string
    - `currency` string
    - `status` string
    - `created_at` string
    - `updated_at` string
    - `expiry_date` string
    - `metadata` object
      - `my-meta-key` string
      - `SettlementGroup` string
    - `items` object[]
      - `name` string
      - `qty` integer
      - `price` string
      - `logo` string
    - `access_token` string
    - `expire_time` string
    - `is_live` boolean
    - `fees` unknown
    - `shipping_fee` string
    - `admin_fee_method` string

## Other responses

- `400` — 400
- `401` — 401

---

[API](https://skmtc.net/durianpay/apis/durianpay-api.md) · [All operations](https://skmtc.net/durianpay/apis/durianpay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/durianpay/durianpay-api/versions/ffc0e7e8a227/schema)
