billingCancel
curl --request POST \
--url http://127.0.0.1:9113/v1/account/billing/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": true
}
'import requests
url = "http://127.0.0.1:9113/v1/account/billing/cancel"
payload = {
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": True
}
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({
product: '<string>',
request_key: '<string>',
amount_minor: 123,
invoice_id: '<string>',
plan: '<string>',
trial: true
})
};
fetch('http://127.0.0.1:9113/v1/account/billing/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_PORT => "9113",
CURLOPT_URL => "http://127.0.0.1:9113/v1/account/billing/cancel",
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([
'product' => '<string>',
'request_key' => '<string>',
'amount_minor' => 123,
'invoice_id' => '<string>',
'plan' => '<string>',
'trial' => true
]),
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 := "http://127.0.0.1:9113/v1/account/billing/cancel"
payload := strings.NewReader("{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\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("http://127.0.0.1:9113/v1/account/billing/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9113/v1/account/billing/cancel")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"detail": "<string>",
"id": "<string>",
"retryable": true,
"state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"kind": "<string>",
"provider_id": "<string>",
"request": {
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": true
},
"url": "<string>"
}
],
"meta": {
"consistency": "<string>",
"count": 123,
"next_cursor": "<string>",
"request_id": "<string>",
"sent_ts": "2023-11-07T05:31:56Z",
"snapshot_ts": "2023-11-07T05:31:56Z",
"version": "<string>",
"namespace": "<string>"
},
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
]
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Account and control reference
Billing cancel
Billing cancel: request contract, authentication, parameters and response behavior for the Oddswire private pilot.
billingCancel
curl --request POST \
--url http://127.0.0.1:9113/v1/account/billing/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": true
}
'import requests
url = "http://127.0.0.1:9113/v1/account/billing/cancel"
payload = {
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": True
}
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({
product: '<string>',
request_key: '<string>',
amount_minor: 123,
invoice_id: '<string>',
plan: '<string>',
trial: true
})
};
fetch('http://127.0.0.1:9113/v1/account/billing/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_PORT => "9113",
CURLOPT_URL => "http://127.0.0.1:9113/v1/account/billing/cancel",
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([
'product' => '<string>',
'request_key' => '<string>',
'amount_minor' => 123,
'invoice_id' => '<string>',
'plan' => '<string>',
'trial' => true
]),
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 := "http://127.0.0.1:9113/v1/account/billing/cancel"
payload := strings.NewReader("{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\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("http://127.0.0.1:9113/v1/account/billing/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:9113/v1/account/billing/cancel")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"product\": \"<string>\",\n \"request_key\": \"<string>\",\n \"amount_minor\": 123,\n \"invoice_id\": \"<string>\",\n \"plan\": \"<string>\",\n \"trial\": true\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"detail": "<string>",
"id": "<string>",
"retryable": true,
"state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"kind": "<string>",
"provider_id": "<string>",
"request": {
"product": "<string>",
"request_key": "<string>",
"amount_minor": 123,
"invoice_id": "<string>",
"plan": "<string>",
"trial": true
},
"url": "<string>"
}
],
"meta": {
"consistency": "<string>",
"count": 123,
"next_cursor": "<string>",
"request_id": "<string>",
"sent_ts": "2023-11-07T05:31:56Z",
"snapshot_ts": "2023-11-07T05:31:56Z",
"version": "<string>",
"namespace": "<string>"
},
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
]
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}{
"code": "<string>",
"detail": "<string>",
"invalid_params": [
{
"name": "<string>",
"reason": "<string>"
}
],
"missing": [
{
"detail": "<string>",
"reason": "<string>",
"family": "1x2",
"fixture_id": 4503599627370496,
"quote_key": "<string>",
"source_id": 4503599627370496
}
],
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>"
}Test-only billing; owner session required for mutations, owner/admin for reads. Fixed test catalogue; enrollment ceiling controls source access. Checkout returns do not activate grants. Retry unresolved mutations with the same request UUID. UTC credit cycles, no usage refill, overage off, no Terminal billing or data rights granted.
Full request and response schemas: OpenAPI. Authentication · Prices and coverage · Errors and credits.
POST /v1/account/billing/cancel
Authentication
AccountSession
Parameters
| Name | Location | Required | Description |
|---|---|---|---|
X-Oddswire-Account | header | No | UUID of an account where the signed-in user is a member; defaults to their oldest account. |
Request body
{
"$ref": "#/components/schemas/BillingActionInput"
}
Responses
| Status | Meaning |
|---|---|
| 200 | Account ledger response; no-store. Key secrets appear only once on creation/rotation. Lists contain at most 100 recent entries, active keys first. |
| 400 | Structured problem; see error handling. |
| 401 | Structured problem; see error handling. |
| 403 | Structured problem; see error handling. |
| 404 | Structured problem; see error handling. |
| 405 | Structured problem; see error handling. |
| 409 | Structured problem; see error handling. |
| 422 | Structured problem; see error handling. |
| 429 | Structured problem; see error handling. |
| 500 | Structured problem; see error handling. |
| 503 | Structured problem; see error handling. |
| 504 | Structured problem; see error handling. |
Authorizations
Clerk session JWT, or one-hour CLI-only local session. No cookie authentication.
Headers
UUID of an account where the signed-in user is a member; defaults to their oldest account.
Body
application/json