createOrder

POST /v2/pds/order/createOrder

When a user creates an order and makes a payment in the F&B (food and beverage) mini program, D-store Platform calls this API to request the SaaS provider or ISV to create the order for the user.

The message structure of this API is defined by D-store Platform. Follow the specifications below when the SaaS provider or ISV develops this API.

Note: When you receive the order creation request, calculate paymentAmount first. If paymentAmount does not match the calculation, check which item information is not synchronized and call the syncStore API to update the item information.

Before you begin

Before you integrate with this API, it is recommended to learn the following basic concepts:

  • Eat-before-payment

Eat-before-payment is a dining scenario where the users enjoy their meals first and check out later. In mini programs, this dining scenario is only applicable to dining-in orders and allows users to add items to their original order by placing multiple additional orders.

  • Main order

A main order is the combination of the first order and all additional orders placed for one single dining experience. This type of order is available only in the eat-before-payment scenario and can have one or more subordinate orders.

  • Subordinate order

A subordinate order is the first order or an additional order placed for one single dining experience. This type of order is available only in the eat-before-payment scenario and related to a main order.

  • Whole order

A whole order is a dining-in order placed with a payment, which users cannot add items to. This concept is used to refer to dining-in orders that are not placed in the eat-before-payment scenario.

Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:

Request parameters

Field

Data type

Required

Description

Example

appId

String

No

Indicates the unique ID assigned by Mini Program Platform to identify a mini program.

  • Maximum length: 32 characters
  • Characters not allowed: special characters such as @ # ?

Note: Obtain this parameter value by calling the my.getAppIdSync JSAPI or from Mini Program Platform.

"2102010113769***"

requestId

String

Yes

Indicates the unique ID assigned by D-store Platform to identify an order creation request.

  • Maximum length: 255 characters

Note: This field is an API idempotency field. For the createOrder requests that are initiated with the same requestId value, the SaaS provider or ISV must return the same result. For details about API idempotency, see the Idempotency chapter.

"2022012111061234567890"

requestOrderId

String

Yes

Indicates the unique ID assigned by D-store Platform to identify an order.

Maximum length: 255 characters

-

paymentAmount

Integer

Yes

Indicates the amount of a payment, which is in the currency's smallest unit. For example, 10000 means 100.00 in SGD.

Value range: 0-2147483647

Note: To learn how paymentAmount is calculated, see paymentAmount.

10000

currency

String

Yes

The three-character currency code that follows ISO-4217. For example, SGD, USD, CNY.

"SGD"

paymentTime

Datetime

Yes

Indicates the time when the payment is made successfully.

The value follows the ISO 8601 standard format.

"2019-11-27T12:01:01+08:30"

buyerName

String

No

Indicates the name of the user.

Maximum length: 64 characters

-

mobileNo

String

No

Indicates the phone number of the user.

Maximum length: 64 characters

"9867*****"

areaCode

String

No

Indicates the country code dialed before the phone number.

Maximum length: 10 characters

"65"

email

String

No

Indicates the email address of the user.

Maximum length: 64 characters

"email@example.com"

orderType

String

Yes

Indicates the type of the order.

Valid values are:

  • PICKUP: Food that is picked up by users themselves.
  • DINEIN: Food that is eaten in the restaurant where it is ordered.
  • DELIVERY: Food that requests delivery to a specific destination.

"PICKUP"

areaId

String

No

Indicates the unique ID assigned by the SaaS provider or ISV to identify a shopping area, such as a hawker center.

  • Maximum length: 255 characters

Note: This field is required when the store belongs to a shopping area, for example, a hawker center.

-

storeId

String

Yes

Indicates the unique ID assigned by the SaaS provider or ISV to identify a store, such as a hawker or a restaurant.

  • Maximum length: 255 characters

Note: If the order items come from a different store, pass the first store ID. Other store IDs need to be passed in the OrderItem object.

-

tableNo

String

No

Indicates the table number for the order.

  • Maximum length: 64 characters

Note: This field is required when the value of orderType is DINEIN and the value of extendInfo.dineInScene is TABLE.

