API reference
Base URL https://app.satsrail.com. Merchant endpoints, under
/api/v1/m/, take a secret key (sk_live_…, or
sk_test_… in test mode) as
Authorization: Bearer. Public endpoints, under
/api/v1/pub/, take a publishable key
(pk_live_…) where they need one.
A live secret key works on the Pro and Enterprise plans. On Free or
Starter it is answered 403 with the error
plan_feature_unavailable (details.feature is
api); test keys and publishable keys (pay.js) work on every
plan.
This page draws the full reference with JavaScript. The same reference as text, with every parameter, request field and example response: Markdown. The document it is drawn from: OpenAPI 3.1 (JSON). Every page of these docs in one file: llms-full.txt.
Merchant API
| Method | Path | Summary |
|---|---|---|
POST | /api/v1/m/sessions | Sign a person in on a POS |
DELETE | /api/v1/m/sessions | Sign this device out |
POST | /api/v1/m/sessions/activate | Get a key for this device |
POST | /api/v1/m/sessions/renew | Keep this device's key |
GET | /api/v1/m/api_token | Read the key you are calling with |
GET | /api/v1/m/api_tokens/{id}/usage | Read a key's usage |
GET | /api/v1/m/merchant | Read the merchant |
GET | /api/v1/m/locations | List locations |
POST | /api/v1/m/locations | Create a location |
GET | /api/v1/m/locations/{id} | Read a location |
PATCH | /api/v1/m/locations/{id} | Change a location |
POST | /api/v1/m/locations/{id}/archive | Archive a location |
POST | /api/v1/m/locations/{id}/restore | Restore a location |
GET | /api/v1/m/catalog | Read the whole catalog |
GET | /api/v1/m/catalog/version | Ask whether the catalog changed |
GET | /api/v1/m/products | List products |
POST | /api/v1/m/products | Create a product |
GET | /api/v1/m/products/{id} | Read a product |
PATCH | /api/v1/m/products/{id} | Change a product |
DELETE | /api/v1/m/products/{id} | Delete a product |
POST | /api/v1/m/products/{product_id}/media_keys | Link a media key to a product |
DELETE | /api/v1/m/products/{product_id}/media_keys/{id} | Unlink a media key from a product |
GET | /api/v1/m/product_types | List product types |
POST | /api/v1/m/product_types | Create a product type |
GET | /api/v1/m/product_types/{id} | Read a product type |
PATCH | /api/v1/m/product_types/{id} | Change a product type |
DELETE | /api/v1/m/product_types/{id} | Delete a product type |
GET | /api/v1/m/orders | List orders |
POST | /api/v1/m/orders | Create an order |
GET | /api/v1/m/orders/{id} | Read an order |
PATCH | /api/v1/m/orders/{id} | Change an order |
DELETE | /api/v1/m/orders/{id} | Cancel an order |
POST | /api/v1/m/invoices/generate | Generate an invoice for an order |
GET | /api/v1/m/invoices/{id} | Read an invoice |
GET | /api/v1/m/invoices/{id}/qr | Get the invoice as a QR code |
POST | /api/v1/m/invoices/{id}/simulate_expiry | Make a test invoice run out |
POST | /api/v1/m/invoices/{id}/simulate_payment | Pay a test invoice |
GET | /api/v1/m/invoices/{id}/status | Ask whether an invoice was paid |
POST | /api/v1/m/payment_requests | Ask for a payment of an amount |
GET | /api/v1/m/payment_requests/{id} | Read a payment request |
GET | /api/v1/m/payment_requests/{id}/status | Ask whether a payment request was paid |
GET | /api/v1/m/payments | List payments |
GET | /api/v1/m/payments/{id} | Read a payment |
GET | /api/v1/m/checkout_sessions | List checkout sessions |
POST | /api/v1/m/checkout_sessions | Create a checkout session |
GET | /api/v1/m/checkout_sessions/{id} | Read a checkout session |
GET | /api/v1/m/webhooks | List webhook endpoints |
POST | /api/v1/m/webhooks | Create a webhook endpoint |
GET | /api/v1/m/webhooks/{id} | Read a webhook endpoint |
PATCH | /api/v1/m/webhooks/{id} | Change a webhook endpoint |
DELETE | /api/v1/m/webhooks/{id} | Delete a webhook endpoint |
GET | /api/v1/m/sales | List sales |
GET | /api/v1/m/sales/{id} | Read a sale |
GET | /api/v1/m/wallets | List wallets |
GET | /api/v1/m/wallets/{id} | Read a wallet |
GET | /api/v1/m/media_keys | List media keys |
POST | /api/v1/m/media_keys | Create a media key |
GET | /api/v1/m/media_keys/{id} | Read a media key |
PATCH | /api/v1/m/media_keys/{id} | Change a media key |
DELETE | /api/v1/m/media_keys/{id} | Delete a media key |
POST | /api/v1/m/media_keys/{id}/clear_old_key | Clear a rotated key's old key |
GET | /api/v1/m/media_keys/{id}/key | Read a media key's secret |
POST | /api/v1/m/media_keys/{id}/products | Link products to a media key |
DELETE | /api/v1/m/media_keys/{id}/products/{product_id} | Unlink a product from a media key |
POST | /api/v1/m/media_keys/{id}/rotate | Rotate a media key |
POST | /api/v1/m/access/verify | Check a buyer's access token |
Public API
| Method | Path | Summary |
|---|---|---|
GET | /api/v1/pub/orders/{id} | Confirm a paid order |
POST | /api/v1/pub/checkout_sessions | Create a checkout session from a web page |
POST | /api/v1/pub/access/verify | Check a buyer's access token from a web page |