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.

A payment record is created when a buyer completes or attempts checkout. Use these endpoints to look up payment status and link payments to customers and invoices.

GET /api/gateway/payments

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

Query parameters

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

Response

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

GET /api/gateway/payments/

Fetches a single payment. The paymentId path parameter accepts either a pay_* payment ID or a chk_* checkout session ID.
curl https://dash.getopenrails.com/api/gateway/payments/pay_abc123
# or look up by session ID
curl https://dash.getopenrails.com/api/gateway/payments/chk_nimbus_1056

Response

{
  "id": "pay_abc123",
  "object": "payment",
  "customerId": "cus_7G42M9",
  "invoiceId": "inv_xyz789",
  "sessionId": "chk_nimbus_1056",
  "amount": 116,
  "currency": "USD",
  "status": "paid",
  "ledgerStatus": "settled",
  "route": {
    "id": "card-bridge-a",
    "kind": "card",
    "label": "Credit card"
  },
  "fees": {
    "buyer_fee": 3.72,
    "gateway_fee": 3.48,
    "merchant_net": 112.52,
    "total": 119.72
  },
  "metadata": {
    "order_id": "ord_284"
  },
  "created": "2026-05-24T17:37:00Z"
}

Status values

StatusMeaning
pendingPayment initiated but not yet confirmed.
paidPayment confirmed. Safe to fulfill.
failedPayment failed or was rejected.

Ledger status values

Ledger statusMeaning
pendingSettlement not yet recorded.
settledFunds settled to merchant.
refundedPayment was refunded.