-

pickUpTime

Datetime

No

Indicates the pickup or dine-in time the user chooses.

The value follows the ISO 8601 standard format.

Note: This field is required when the value of orderType is PICKUP or DINEIN.

"2019-11-27T12:01:01+08:30"

orderItems

Array<OrderItem>

Yes

Indicates a list of the order items.

Maximum size: 120 elements

-

deliveryDetail

DeliveryDetail

No

Indicates the delivery details of the user, for example, the delivery address or expected delivery time.

Note: This field is required when the value of orderType is DELIVERY.

-

cutleryNumber

Integer

No

Indicates how much cutlery is required.

Value range: 0-1000

Note: This field is required when the value of orderType is DELIVERY.

1

orderAmountDetail

OrderAmountDetail

Yes

Indicates the amount details of the order, for example, item cost, takeaway charge, or delivery fee.

-

promoDetails

Array<PromoDetail>

No

Indicates the details of the promotion.

Maximum size: 30 elements

-

extendInfo

Map<String,String>

No

Indicates the extended information about this API.

  • Maximum length: 2048 characters

Note:

  • consultId: indicates the unique ID assigned by the SaaS provider or ISV to identify a consultation.
  • brandId: indicates the unique ID assigned by the SaaS provider or ISV to identify a brand.
  • storeSnapshot: indicates the snapshot of the store. This parameter is in JSON format containing an OrderStoreSnapshot object.
  • memoToSeller: indicates the special notes left by the user regarding the order.
  • quotationId: indicates the ID to identify a quotation.
  • dineInScene: indicates the scene of a dine-in order. Valid values are:
    • TABLE: Order at the eatery and enjoy without queueing.
    • QUEUE: Order while queueing at the eatery.
    • RESERVATION: Order in advance and dine later.
  • numberOfPax: indicates the number of people who dine together.
  • cardNo: indicates the unique card number generated by D-store Platform to identify a membership card.
  • paymentMethodAmountDetails: indicates the payment method and corresponding amount paid for the order. Valid values are:
    • BALANCE: The details of the amount paid by the user with the balance, which is in JSON format containing an Amount object. The merchant needs to deduct the balance.
    • POINT: The details of the amount paid by the user with the reward points. The merchant needs to convert the amount into a corresponding number of points and deduct the points.
    • CHOPE: The details of the amount paid by the user with the Chope app.
    • DSTORE_WEB: The details of the amount paid by the user on the web page using the merchant's contracted acquirer.
  • mainOrderId: Indicates the unique ID assigned by D-store Platform to identify a main order. This parameter is specified when the order is placed in the eat-before-payment scenario.
  • orderMode: Indicates whether the order is an eat-before-payment order. This parameter is used to pass a string, and its valid values are:
    • PAY_FIRST: Indicates the order is pay-before-eating order.
    • ORDER_FIRST: Indicates the order is an eat-before-payment order.

If this parameter is not passed or passed with no value specified, it means the value is PAY_FIRST by default.

  • payTypes: Indicates the way the order can be paid. This parameter is used to pass an array of strings, and its valid values are:
    • ONLINE: Indicates the order can be paid online.
    • OFFLINE: Indicates the order can be paid in store.

{

"cardNo": "123232323****",

"paymentMethodAmountDetails": "{\"BALANCE\":{\"currency\":\"SGD\",\"amountValue\":10},\"POINT\":{\"currency\":\"SGD\",\"amountValue\":20},\"CHOPE\":{\"currency\":\"SGD\",\"amountValue\":100}}"

}

Response parameters

Field

Data type

Required

Description

orderId

String

Yes

Indicates the unique ID assigned by the SaaS provider or ISV to identify the order.

Maximum length: 255 characters

orderNo

String

No

Indicates the code for the user to collect the order.

Maximum length: 255 characters

result

Result

Yes

Indicates the request result, such as status and error codes.

Result process logic

In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status:

Result status

Description 

A

The request for creating an order is accepted by the SaaS provider or ISV.

The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the following Error codes section.

S

The order creation is successful.

