Update the order
curl --request PATCH \
--url https://api.hit-pay.com/v1/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '
{
"amount": 0,
"currency": "sgd",
"remark": "<string>",
"location_id": "<string>",
"customer_id": "<string>",
"customer_pickup": true,
"channel": "point_of_sale",
"business_user_id": "<string>",
"discount_reason": "<string>",
"discount_amount": 0,
"version": "1.0"
}
'import requests
url = "https://api.hit-pay.com/v1/orders/{order_id}"
payload = {
"amount": 0,
"currency": "sgd",
"remark": "<string>",
"location_id": "<string>",
"customer_id": "<string>",
"customer_pickup": True,
"channel": "point_of_sale",
"business_user_id": "<string>",
"discount_reason": "<string>",
"discount_amount": 0,
"version": "1.0"
}
headers = {
"X-BUSINESS-API-KEY": "<x-business-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-BUSINESS-API-KEY': '<x-business-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 0,
currency: 'sgd',
remark: '<string>',
location_id: '<string>',
customer_id: '<string>',
customer_pickup: true,
channel: 'point_of_sale',
business_user_id: '<string>',
discount_reason: '<string>',
discount_amount: 0,
version: '1.0'
})
};
fetch('https://api.hit-pay.com/v1/orders/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hit-pay.com/v1/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 0,
'currency' => 'sgd',
'remark' => '<string>',
'location_id' => '<string>',
'customer_id' => '<string>',
'customer_pickup' => true,
'channel' => 'point_of_sale',
'business_user_id' => '<string>',
'discount_reason' => '<string>',
'discount_amount' => 0,
'version' => '1.0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BUSINESS-API-KEY: <x-business-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hit-pay.com/v1/orders/{order_id}"
payload := strings.NewReader("{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hit-pay.com/v1/orders/{order_id}")
.header("X-BUSINESS-API-KEY", "<x-business-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hit-pay.com/v1/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-BUSINESS-API-KEY"] = '<x-business-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9b4bc2a2-4721-4636-a6dc-4effec3b00fc",
"order_display_number": 5660,
"business_id": "9130c422-bf97-4bd1-b370-07a3a6f40708",
"channel": "point_of_sale",
"version": "1.0",
"customer_id": null,
"business_customer_id": null,
"customer": null,
"customer_pickup": true,
"currency": "sgd",
"order_discount_name": null,
"status": "draft",
"remark": "Razaq is a fool",
"created_at": "2024-02-10T00:41:42+08:00",
"updated_at": "2024-02-10T00:41:42+08:00",
"closed_at": null,
"location_id": null,
"location": null,
"business_user_id": "34",
"slot_date": null,
"slot_time": null,
"messages": null,
"products": [],
"charges": [],
"line_items": [],
"order_form": {
"membership_id": {
"type": "input",
"title": "Membership ID",
"deleted": false,
"include": true,
"required": true
}
},
"order_form_response": [],
"coupon": null,
"payment_status": null,
"fulfilment_status": "",
"line_items_total": 0,
"order_discount_amount": 0,
"line_item_discount_amount": 0,
"line_item_tax_amount": 0,
"additional_discount_amount": 0,
"total_discount_amount": 0,
"line_item_price": 0,
"shipping_amount": 0,
"total_coupon_amount": 0,
"amount": 0,
"subtotal": 0
}"{\n \"message\": \"No query results for model [App\\\\Business\\\\Order] 99daaa99-0ccb-4e46-82bd-7a4347957e0a\"\n}"Update Order
Update order details or status
PATCH
/
v1
/
orders
/
{order_id}
Update the order
curl --request PATCH \
--url https://api.hit-pay.com/v1/orders/{order_id} \
--header 'Content-Type: application/json' \
--header 'X-BUSINESS-API-KEY: <x-business-api-key>' \
--data '
{
"amount": 0,
"currency": "sgd",
"remark": "<string>",
"location_id": "<string>",
"customer_id": "<string>",
"customer_pickup": true,
"channel": "point_of_sale",
"business_user_id": "<string>",
"discount_reason": "<string>",
"discount_amount": 0,
"version": "1.0"
}
'import requests
url = "https://api.hit-pay.com/v1/orders/{order_id}"
payload = {
"amount": 0,
"currency": "sgd",
"remark": "<string>",
"location_id": "<string>",
"customer_id": "<string>",
"customer_pickup": True,
"channel": "point_of_sale",
"business_user_id": "<string>",
"discount_reason": "<string>",
"discount_amount": 0,
"version": "1.0"
}
headers = {
"X-BUSINESS-API-KEY": "<x-business-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-BUSINESS-API-KEY': '<x-business-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 0,
currency: 'sgd',
remark: '<string>',
location_id: '<string>',
customer_id: '<string>',
customer_pickup: true,
channel: 'point_of_sale',
business_user_id: '<string>',
discount_reason: '<string>',
discount_amount: 0,
version: '1.0'
})
};
fetch('https://api.hit-pay.com/v1/orders/{order_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hit-pay.com/v1/orders/{order_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 0,
'currency' => 'sgd',
'remark' => '<string>',
'location_id' => '<string>',
'customer_id' => '<string>',
'customer_pickup' => true,
'channel' => 'point_of_sale',
'business_user_id' => '<string>',
'discount_reason' => '<string>',
'discount_amount' => 0,
'version' => '1.0'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BUSINESS-API-KEY: <x-business-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hit-pay.com/v1/orders/{order_id}"
payload := strings.NewReader("{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hit-pay.com/v1/orders/{order_id}")
.header("X-BUSINESS-API-KEY", "<x-business-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hit-pay.com/v1/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-BUSINESS-API-KEY"] = '<x-business-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 0,\n \"currency\": \"sgd\",\n \"remark\": \"<string>\",\n \"location_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"customer_pickup\": true,\n \"channel\": \"point_of_sale\",\n \"business_user_id\": \"<string>\",\n \"discount_reason\": \"<string>\",\n \"discount_amount\": 0,\n \"version\": \"1.0\"\n}"
response = http.request(request)
puts response.read_body{
"id": "9b4bc2a2-4721-4636-a6dc-4effec3b00fc",
"order_display_number": 5660,
"business_id": "9130c422-bf97-4bd1-b370-07a3a6f40708",
"channel": "point_of_sale",
"version": "1.0",
"customer_id": null,
"business_customer_id": null,
"customer": null,
"customer_pickup": true,
"currency": "sgd",
"order_discount_name": null,
"status": "draft",
"remark": "Razaq is a fool",
"created_at": "2024-02-10T00:41:42+08:00",
"updated_at": "2024-02-10T00:41:42+08:00",
"closed_at": null,
"location_id": null,
"location": null,
"business_user_id": "34",
"slot_date": null,
"slot_time": null,
"messages": null,
"products": [],
"charges": [],
"line_items": [],
"order_form": {
"membership_id": {
"type": "input",
"title": "Membership ID",
"deleted": false,
"include": true,
"required": true
}
},
"order_form_response": [],
"coupon": null,
"payment_status": null,
"fulfilment_status": "",
"line_items_total": 0,
"order_discount_amount": 0,
"line_item_discount_amount": 0,
"line_item_tax_amount": 0,
"additional_discount_amount": 0,
"total_discount_amount": 0,
"line_item_price": 0,
"shipping_amount": 0,
"total_coupon_amount": 0,
"amount": 0,
"subtotal": 0
}"{\n \"message\": \"No query results for model [App\\\\Business\\\\Order] 99daaa99-0ccb-4e46-82bd-7a4347957e0a\"\n}"Headers
Example:
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
Path Parameters
It's required field
Body
application/json
The total amount of the order
Example:
100
The currency of the order
Example:
"sgd"
The remark of the order
Example:
"Order Remark HitPay"
The location id of the order
Example:
"9ae46141-c930-4613-b5a0-241206b9c215"
The customer id of the order
Example:
"9ae46141-c930-4613-b5a0-241206b9c215"
The customer pickup of the order
Example:
true
The channel of the order
Example:
"point_of_sale"
The business user id of the order
Example:
"34"
The discount reason of the order
Example:
"Discount Reason"
The discount amount of the order
Example:
10
The version of the order
Example:
"1.0"
Response
200
Show child attributes
Show child attributes
Last modified on February 25, 2026
Was this page helpful?
⌘I