Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getopenrails.com/llms.txt

Use this file to discover all available pages before exploring further.

An invoice is created alongside a payment and represents the billing record for a checkout session. Use these endpoints to look up invoices by customer, payment, or invoice ID.

GET /api/gateway/invoices

Returns a paginated list of invoices.
curl "https://dash.getopenrails.com/api/gateway/invoices?limit=20"

Query parameters

ParameterTypeDescription
limitnumberMaximum number of records to return. Defaults to 20.
customerIdstringFilter by customer cus_* ID.
paymentIdstringFilter by payment pay_* ID.
invoiceIdstringFilter to a specific invoice by inv_* ID.
statusstringFilter by invoice status.

Response

{
  "object": "list",
  "data": [
    {
      "id": "inv_xyz789",
      "object": "invoice",
      "customerId": "cus_7G42M9",
      "paymentId": "pay_abc123",
      "sessionId": "chk_nimbus_1056",
      "amount": 116,
      "currency": "USD",
      "status": "paid",
      "created": "2026-05-24T17:37:00Z"
    }
  ],
  "hasMore": false
}

GET /api/gateway/invoices/

Fetches a single invoice by its inv_* ID.
curl https://dash.getopenrails.com/api/gateway/invoices/inv_xyz789

Response

{
  "id": "inv_xyz789",
  "object": "invoice",
  "customerId": "cus_7G42M9",
  "paymentId": "pay_abc123",
  "sessionId": "chk_nimbus_1056",
  "amount": 116,
  "currency": "USD",
  "status": "paid",
  "metadata": {
    "order_id": "ord_284"
  },
  "created": "2026-05-24T17:37:00Z"
}

Status values

StatusMeaning
openInvoice created; payment not yet received.
paidPayment confirmed and invoice closed.
voidInvoice voided before payment.
To look up an invoice by payment, use the paymentId filter on the list endpoint or navigate from the payment record directly.