Mark an order refunded
curl --request POST \
--url https://api.salesive.com/api/v1/orders/{id}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "Handed to the courier"
}
'import requests
url = "https://api.salesive.com/api/v1/orders/{id}/refund"
payload = { "notes": "Handed to the courier" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({notes: 'Handed to the courier'})
};
fetch('https://api.salesive.com/api/v1/orders/{id}/refund', 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.salesive.com/api/v1/orders/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'notes' => 'Handed to the courier'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.salesive.com/api/v1/orders/{id}/refund"
payload := strings.NewReader("{\n \"notes\": \"Handed to the courier\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.salesive.com/api/v1/orders/{id}/refund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Handed to the courier\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/orders/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Handed to the courier\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Order marked refunded",
"data": {
"_id": "66b1f0a3c2d4e5f6a7b8c9d0",
"orderId": 1042,
"user": {
"_id": "66a0c1d2e3f4a5b6c7d8e9f0",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+2348012345678",
"customerId": "66a0d0e1f2a3b4c5d6e7f8a9"
},
"items": [
{
"_id": "66b1f0a3c2d4e5f6a7b8c9d1",
"product": {
"_id": "6699aabbccddeeff00112233",
"name": "Wireless Earbuds",
"images": [
"https://cdn.salesive.com/p/earbuds.jpg"
]
},
"name": "Wireless Earbuds",
"sku": "WE-BLK-01",
"price": 24990,
"quantity": 2,
"variantAttributes": {},
"imageUrl": "https://cdn.salesive.com/p/earbuds.jpg"
}
],
"status": "processing",
"notes": "Packed and awaiting pickup",
"additionalInfo": [
{
"label": "Gift message",
"value": "Happy birthday!"
}
],
"payment": {
"_id": "66b1f0a3c2d4e5f6a7b8c9e0",
"status": "completed",
"amount": 49980,
"method": "card",
"transactionId": "txn_9f8e7d6c"
},
"coupon": null,
"shipment": null,
"discount": 500,
"subtotal": 49980,
"shippingCost": 1500,
"tax": 0,
"source": "online",
"paymentMethod": "card",
"total": 50980,
"createdAt": "2026-06-21T10:30:00.000Z",
"updatedAt": "2026-06-21T11:20:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Order not found",
"data": null
}Orders
Mark an order refunded
Record a refund the seller made outside Salesive. No money moves. Requires WRITE_ORDERS and WRITE_REFUNDS.
POST
/
orders
/
{id}
/
refund
Mark an order refunded
curl --request POST \
--url https://api.salesive.com/api/v1/orders/{id}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"notes": "Handed to the courier"
}
'import requests
url = "https://api.salesive.com/api/v1/orders/{id}/refund"
payload = { "notes": "Handed to the courier" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({notes: 'Handed to the courier'})
};
fetch('https://api.salesive.com/api/v1/orders/{id}/refund', 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.salesive.com/api/v1/orders/{id}/refund",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'notes' => 'Handed to the courier'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.salesive.com/api/v1/orders/{id}/refund"
payload := strings.NewReader("{\n \"notes\": \"Handed to the courier\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.salesive.com/api/v1/orders/{id}/refund")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"notes\": \"Handed to the courier\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/orders/{id}/refund")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"notes\": \"Handed to the courier\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Order marked refunded",
"data": {
"_id": "66b1f0a3c2d4e5f6a7b8c9d0",
"orderId": 1042,
"user": {
"_id": "66a0c1d2e3f4a5b6c7d8e9f0",
"name": "Ada Lovelace",
"email": "ada@example.com",
"phone": "+2348012345678",
"customerId": "66a0d0e1f2a3b4c5d6e7f8a9"
},
"items": [
{
"_id": "66b1f0a3c2d4e5f6a7b8c9d1",
"product": {
"_id": "6699aabbccddeeff00112233",
"name": "Wireless Earbuds",
"images": [
"https://cdn.salesive.com/p/earbuds.jpg"
]
},
"name": "Wireless Earbuds",
"sku": "WE-BLK-01",
"price": 24990,
"quantity": 2,
"variantAttributes": {},
"imageUrl": "https://cdn.salesive.com/p/earbuds.jpg"
}
],
"status": "processing",
"notes": "Packed and awaiting pickup",
"additionalInfo": [
{
"label": "Gift message",
"value": "Happy birthday!"
}
],
"payment": {
"_id": "66b1f0a3c2d4e5f6a7b8c9e0",
"status": "completed",
"amount": 49980,
"method": "card",
"transactionId": "txn_9f8e7d6c"
},
"coupon": null,
"shipment": null,
"discount": 500,
"subtotal": 49980,
"shippingCost": 1500,
"tax": 0,
"source": "online",
"paymentMethod": "card",
"total": 50980,
"createdAt": "2026-06-21T10:30:00.000Z",
"updatedAt": "2026-06-21T11:20:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Authentication required",
"data": null
}{
"status": 403,
"success": false,
"message": "Insufficient scope",
"data": null
}{
"status": 404,
"success": false,
"message": "Order not found",
"data": null
}Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Path Parameters
The order's id (Mongo ObjectId).
Body
application/json
Replaces the order's notes, as the cancel endpoint does.
Maximum string length:
2000Response
The updated, fully populated order.
Standard Salesive response envelope. The operation-specific payload is carried in data.
Was this page helpful?

