Checkout
DevelopingPOST
/orders/{orderId}/checkoutValidation
Field | Type | Rule | Description |
---|---|---|---|
payments |
array |
required |
|
payments.*.payment_method_key |
string |
required |
Key from PaymentMethod model |
payments.*.value |
numeric |
required min:0 |
|
payments.*.given |
numeric |
nullable min:0 |
Field payments.*.given
required if you use the cash payment method, for example, a customer gives 25 SAR while the total order is 20 SAR, it will be payments.*.value
: 20 SAR, payments.*.given
: 25 SAR
Request
Path Params
orderId
string
required
Example:
ad757b52-c1c7-4996-a029-83d218cacb66
Body Params application/json
payments
array [object {3}]
required
payment_method_key
string
required
value
number
required
given
number
optional
Example
{
"payments": [
{
"payment_method_key": "MADA",
"value": 6.33
}
]
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
meta
object
required
code
integer
required
status
string
required
message
string
required
data
object
required
id
string
required
market_id
string
required
branch_id
string
required
number
string
required
source
string
required
type
string
required
status
string
required
table_code
null
required
notes
string
required
customer_id
null
required
cashier_id
string
required
created_at
integer
required
updated_at
integer
required
deleted_at
null
required
is_product_changed
boolean
required
table_id
null
required
qr_img
string
required
market
object
required
branch
object
required
customer
null
required
cashier
object
required
table
null
required
status_logs
array [object {4}]
required
transaction
object
required
products
array [object {25}]
required
return_products
array[string]
required
changed_products
array [object {25}]
required
product_fees
array [object {14}]
required
product_discount_fees
array[string]
required
product_tax_fees
array [object {14}]
required
product_ratings
array[string]
required
Example
{
"meta": {
"code": 200,
"status": "success",
"message": "Checkout Order Success"
},
"data": {
"id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"number": "0001",
"source": "ADMIN_WEB",
"type": "TAKE_AWAY",
"status": "PROCESS",
"table_code": null,
"notes": "Ea illum autem est commodi. Temporibus et quia.",
"customer_id": null,
"cashier_id": "0756d11b-4a6e-4739-adf7-899e58de0885",
"created_at": 1698586104719,
"updated_at": 1698586104719,
"deleted_at": null,
"is_product_changed": true,
"table_id": null,
"qr_img": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAIAAACx0UUtAAAABnRSTlMA/wD/AP83WBt9AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFYklEQVR4nO3dy47jOBBFwanB/P8v9+y1YIPgQ8fliLUsya4LohIkkz9//vz5B8L+ffsF4C9klDoZpU5GqZNR6mSUOhmlTkapk1HqZJQ6GaVORqmTUepklDoZpU5GqZNR6mSUOhml7r+VD//8/Ox6j7HHpqvHc8dbsqZecupW47ca33nlK6w8d3znc1a2zRlHqZNR6mSUOhmlbqlmetjYTmKl/hhfPPWgKRvfaurijT/7tb/gFOModTJKnYxSJ6PU7ayZHjZO8Ex9dvzcyNzYWw+a+p2v/QXHjKPUySh1MkqdjFJ3sGZ6y8o/71NL5qacW5s3ftAvYBylTkapk1HqZJS631AzTW332TjRsjINc25y6PcxjlIno9TJKHUySt3Bmunaf/pTRdLGAuvcxVOuzY29xThKnYxSJ6PUySh1O2uma1uFzlUJK8/d+FbnpsoibfSmGEepk1HqZJQ6GaVuqWaKzEOMrTTqjjj3zh/xFzSOUiej1MkodTJK3cHzmc4dXxSpe1aqsUgl9xErBo2j1MkodTJKnYxS9xPpMtdcfnbuVhvPlDrXPvxh5ddQM/GbySh1MkqdjFK3s2YaW+nFMHXnh3MVxlsnwF4rv94q7B6Mo9TJKHUySp2MUrdUMz3vdWyu6K0DYSOt8B42/jjXJtLUTPxmMkqdjFIno9QdrJkeznUEn3rQ+OKHjfNMb53AdO53nqJm4jeTUepklDoZpe7efqZrRdKUT5xYWrnV1J2v9VYfM45SJ6PUySh1MkpdtNf4tVOFzjX3m/oK56a7rh0TpQcE30tGqZNR6mSUup29xjeWUG8txpv6Cm9tBdu4B2t857Frqw2No9TJKHUySp2MUhftATH2VsO6seZmoLFrnQ/NM/GbySh1MkqdjFL32jzTRzTZO/dWzRmdqTtf621oHKVORqmTUepklLp75zM9vLWE7Fz7vmul27mjrSLHYj0YR6mTUepklDoZpW5nD4iVKmGlDrh2mtHGOiBywu+1g69WGEepk1HqZJQ6GaVu59q8h5V+CivVSfPicx35rlVyU8wz8UVklDoZpU5GqVuqmR42Lpk718f6XKuCjVXR2FuHSL31IOModTJKnYxSJ6PU7ayZHt7qgT32ic39xqYWLp6b/TrHOEqdjFIno9TJKHX3ekBsnB05V7usvMZbZ0pdO3Jpiv1MfBEZpU5GqZNR6g6uzdu4G2bqQeeqhI0t6c5Nwl3r8jBmPxNfREapk1HqZJS6nTXTtT06K69xrUPd+OJzU3RT3pr8m2IcpU5GqZNR6mSUunv7mcauHYz01izUuMnFlHPTXePPvsU4Sp2MUiej1MkoddG1eeP/1lfW5jVPJFqpEce3mvLWTzdmHKVORqmTUepklLqD80zXJofeapFwrY/ctUmpjTNYGxlHqZNR6mSUOhmlbqlv3lve6hBxrjPe+LPjt5p67rWvP36rKcZR6mSUOhmlTkapu9drfMW5GmKjSK/xyM4wffP4IjJKnYxSJ6PUHdzPtGJjZXNuq9DKisGpi6+tr2syjlIno9TJKHUySl20b97Knc8dE/URFcbYxg4R13ruGUepk1HqZJQ6GaXuYM10zUqTvSlv7Uk615Dw3EpFa/P4IjJKnYxSJ6PUfWTNtLEZwbnO3A9TSwSvbST6iGrMOEqdjFIno9TJKHU7e0Cc28/0EQ3rpm415Vwfh4dzdY95Jn4zGaVORqmTUep2zjO9debpW9uMNs73rFSf14qzqYvNM/FFZJQ6GaVORqn7yPOZ+CrGUepklDoZpU5GqZNR6mSUOhmlTkapk1HqZJQ6GaVORqmTUepklDoZpU5GqZNR6mSUOhml7n+NacS3kJ6fbQAAAABJRU5ErkJggg==",
"market": {
"id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"sector_id": 1,
"name_en": "First Restaurant",
"name_ar": "First Restaurant",
"description_en": "Ut maxime commodi natus id tenetur ullam. Repudiandae aut quia est perspiciatis facilis dolores repellendus ea eum. Iusto occaecati libero ea voluptas dolore qui qui maxime quod. Eum ut vel possimus sunt doloribus saepe repellendus et.",
"description_ar": "العظمى إستيلاء الأوروبية، حين عل. هو وبعد قتيل، العالمي ولم, يونيو مساعدة التاريخ، وصل تم. بـ سكان الجو اليابان تحت, يتم لأداء تكتيكاً قُدُماً ان. نفس موالية الجنوبي ما, أضف تم غضون أسابيع وقوعها،. وبدون ميناء الأمريكية فقد عل, قتيل، معارضة ضرب عن, دول وبعض لفرنسا تزامناً ثم. أي أدوات استبدال جعل. يكن لغات مشروط من.",
"logo_img": null,
"cover_img": null,
"email": "[email protected]",
"phone_prefix": "966",
"phone": "579112767",
"crn": null,
"tax_number": "12345611",
"created_by": null,
"email_verified_at": null,
"phone_verified_at": null,
"created_at": 1680271006362,
"updated_at": 1683019078189,
"deleted_at": null,
"setting": {
"id": 1,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"balance": 0,
"income": 0,
"receipt_message_en": null,
"receipt_message_ar": null,
"qoyod_api_key": null,
"grubtech_api_key": "ZElHttueqZ40ajMQhIjOQ5WaCxC7lSVB96nB2oc9",
"grubtech_store_id": "FLAVOURS_STORE_1",
"currency": "OMR",
"order_num_start": null,
"is_qoyod_daily_update": false,
"grubtech_integration_mode": null,
"is_tax_details": false,
"tap_payment_secret_key": null,
"tap_payment_public_key": null,
"is_offline_calculate": false
}
},
"branch": {
"id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"name_en": "First Branch",
"name_ar": "First Branch",
"address": "8541 Moore Highway, Tianna Port",
"latitude": -60.8672,
"longitude": -168.4564,
"is_active": true,
"created_at": 1680271006388,
"updated_at": 1682927489279,
"deleted_at": null,
"expired_at": null
},
"customer": null,
"cashier": {
"id": "0756d11b-4a6e-4739-adf7-899e58de0885",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": null,
"permission_id": 2,
"user": {
"id": "f64b8da0-429b-4377-9a03-19724f43465b",
"userable_id": "0756d11b-4a6e-4739-adf7-899e58de0885",
"role": "SUBSCRIBER",
"name": "Subscriber 1",
"username": "subscriber1",
"email": "[email protected]",
"phone_prefix": "966",
"phone": null,
"lang": "en",
"fcm_token": null,
"is_active": true,
"email_verified_at": null,
"phone_verified_at": null,
"created_at": 1680271006727,
"updated_at": 1684892194280,
"deleted_at": null
}
},
"table": null,
"status_logs": [
{
"id": 147,
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"status": "WAITING",
"created_at": 1698586104785
},
{
"id": 148,
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"status": "PROCESS",
"created_at": 1698596703228
}
],
"transaction": {
"id": 18000043781,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"discount": 0,
"tax": 0.83,
"subtotal": 5.5,
"total": 6.33,
"cost": 4.5,
"profit": 1,
"created_at": 1698586104738,
"updated_at": 1698586104738,
"status": "PAID",
"discount_id": null,
"payment_fees": 0,
"related_discount": null,
"payments": [
{
"id": "9aa8df08-40d5-4889-a347-b57111141903",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"paymentable_id": 18000043781,
"paymentable_type": "ORDER",
"pay": 6.33,
"change": 0,
"status": "SUCCESS",
"payment_method_key": "MADA",
"created_at": 1698597916171,
"updated_at": 1698597916171,
"payment_method": {
"key": "MADA",
"name": "Mada",
"is_online": false,
"logo_img": "http://api-dev.flavours.sa/img/payment-methods/MADA.png"
},
"gateway": null
}
],
"return_payments": []
},
"products": [
{
"id": 9000044908,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"product_category_id": 2,
"product_id": "8447de4e-740e-4181-a377-6dfa3f4d3aa2",
"qty": 1,
"price": 5.5,
"discount": 0,
"tax": 0.83,
"subtotal": 5.5,
"total": 6.33,
"cost": 4.5,
"profit": 1,
"is_done": false,
"created_at": 1698586104742,
"updated_at": 1698596702970,
"status": "RELATED",
"product_category": {
"id": 2,
"icon": "🥩",
"name_en": "Steak",
"name_ar": "ستيك",
"deleted_at": null
},
"product": {
"id": "8447de4e-740e-4181-a377-6dfa3f4d3aa2",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"product_category_id": 2,
"name_en": "Burger Deluxe",
"name_ar": "برجر ديلوكس",
"description_en": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"description_ar": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"preparation_time": 15,
"stock": 765,
"order": 2,
"images": [
"https://cdn-flavours.fra1.digitaloceanspaces.com/img/uploads/products/1680365973-0.jpg"
],
"is_active": true,
"created_at": 1680271006454,
"updated_at": 1684589809294,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 64,
"sold_revenue": 64.5,
"qoyod_id": null
},
"modifiers": [
{
"id": 2759,
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"order_product_id": 9000044908,
"product_modifier_id": 5626,
"weight": null,
"price": 5.5,
"discount": 0,
"tax": 0.83,
"total": 6.33,
"cost": 4.5,
"profit": 1,
"modifier": {
"id": 5626,
"product_id": "8447de4e-740e-4181-a377-6dfa3f4d3aa2",
"name_en": "Small",
"name_ar": "صغير",
"type": "OPTION",
"calorie": 300,
"price": 5.5,
"tax": 0.83,
"total": 6.33,
"cost": 4.5,
"profit": 1,
"is_tax_included": false,
"deleted_at": null,
"barcode": null,
"barcode_img": null,
"weight_amount": null,
"weight_unit": null
}
}
],
"fees": [
{
"id": 30328,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"order_product_id": 9000044908,
"feeable_id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"feeable_type": "TAX",
"qty": 1,
"amount": 0.83,
"total": 0.83,
"created_at": 1698596703124,
"updated_at": 1698596703124,
"order_product_modifier_id": null
}
],
"discount_fees": [],
"tax_fees": [
{
"id": 30328,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"order_product_id": 9000044908,
"feeable_id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"feeable_type": "TAX",
"qty": 1,
"amount": 0.83,
"total": 0.83,
"created_at": 1698596703124,
"updated_at": 1698596703124,
"order_product_modifier_id": null
}
],
"rating": null
}
],
"return_products": [],
"changed_products": [
{
"id": 9000044909,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"product_category_id": 2,
"product_id": "8447de4e-740e-4181-a377-6dfa3f4d3aa2",
"qty": -1,
"price": 5.5,
"discount": 0,
"tax": 0.83,
"subtotal": 5.5,
"total": 6.33,
"cost": 4.5,
"profit": 1,
"is_done": false,
"created_at": 1698596702970,
"updated_at": 1698596702970,
"status": "CHANGED",
"product_category": {
"id": 2,
"icon": "🥩",
"name_en": "Steak",
"name_ar": "ستيك",
"deleted_at": null
},
"product": {
"id": "8447de4e-740e-4181-a377-6dfa3f4d3aa2",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"product_category_id": 2,
"name_en": "Burger Deluxe",
"name_ar": "برجر ديلوكس",
"description_en": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"description_ar": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"preparation_time": 15,
"stock": 765,
"order": 2,
"images": [
"https://cdn-flavours.fra1.digitaloceanspaces.com/img/uploads/products/1680365973-0.jpg"
],
"is_active": true,
"created_at": 1680271006454,
"updated_at": 1684589809294,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 64,
"sold_revenue": 64.5,
"qoyod_id": null
},
"modifiers": [],
"fees": [],
"discount_fees": [],
"tax_fees": [],
"rating": null
},
{
"id": 9000044910,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"product_category_id": 3,
"product_id": "cfcdf305-4cfe-495c-9a33-c8dfc7a6b8c5",
"qty": -1,
"price": 11,
"discount": 0,
"tax": 1.65,
"subtotal": 11,
"total": 12.65,
"cost": 4.5,
"profit": 1,
"is_done": false,
"created_at": 1698596702970,
"updated_at": 1698596702970,
"status": "CHANGED",
"product_category": {
"id": 3,
"icon": "🌯",
"name_en": "Sandwiches",
"name_ar": "ساندويتشات",
"deleted_at": null
},
"product": {
"id": "cfcdf305-4cfe-495c-9a33-c8dfc7a6b8c5",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"product_category_id": 3,
"name_en": "Twister Lunch Edited",
"name_ar": "Twister Lunch",
"description_en": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"description_ar": "Tempore recusandae vel atque voluptatibus ea et nihil. Veniam eveniet laudantium cupiditate ratione non. Asperiores rem maiores neque inventore possimus itaque eum rerum. Delectus accusantium sit facilis. Ea voluptatibus natus quas eius commodi enim enim.",
"preparation_time": 20,
"stock": 819,
"order": 1,
"images": [
"https://cdn-flavours.fra1.digitaloceanspaces.com/img/uploads/products/1680366096-0.jpg"
],
"is_active": true,
"created_at": 1680271006458,
"updated_at": 1684246940577,
"deleted_at": null,
"rating_amount": 0,
"rating_avg": "0.00",
"sold_amount": 31,
"sold_revenue": 39.09,
"qoyod_id": null
},
"modifiers": [],
"fees": [],
"discount_fees": [],
"tax_fees": [],
"rating": null
}
],
"product_fees": [
{
"id": 30328,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"order_product_id": 9000044908,
"feeable_id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"feeable_type": "TAX",
"qty": 1,
"amount": 0.83,
"total": 0.83,
"created_at": 1698596703124,
"updated_at": 1698596703124,
"order_product_modifier_id": null,
"feeable": {
"id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": null,
"name_en": "Tax",
"name_ar": "ضريبة",
"value": 15,
"value_type": "PERCENT",
"is_active": true,
"created_at": 2023,
"updated_at": 2023,
"deleted_at": null,
"is_calculate": true
}
}
],
"product_discount_fees": [],
"product_tax_fees": [
{
"id": 30328,
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": "02510007-93b6-4121-93d7-c1bd79d00d0c",
"order_id": "ad757b52-c1c7-4996-a029-83d218cacb66",
"order_product_id": 9000044908,
"feeable_id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"feeable_type": "TAX",
"qty": 1,
"amount": 0.83,
"total": 0.83,
"created_at": 1698596703124,
"updated_at": 1698596703124,
"order_product_modifier_id": null,
"feeable": {
"id": "cc49a82a-ea28-4541-b4e6-8131457607a1",
"market_id": "5d4196d7-355a-48ef-9c50-add58cc440f1",
"branch_id": null,
"name_en": "Tax",
"name_ar": "ضريبة",
"value": 15,
"value_type": "PERCENT",
"is_active": true,
"created_at": 2023,
"updated_at": 2023,
"deleted_at": null,
"is_calculate": true
}
}
],
"product_ratings": []
}
}
Last modified: 2 months ago