Skip to main content

Create Order

Function​

Create Order

Endpoint​

  • /v1/order/create

HTTP Method​

  • POST

Request Headers​

  • Authorization: Bearer {token}
  • X-App-Key: {appKey}

Request Payload​

with receipt

{
"memberId": "XXXX",
"transactionId": "XXXX",
"storeCode": "storeCode",
"invoiceId": "123456",
"orderTime": "2024-01-01T10:00:00+08:00",
"submitTime": "2024-01-01T10:00:00+08:00",
"approvalTime": "2024-01-01T10:00:00+08:00",
"originalAmount": "1000.00",
"discountAmount":"0.00",
"paymentAmount": "1000.00",
"paymentMethod": "VS",
"currency": "HKD",
"source": "",
"remark": "",
"creditCardAuthCode":"",
"receiptImage": "https://xxxx",
"paymentImage": "https://xxxx"
}

without receipt

{
"memberId": "xxx",
"transactionId": "XXXX",
"storeCode": "storeCode",
"invoiceId": "123456",
"orderTime": "2024-01-01T10:00:00+08:00",
"submitTime": "2024-01-01T10:00:00+08:00",
"approvalTime": "2024-01-01T10:00:00+08:00",
"originalAmount": "1000.00",
"discountAmount":"200.00",
"paymentAmount": "800.00",
"paymentMethod": "VS",
"currency": "HKD",
"source": "",
"remark": "",
"creditCardAuthCode":"",
"discounts":{
"coupons":[
{
"discounId":"redemption code",
"discountAmount":"100.00",
"couponId":"couponId"
}
],
"points":{
"discounId":"burn point unique id",
"discountAmount":"100.00",
"points":"2500"
}
}
}

Request Parameters​

FieldRequiredTypeRemarkSample
memberIdYesstringmemberId
transactionIdYesstringtransaction id
storeCodeYesstringstore Id
invoiceIdYesstringreceipt number123456
orderTimeYesstringorder time, rfc3339 format2024-01-01T10:00:00+08:00
submitTimeYesstringsubmit time, rfc3339 format2024-01-01T10:00:00+08:00
approvalTimeYesstringapproval time, rfc3339 format2024-01-01T10:00:00+08:00
originalAmountYesstringoriginal order amount1000.00
discountAmountYesstringdiscount amount200.00
paymentAmountYesstringamount of payment800.00
paymentMethodYesstringmethod of payment, Definition: PaymentMethodVS
currencyNostringcurrency type, default is HKDHKD
sourceNostringsource: POS/APP
remarkNostringremark
creditCardAuthCodeNostringcredit card auth code
receiptImageNostringreceipt image url
paymentImageNostringpayment image url
discountsNojsondiscount detail list
discounts . couponsNoobject[]coupons
. coupons . discounIdYesstringcoupon redemption copon
. coupons . discountAmountYesstringcoupon discount amount
. coupons . couponIdYesstringcouponId
discounts . pointsNoobjectcoupons
. points . discounIdYesstringunique id for burn point
. points . discountAmountYesstringamount of points as cash
. points . pointsYesstringpoints value

Response Payload​

{
"status": 1,
"errorCode": 0,
"message": "success",
"orderCode": "order unique identifier"
}

Response Parameters​

FieldRequiredTypeRemarkSample
statusYesstringstatus code of the api call
messageYesstringdetail message of the api call
errorCodeNostring
orderCodeYesstringorder unique identifier

Response Headers​

Error Codes​

CodeDescription
1Internal Error
3Missing Parameter
4Invalid Input
4100Member not found
10452Invalid Store
10501TransactionId already exists