v1

latestOpenAPI 3.1.02026-07-26500375.1 KB

Create Order API

The following endpoint creates an Order

post/orders

Request body

amountstring required

The amount for which the Order was created. Example: "10000" or "10000.23" for amount with decimal value

currencystring required

The currency associated with the Order's amount. Example: "IDR"

payment_optionstring

The type of payment option with which order was created. Possible values: "full_payment" or "installment"

order_ref_idstring

The unique identifier of Order from the merchant. Example: "INV/1/2021"

descriptionstring

String to store description of the order. Example: "This order is delicate. Handle with Care!"

admin_fee_methodstring

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

metadatastring

Key-Value pair that can be used to store additional information about the entity.

expiry_datestring

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_linkboolean

Whether Payment Link is to be generated. Example: true or false

Response

200

Example response

{
  "data": {
    "id": "ord_0dIWbuDJQ84078",
    "customer_id": "cus_ViPeX4iBYp2233",
    "order_ref_id": "order_ref_001",
    "amount": "10001.00",
    "payment_option": "full_payment",
    "currency": "IDR",
    "status": "started",
    "created_at": "2021-04-01T14:39:37.860426Z",
    "updated_at": "2021-04-01T14:39:37.860426Z",
    "expiry_date": "2022-03-29T10:00:00Z",
    "metadata": {
      "my-meta-key": "my-meta-value",
      "SettlementGroup": "BranchName"
    },
    "items": [
      {
        "name": "LED Television",
        "qty": 1,
        "price": "10001.00",
        "logo": "https://merchant.com/tv_image.jpg"
      }
    ],
    "access_token": "adsyoi12sdASd123ASX@qqsda231",
    "expire_time": "2022-09-15T13:40:17.064478772Z",
    "is_live": true,
    "admin_fee_method": "included"
  }
}