Orders
Cancel an order
One action cancels any order. For the first 15 seconds a cancel is instant and refunds everything. After that it becomes a request where the service supports it. Send order for one object, or orders for an array with one entry per order.
https://notpanel.com/api/v3action=cancel- API key required
- Rate limited
- Body:
application/x-www-form-urlencoded
Parameters
Always sent
keystringRequired- Your API key.
actionstringRequiredcancelMust be the literal string "cancel".
Send order or orders.
orderintegerOne of these- One order number.
ordersstring (CSV)One of these- Up to 100 comma-separated order numbers. Cancel counts order ids: 30 per minute per account.
curl -X POST https://notpanel.com/api/v3 \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=YOUR_API_KEY&action=cancel&orders=1,2,3"const res = await fetch("https://notpanel.com/api/v3", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "YOUR_API_KEY",
action: "cancel",
orders: "1,2,3",
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://notpanel.com/api/v3",
data={
"key": "YOUR_API_KEY",
"action": "cancel",
"orders": "1,2,3",
},
)
print(res.json())<?php
$body = http_build_query([
'key' => 'YOUR_API_KEY',
'action' => 'cancel',
'orders' => '1,2,3',
]);
$response = file_get_contents('https://notpanel.com/api/v3', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
'content' => $body,
'ignore_errors' => true,
],
]));
print_r(json_decode($response, true));
Replace YOUR_API_KEY with the key from your API page.
[
{
"order": 1,
"cancel": 1,
"state": "canceled",
"refund": "1.20"
},
{
"order": 2,
"cancel": 1,
"state": "requested"
},
{
"order": 3,
"cancel": {
"error": "Cancel is not available for this order",
"error_code": "CANCEL_NOT_AVAILABLE",
"retryable": false
}
}
]Errors
- 400
{"error":"Maximum 100 IDs per request","error_code":"TOO_MANY_IDS","retryable":false}More than 100 order numbers in orders.
- 429
{"error":"Rate limit exceeded","error_code":"API_RATE_LIMITED","retryable":true,"retry_after":12}More than 30 order ids in a minute. Wait for Retry-After.
What an entry can say
Entries come back in the order you sent them. A problem with one order never stops the others.
Answers
canceledstate: "canceled"withrefund. The order was canceled right away and fully refunded: it was inside the first 15 seconds, or it had not been sent yet.requestedstate: "requested". A cancel request was recorded and sent. The order keeps running until the service decides, and any refund is made automatically.asked_againstate: "requested"again. You asked within 10 minutes of the last answer, so the saved answer is returned and nothing is asked again. After 10 minutes the request is sent again.CANCEL_REFUSED- The service said no.
retry_afteranddetails.timesay when you can ask again. CANCEL_NOT_AVAILABLE- This order cannot be canceled, for example because the service does not support cancel requests.
ORDER_FINISHED- The order is already finished.
ORDER_NOT_FOUND- No such order on your account.
Instant cancel
During the first 15 seconds after placement, every order can be canceled for a full refund, whatever the service. An order that is waiting and was never sent can also be canceled instantly at any time. The refund is part of the entry.
key=YOUR_API_KEY&action=cancel&order=1234574{
"order": 1234574,
"status": "Canceled",
"status_key": "cancelled",
"cancel": 1,
"state": "canceled",
"refund": "1.20",
"refund_pending": 0
}Cancel requests
After the free window, a cancel is a request. It only works for services whose cancel is true in the list, and only while the order is processing or in progress. Whatever is not yet delivered is refunded automatically, and status shows can_cancel and cancel_state.
key=YOUR_API_KEY&action=cancel&order=1234576{
"error": "The order could not be canceled. You can ask again after 2026-10-03T10:10:00.000Z.",
"error_code": "CANCEL_REFUSED",
"retryable": true,
"details": {
"time": "2026-10-03T10:10:00.000Z"
},
"retry_after": 540
}Cancel errors
With order these are the whole reply, with their HTTP status. With orders they appear inside the array entries, and only TOO_MANY_IDS fails the whole request.
- 404
ORDER_NOT_FOUND
Order not foundNo order with this number belongs to your account. Fix the request first.
- 409
ORDER_FINISHED
Order is already {status}The order has already finished. Fix the request first.
- 409
CANCEL_NOT_AVAILABLE
Cancel is not available for this orderCancel is not possible for this order. Fix the request first.
- 409
CANCEL_REFUSED
The order could not be canceled. You can ask again after {time}.The cancel request was refused. You can ask again after the time in details.time. Retrying can help.
- 400
TOO_MANY_IDS
Maximum 100 IDs per requestA list holds more ids than one request may carry. Fix the request first.