RespireSoft InvoicingAPI docsReferenceWebhooks

Payment requests

Ask for an amount without an invoice and get a pay link.

List payment requests

GET /v1/payment_requests

Key scope checkout:read

Newest first, 20 at a time. See pagination.

Query: status, customer, currency, limit, starting_after

curl
curl "https://api.invoicing.respiresoft.com/v1/payment_requests?limit=10" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/payment_requests?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/payment_requests?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/payment_requests?limit=10",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Retrieve payment request

GET /v1/payment_requests/{id}

Key scope checkout:read

curl
curl "https://api.invoicing.respiresoft.com/v1/payment_requests/ID" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY"
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/payment_requests/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/payment_requests/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/payment_requests/ID",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
    },
)
data = res.json()

Create a payment request

POST /v1/payment_requests

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

FieldTypeMeaning
amount requiredintegerMinor units.
currency requiredstringISO 4217 code, for example EUR.
title requiredstring
customerstring
methodsarrayLimit the payment methods.
curl
curl -X POST "https://api.invoicing.respiresoft.com/v1/payment_requests" \
  -H "Authorization: Bearer $RESPIRESOFT_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount":2500,"currency":"EUR","title":"Deposit"}'
Node
const res = await fetch("https://api.invoicing.respiresoft.com/v1/payment_requests", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "amount": 2500,
    "currency": "EUR",
    "title": "Deposit"
  }),
})
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/payment_requests");
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([
        "amount" => 2500,
        "currency" => "EUR",
        "title" => "Deposit",
    ]),
]);
$data = json_decode(curl_exec($ch), true);
Python
import os, uuid, requests

res = requests.request("POST", "https://api.invoicing.respiresoft.com/v1/payment_requests",
    headers={
        "Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
      "amount": 2500,
      "currency": "EUR",
      "title": "Deposit"
    },
)
data = res.json()