The corresponding result.resultCode is SUCCESS and result.resultMessage is SUCCESS.

U

The status of the order creation request is unknown.

The corresponding result.resultCode is UNKNOWN_EXCEPTION and result.resultMessage is "An API calling is failed, which is caused by unknown reasons.".

For details, see the Common error codes section.

F

The order creation is failed.

The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the following Error codes section.

Error codes

Error codes are usually classified into the following categories:

  • Common error codes are common for F&B mini program OpenAPIs.
  • API-specific error codes are listed in the following table:

Result code

Result status

Result message

Further action

INSUFFICIENT_USER_BALANCE

F

The user's balance is insufficient to cover the order.

Guide the user to create a new order.

INSUFFICIENT_USER_POINTS

F

The user's points are insufficient to cover the order.

Guide the user to create a new order.

INVALID_USER_BENEFIT

F

The user's benefit status is invalid.

Guide the user to create a new order.

Samples

Request

The following sample codes demonstrate the sample requests for creating dine-in, delivery, and pickup orders.

Dine-in order

For a request to create a dine-in order:

  • The value of orderType is DINEIN.
  • extendInfo.numberOfPax is only applicable for dine-in to specify how many people dine together.
  • pickUpTime is required to specify the dine-in time the user chooses.

In-queue

The value of extendInfo.dineInScene is QUEUE, which means the user is queueing at the eatery to place an order.

See the following example:

copy
{
    "appId": "21020101***",
    "buyerName": "Q****",
    "areaCode": "65",
    "mobileNo": "854888***",
    "currency": "SGD",
    "cutleryNumber": 1,
    "extendInfo": {
        "dineInScene": "QUEUE",
        "quotationId": "238c48de-e4c7-4072-ad6*******",
        "numberOfPax": "4",
        "storeSnapshot": "{\"address\":\"15 ***** *** ********, Singapore\",\"contactPhoneNos\":[\"+656253*****\"],\"id\":\"202208241115110002*******\",\"image\":[\"https://s3-ap-southeast-1.******.com/*****/5ad26409-6ccc-4fdb-9e43-effb*****/2126951202_Samplesite1Logo(Gold).png\"],\"locationDomain\":{\"latitude\":\"1.33****\",\"longitude\":\"103.858****\"},\"mccCodeType\":\"5812\",\"timeZone\":\"GMT+08:00\",\"title\":\"Sample *** @ Braddell\",\"tpId\":\"fd37af44-90ed-48a***********\"}",
        "paymentMethodAmountDetails": "{\"CHOPE\":{\"amountValue\":800,\"currency\":\"SGD\"}}",
        "memoToSeller": ""
    },
    "orderAmountDetail": {
        "convenienceFeeAmount": 0,
        "deliveryFeeAmount": 0,
        "itemFeeAmount": 748,
        "smallOrderFeeAmount": 0,
        "takeawayFeeAmount": 0
    },
    "orderItems": [
        {
            "categoryId": "c9d0a0f4-a364-4659-bdc7-a1***",
            "itemId": "P_fd37af44-90ed-48a******",
            "memo": "",
            "modifierGroupDetails": "[{\"groupId\":\"MG_fd374195e_1abe\",\"itemDetail\":[{\"itemId\":\"M_fe5f-4c34-a2ec-b4261bf9ce06\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":9},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-84ba-****\"}]},{\"groupId\":\"MG_fd37a5-40a5c3231077****\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-87d***\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":19},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-****\"}]},{\"groupId\":\"MG_fd37af44-90ed***\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-84ba-e6\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":0},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed*****\"}]}]",
            "notAvailableOption": "Remove it from my order",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 346
            },
            "quantity": 2,
            "requestSubOrderId": "2022102802549***",
            "skuId": "LOD004-3****",
            "storeId": "fd37af44-90ed-48a1-84ba-e6c2****"
        }
    ],
    "orderType": "DINEIN",
    "paymentAmount": 800,
    "paymentTime": "2022-10-28T16:00:17+08:00",
    "pickUpTime": "2022-10-28T15:42:00+08:00",
    "promoDetails": [],
    "requestId": "2022102802549450379",
    "requestOrderId": "pds_2109220354476379_2022102802549450379_1",
    "storeId": "fd37af44-90ed-48a1-84ba-e6c23cc062b5",
    "tableNo": ""
}

