RespireSoft InvoicingAPI docsReferenceWebhooks

Prices

What a product costs, in one currency.

List prices

GET /v1/prices

Key scope catalog:read

Newest first, 20 at a time. See pagination.

Query: active, product, currency, type, limit, starting_after

curl
curl "https://api.invoicing.respiresoft.com/v1/prices?limit=10" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/prices?limit=10", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/prices?limit=10");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/prices?limit=10",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Retrieve price

GET /v1/prices/{id}

Key scope catalog:read

curl
curl "https://api.invoicing.respiresoft.com/v1/prices/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/prices/ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/prices/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/prices/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Create price

POST /v1/prices

Key scope catalog:write. Send an Idempotency-Key header

FieldTypeMeaning
product requiredstringProduct id.
currency requiredstringISO 4217 code, for example EUR.
unit_amountintegerMinor units (1250 is 12.50).
typestringone_time or recurring.
intervalstringday, week, month or year for recurring prices.
interval_countinteger1 to 36.
curl
curl -X POST "https://api.invoicing.respiresoft.com/v1/prices" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"product":"prod_…","currency":"EUR","unit_amount":4900,"type":"recurring","interval":"month"}'
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/prices", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "product": "prod_…",
    "currency": "EUR",
    "unit_amount": 4900,
    "type": "recurring",
    "interval": "month"
  }),
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/prices");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
        "Idempotency-Key: " . bin2hex(random_bytes(16)),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "product" => "prod_…",
        "currency" => "EUR",
        "unit_amount" => 4900,
        "type" => "recurring",
        "interval" => "month",
    ]),
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("POST", "https://api.invoicing.respiresoft.com/v1/prices",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
      "product": "prod_…",
      "currency": "EUR",
      "unit_amount": 4900,
      "type": "recurring",
      "interval": "month"
    },
)
data = res.json()

Update price

PATCH /v1/prices/{id}

Key scope catalog:write

Send only what changes. POST to the same address works too.

FieldTypeMeaning
productstringProduct id.
currencystringISO 4217 code, for example EUR.
unit_amountintegerMinor units (1250 is 12.50).
typestringone_time or recurring.
intervalstringday, week, month or year for recurring prices.
interval_countinteger1 to 36.
curl
curl -X PATCH "https://api.invoicing.respiresoft.com/v1/prices/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product":"prod_…","currency":"EUR","unit_amount":4900,"type":"recurring","interval":"month"}'
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/prices/ID", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "product": "prod_…",
    "currency": "EUR",
    "unit_amount": 4900,
    "type": "recurring",
    "interval": "month"
  }),
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/prices/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "product" => "prod_…",
        "currency" => "EUR",
        "unit_amount" => 4900,
        "type" => "recurring",
        "interval" => "month",
    ]),
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("PATCH", "https://api.invoicing.respiresoft.com/v1/prices/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
    json={
      "product": "prod_…",
      "currency": "EUR",
      "unit_amount": 4900,
      "type": "recurring",
      "interval": "month"
    },
)
data = res.json()

Delete price

DELETE /v1/prices/{id}

Key scope catalog:write

curl
curl -X DELETE "https://api.invoicing.respiresoft.com/v1/prices/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/prices/ID", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
  },
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document
PHP
$ch = curl_init("https://api.invoicing.respiresoft.com/v1/prices/ID");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
    ],
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("DELETE", "https://api.invoicing.respiresoft.com/v1/prices/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()