Cancel Order
curl --request POST \
--url https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel \
--header 'API-Key: <api-key>'import requests
url = "https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel"
headers = {"API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'API-Key': '<api-key>'}};
fetch('https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel', 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://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order cancelled",
"data": { "id": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a", "status": "cancelled" }
}
API Reference
Cancel Order
Cancel one of your payment orders that has not yet reached a final state.
POST
/
v1
/
sender
/
orders
/
{id}
/
cancel
Cancel Order
curl --request POST \
--url https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel \
--header 'API-Key: <api-key>'import requests
url = "https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel"
headers = {"API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'API-Key': '<api-key>'}};
fetch('https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel', 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://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://b2b.usetapp.xyz/v1/sender/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Order cancelled",
"data": { "id": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a", "status": "cancelled" }
}
Cancels an order you own. Orders that are already final (
cancelled,
expired, settled, refunded) are returned unchanged with a message noting
they are final.
Cancelling only affects Rails’ order record. For a non-custodial EVM/Starknet
order, if you have already submitted
createOrder on-chain, settlement follows
the on-chain state — cancel before you submit.Header Parameters
string
required
Unique API key issued manually through Telegram.
Path Parameters
string
required
The order id (
orderRef) returned at creation.Response
string
Response state (
success).{
"status": "success",
"message": "Order cancelled",
"data": { "id": "c7326d65-dfff-44c2-8bcc-c0756dfb6c0a", "status": "cancelled" }
}