Scheduled

The value of extendInfo.dineInScene is RESERVATION, which means the user places an order in advance and dine later.

See the following example:

copy
{
  "appId": "2102010115******",
  "buyerName": "Q****",
  "areaCode": "65",
  "mobileNo": "876*****",
  "currency": "SGD",
  "cutleryNumber": 1,
  "extendInfo": {
    "dineInScene": "RESERVATION",
    "quotationId": "9a462052-ca87-486b-a830-****",
    "numberOfPax": "85",
    "storeSnapshot": "{\"address\":\"15 ***** *** ********, Singapore\",\"contactPhoneNos\":[\"+656253*****\"],\"id\":\"202208241115110002*******\",\"image\":[\"https://s3-ap-southeast-1.******.com/*****/5ad26409-6ccc-4fdb-9e43-effb*****/2126951202_Samplesite1Logo(Gold).png\"],\"locationDomain\":{\"latitude\":\"1.33****\",\"longitude\":\"103.858****\"},\"mccCodeType\":\"5812\",\"timeZone\":\"GMT+08:00\",\"title\":\"Sample *** @ Braddell\",\"tpId\":\"fd37af44-90ed-48a***********\"}",
    "paymentMethodAmountDetails": "{\"CHOPE\":{\"amountValue\":2140,\"currency\":\"SGD\"}}",
    "memoToSeller": ""
  },
  "orderAmountDetail": {
    "convenienceFeeAmount": 0,
    "deliveryFeeAmount": 0,
    "itemFeeAmount": 2000,
    "smallOrderFeeAmount": 0,
    "takeawayFeeAmount": 0
  },
  "orderItems": [
    {
      "categoryId": "ba5b266b-f8*****",
      "itemId": "P_fd37af44-90ed-48bc-44a4-ae*****",
      "memo": "",
      "modifierGroupDetails": "[{\"groupId\":\"MG_fd374195e_1abe\",\"itemDetail\":[{\"itemId\":\"M_fe5f-4c34-a2ec-b4261bf9ce06\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":9},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-84ba-****\"}]},{\"groupId\":\"MG_fd37a5-40a5c3231077****\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-87d***\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":19},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-****\"}]},{\"groupId\":\"MG_fd37af44-90ed***\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-84ba-e6\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":0},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed*****\"}]}]",
      "notAvailableOption": "Remove it from my order",
      "priceInfo": {
        "currency": "SGD",
        "saleAmount": 2000
      },
      "quantity": 1,
      "requestSubOrderId": "2022102702516604379",
      "storeId": "fd37af44-90ed-48a1-84ba-e6c23cc062b5"
    }
  ],
  "orderType": "DINEIN",
  "paymentAmount": 2140,
  "paymentTime": "2022-10-27T21:02:53+08:00",
  "pickUpTime": "2022-10-27T21:15:00+08:00",
  "promoDetails": [],
  "requestId": "2022102702516******",
  "requestOrderId": "pds_21092203544763*******",
  "storeId": "fd37af44-90ed-48a1-84ba-******",
  "tableNo": ""
}

Order now

The value of extendInfo.dineInScene is TABLE, which means the user places an order and enjoys it at the eatery without queueing. There are two types of orders under this scenario based on when the payment is made, which are:

Refer to the following two sections for the sample codes of each type of order.

Pay-before-eating order

The following sample code shows an API request to create a pay-before-eating order:

copy
{
    "appId": "2102030131151584",
    "areaCode": "65",
    "buyerName": "B*****",
    "currency": "SGD",
    "cutleryNumber": 1,
    "email": "******@gmail.com",
    "extendInfo": {
        "dineInScene": "TABLE",
        "quotationId": "e2cdcc66-0cbb-481e-b41a-3d595ce5b1db",
        "numberOfPax": "null",
        "storeSnapshot": "{\"address\":\"15 ***** *** ********, Singapore\",\"contactPhoneNos\":[\"+656253*****\"],\"id\":\"202208241115110002*******\",\"image\":[\"https://s3-ap-southeast-1.******.com/*****/5ad26409-6ccc-4fdb-9e43-effb*****/2126951202_Samplesite1Logo(Gold).png\"],\"locationDomain\":{\"latitude\":\"1.33****\",\"longitude\":\"103.858****\"},\"mccCodeType\":\"5812\",\"timeZone\":\"GMT+08:00\",\"title\":\"Sample *** @ Braddell\",\"tpId\":\"fd37af44-90ed-48a***********\"}",
       "paymentMethodAmountDetails": "{\"BALANCE\":{\"amountValue\":1510,\"currency\":\"SGD\"}}",
        "cardNo": "011166736860435700287****",
        "memoToSeller": ""
    },
    "mobileNo": "964*****",
    "orderAmountDetail": {
        "convenienceFeeAmount": 0,
        "deliveryFeeAmount": 0,
        "itemFeeAmount": 1510,
        "smallOrderFeeAmount": 0,
        "takeawayFeeAmount": 0
    },
    "orderItems": [
        {
            "categoryId": "d9a79441-f468-*****",
            "itemId": "P_07641c2d-5-fa19-4876********",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 500
            },
            "quantity": 1,
            "requestSubOrderId": "2022110202627****",
            "skuId": "H***",
            "storeId": "07641c2d-a669-44f5-*****"
        },
        {
            "categoryId": "01bd41f2-0acb-**********",
            "itemId": "P_07641c2d-a669-44f5*********",
            "memo": "",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 360
            },
            "quantity": 1,
            "requestSubOrderId": "20221102026******",
            "skuId": "HC*****",
            "storeId": "07641c2d-a669-44*******"
        }
    ],
    "orderType": "DINEIN",
    "paymentAmount": 1510,
    "paymentTime": "2022-11-02T13:59:39+08:00",
    "pickUpTime": "2022-11-02T13:56:55+08:00",
    "promoDetails": [],
    "requestId": "202211020262700*****",
    "requestOrderId": "pds_2109220383308******",
    "storeId": "07641c2d-a669-44f5-8c2d-b*****",
    "tableNo": "107"
}
Eat-before-payment order

The following sample code shows an API request to create an eat-before-payment order:

copy
{
    "appId":"2102020154272307",
    "currency":"SGD",
    "cutleryNumber":1,
    "extendInfo":{
        "dineInScene":"TABLE",
        "quotationId":"0F17-426ad36f-2ffb-4e18-b45e-af67663b01b7",
        "numberOfPax":"null",
        "storeSnapshot":"{\"address\":\"15 Braddell Tech, Lorong 8 Toa Payoh #05-09, 319263, Singapore-26a5-update0104\",\"contactPhoneNos\":[\"03-21101131\"],\"id\":\"20230412111511000210004200980372\",\"image\":[\"https://omni.posplus-crm.com/Omni_FnbItem/bkmy/test.png\"],\"locationDomain\":{\"latitude\":\"1.30101436404056\",\"longitude\":\"103.838360664485\",\"postCode\":\"238895\"},\"mccCodeType\":\"5812\",\"multiAddress\":{\"value\":{\"en-US\":\"15 Braddell Tech, Lorong 8 Toa Payoh #05-09, 319263, Singapore-26a5-update0104\",\"zh-CN\":\"中文地址\"}},\"multiTitle\":{\"defaultLang\":\"en-US\",\"value\":{\"en-US\":\"teeneechengdu001\",\"zh-CN\":\"中文店铺名称\"}},\"timeZone\":\"GMT+08:00\",\"title\":\"teeneechengdu001\",\"tpId\":\"teeneechengdu001\"}",
        "paymentMethodAmountDetails":"{}",
        "mainOrderId":"2023052201611113081",
        "orderMode":"ORDER_FIRST",
        "payTypes":"[\"OFFLINE\"]",
        "memoToSeller":"",
        "channelId":"CHOPE"
    },
    "orderAmountDetail":{
        "convenienceFeeAmount":50,
        "deliveryFeeAmount":0,
        "itemFeeAmount":1500,
        "smallOrderFeeAmount":0,
        "takeawayFeeAmount":80
    },
    "orderItems":[
        {
            "categoryId":"categoryxc041201-3-update",
            "itemId":"itemsinglexc_0303-011111",
            "priceInfo":{
                "currency":"SGD",
                "originAmount":3001,
                "saleAmount":1500
            },
            "quantity":1,
            "requestSubOrderId":"2023052201611114081",
            "storeId":"teeneechengdu001",
            "modifierGroupDetails": "[{\"groupId\":\"MG_fd374195e_1abe\",\"itemDetail\":[{\"itemId\":\"M_fe5f-4c34-a2ec-b4261bf9ce06\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":9},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-84ba-****\"}]},{\"groupId\":\"MG_fd37a5-40a5c3231077****\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-87d***\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":19},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed-48a1-****\"}]},{\"groupId\":\"MG_fd37af44-90ed***\",\"itemDetail\":[{\"itemId\":\"M_fd37af44-90ed-48a1-84ba-e6\",\"priceInfo\":{\"currency\":\"SGD\",\"saleAmount\":0},\"quantity\":1,\"requestSubOrderId\":\"\",\"storeId\":\"fd37af44-90ed*****\"}]}]"
        }
    ],
    "orderType":"DINEIN",
    "paymentAmount":1500,
    "pickUpTime":"2023-05-22T13:10:40+08:00",
    "promoDetails":[

    ],
    "requestId":"2023052200072883081",
    "requestOrderId":"pdsful_2023052200072883081_2023052201611113081",
    "storeId":"teeneechengdu001",
    "tableNo":"autoTestNO"
}

Delivery order

For a request to create a delivery order, the deliveryDetail and cutleryNumber parameters are required.

See the following example:

copy
{
    "appId": "2102010115416600",
    "areaCode": "65",
    "buyerName": "Jhon",
    "currency": "SGD",
    "cutleryNumber": 0,
    "deliveryDetail": {
        "addressInfo": {
            "addressDetail": "1696**",
            "addressTag": "Work",
            "blockNo": "5",
            "floorNo": "Lo",
            "postCode": "169608",
            "unitNo": ""
        },
        "expectedDeliveryTimeEnd": "2022-11-02T13:45:00+08:00",
        "expectedDeliveryTimeStart": "2022-11-02T13:00:00+08:00",
        "memoToDeliverymen": "Call me when 5 mi away"
    },
    "email": "shinyuet@gmail.com",
    "extendInfo": {
        "acquireMerchantId": "12164810***",
        "storeSnapshot": "{\"address\":\"15 ***** *** ********, Singapore\",\"contactPhoneNos\":[\"+656253*****\"],\"id\":\"202208241115110002*******\",\"image\":[\"https://s3-ap-southeast-1.******.com/*****/5ad26409-6ccc-4fdb-9e43-effb*****/2126951202_Samplesite1Logo(Gold).png\"],\"locationDomain\":{\"latitude\":\"1.33****\",\"longitude\":\"103.858****\"},\"mccCodeType\":\"5812\",\"timeZone\":\"GMT+08:00\",\"title\":\"Sample *** @ Braddell\",\"tpId\":\"fd37af44-90ed-48a***********\"}",
        "paymentMethodAmountDetails": "{\"CHOPE\":{\"amountValue\":4266,\"currency\":\"SGD\"}}",
        "memoToSeller": ""
    },
    "mobileNo": "81260463",
    "orderAmountDetail": {
        "convenienceFeeAmount": 0,
        "deliveryFeeAmount": 0,
        "itemFeeAmount": 4126,
        "smallOrderFeeAmount": 0,
        "takeawayFeeAmount": 240
    },
    "orderItems": [
       {
            "categoryId": "d9a79441-f468-*****",
            "itemId": "P-4876********",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 500
            },
            "quantity": 1,
            "requestSubOrderId": "2022110202627****",
            "skuId": "H***",
            "storeId": "07641c2d-a669-44f5-*****"
        },
        {
            "categoryId": "d9a79441-f468-*****",
            "itemId": "P-4876********",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 500
            },
            "quantity": 1,
            "requestSubOrderId": "2022110202627****",
            "skuId": "H***"
        } 
    ],
    "orderType": "DELIVERY",
    "paymentAmount": 4266,
    "paymentTime": "2022-11-02T12:13:01+08:00",
    "promoDetails": [
        {
            "discountAmount": {
                "amountValue": 100,
                "currency": "SGD"
            },
            "extendInfo": "{\"promoInvestorType\":\"PLATFORM\"}",
            "promoId": "202207181905011000******",
            "promoName": "$1 off $2 pick-up & delivery",
            "promoType": "COUPON"
        }
    ],
    "requestId": "20221102026****",
    "requestOrderId": "pds_210922001*******",
    "storeId": "6*******"
}

Pickup order

For a request to create a pickup order, the pickUpTime parameter is required.

Note: For reservation orders, the pickUpTime parameter indicates the time when an order is ready and the user picks up their order at the eatery. This means that the merchant needs to prepare for orders in advance to make sure users pick up their orders in time.

See the following example:

copy
{
    "appId": "2102020135307090",
    "areaCode": "60",
    "buyerName": "Jhon",
    "currency": "MYR",
    "cutleryNumber": 1,
    "email": "cwslvlm@163.com",
    "extendInfo": {
        "acquireMerchantId": "apt_Dev",
         "storeSnapshot": "{\"address\":\"15 ***** *** ********, Singapore\",\"contactPhoneNos\":[\"+656253*****\"],\"id\":\"202208241115110002*******\",\"image\":[\"https://s3-ap-southeast-1.******.com/*****/5ad26409-6ccc-4fdb-9e43-effb*****/2126951202_Samplesite1Logo(Gold).png\"],\"locationDomain\":{\"latitude\":\"1.33****\",\"longitude\":\"103.858****\"},\"mccCodeType\":\"5812\",\"timeZone\":\"GMT+08:00\",\"title\":\"Sample *** @ Braddell\",\"tpId\":\"fd37af44-90ed-48a***********\"}",
         "paymentMethodAmountDetails": "{\"TNG\":{\"amountValue\":1650,\"currency\":\"MYR\"}}",
        "memoToSeller": ""
    },
    "mobileNo": "11211****",
    "orderAmountDetail": {
        "convenienceFeeAmount": 0,
        "deliveryFeeAmount": 0,
        "itemFeeAmount": 1650,
        "smallOrderFeeAmount": 0,
        "takeawayFeeAmount": 0
    },
    "orderItems": [
       {
            "categoryId": "d9a79441-f468-*****",
            "itemId": "P-4876********",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 500
            },
            "quantity": 1,
            "requestSubOrderId": "2022110202627****",
            "skuId": "H***",
            "storeId": "07641c2d-a669-44f5-*****"
        },
        {
            "categoryId": "d9a79441-f468-*****",
            "itemId": "P-4876********",
            "notAvailableOption": "If anything is out of stock, will cancel the order and refund",
            "priceInfo": {
                "currency": "SGD",
                "saleAmount": 500
            },
            "quantity": 1,
            "requestSubOrderId": "2022110202627****",
            "skuId": "H***"
        } 
    ],
    "orderType": "PICKUP",
    "paymentAmount": 1650,
    "paymentTime": "2022-11-02T13:55:44+08:00",
    "pickUpTime": "2022-11-02T14:00:00+08:00",
    "promoDetails": [],
    "requestId": "20221102*******",
    "requestOrderId": "pds_210922001137*********",
    "storeId": "11*******"
}

Response

copy
{
    "orderId": "1443352",
    "orderNo": "2022125",
    "result": {
        "resultCode": "SUCCESS",
        "resultMessage": "success",
        "resultStatus": "S"
    }
}