SleetPay API

Create checkouts, read customers, orders and subscriptions, ingest usage events, manage seats and validate license keys. Authenticate with an organization access token (`Authorization: Bearer sk_live_...`) created in Dashboard > API keys, or an OAuth access token. Each key carries scopes; an endpoint needing a scope the key lacks answers 403. Amounts are integers in the currency's minor unit (cents for USD). Lists return `{ items, pagination }` and take `page` and `limit` (max 100).

Base URL https://api.sleetpay.com ยท openapi.json

Checkouts

POST /api/v1/checkouts

Create a checkout scope: checkouts:write

Returns a hosted checkout `url`; redirect the buyer there. After payment they land on `success_url?checkout_id=<id>`. Sessions expire after 24 hours.

Request body

FieldTypeNotes
product_id requiredstring
price_idstringDefaults to the product's first active price.
currencystringPicks the product's price in this currency.
seatsinteger
amountintegerPay-what-you-want amount in minor units.
discount_idstring | null
allow_discount_codesboolean
affiliate_codestring
customer_emailstring | null (email)
customer_namestring | null
external_customer_idstring | nullYour own user id; becomes the customer's external_id.
success_urlstring | null (uri)
metadataobjectUp to 20 flat keys. Echoed in webhooks.
curl -X POST https://api.sleetpay.com/api/v1/checkouts \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /api/v1/checkouts/{id}

Get a checkout scope: checkouts:read

Parameters

NameTypeNotes
id pathstringCheckout id
curl -X GET https://api.sleetpay.com/api/v1/checkouts/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY"

Products

GET /api/v1/products

List products scope: products:read

Parameters

NameTypeNotes
page queryinteger
limit queryintegerPage size (max 100).
include_archived querybooleanInclude archived and unapproved products.
curl -X GET https://api.sleetpay.com/api/v1/products \
  -H "Authorization: Bearer $SLEET_API_KEY"

Customers

GET /api/v1/customers

List customers scope: customers:read

Parameters

NameTypeNotes
page queryinteger
limit queryintegerPage size (max 100).
email querystringFilter by exact email.
external_id querystringFilter by your own user id.
curl -X GET https://api.sleetpay.com/api/v1/customers \
  -H "Authorization: Bearer $SLEET_API_KEY"

POST /api/v1/customers

Create a customer scope: customers:write

Request body

FieldTypeNotes
email requiredstring (email)
namestring | null
external_idstring | null
curl -X POST https://api.sleetpay.com/api/v1/customers \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /api/v1/customers/{id}

Get a customer scope: customers:read

Parameters

NameTypeNotes
id pathstringCustomer id
curl -X GET https://api.sleetpay.com/api/v1/customers/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY"

GET /api/v1/customers/{id}/state

Get a customer's entitlements scope: customers:read

Active and past-due subscriptions, granted benefits, credit balances and metered usage in one read.

Parameters

NameTypeNotes
id pathstringCustomer id
curl -X GET https://api.sleetpay.com/api/v1/customers/<id>/state \
  -H "Authorization: Bearer $SLEET_API_KEY"

GET /api/v1/customers/external/{externalId}

Get a customer by your own user id scope: customers:read

Parameters

NameTypeNotes
externalId pathstringYour own user id
curl -X GET https://api.sleetpay.com/api/v1/customers/external/<externalId> \
  -H "Authorization: Bearer $SLEET_API_KEY"

GET /api/v1/customers/external/{externalId}/state

Get entitlements by your own user id scope: customers:read

Parameters

NameTypeNotes
externalId pathstringYour own user id
curl -X GET https://api.sleetpay.com/api/v1/customers/external/<externalId>/state \
  -H "Authorization: Bearer $SLEET_API_KEY"

Orders

GET /api/v1/orders

List orders scope: orders:read

Parameters

NameTypeNotes
page queryinteger
limit queryintegerPage size (max 100).
customer_id querystringOnly this customer's orders.
product_id querystringOnly orders of this product.
curl -X GET https://api.sleetpay.com/api/v1/orders \
  -H "Authorization: Bearer $SLEET_API_KEY"

Subscriptions

GET /api/v1/subscriptions

List subscriptions scope: subscriptions:read

Parameters

NameTypeNotes
page queryinteger
limit queryintegerPage size (max 100).
customer_id querystringOnly this customer's subscriptions.
status querystringFilter by status.
curl -X GET https://api.sleetpay.com/api/v1/subscriptions \
  -H "Authorization: Bearer $SLEET_API_KEY"

GET /api/v1/subscriptions/{id}

Get a subscription scope: subscriptions:read

Parameters

NameTypeNotes
id pathstringSubscription id
curl -X GET https://api.sleetpay.com/api/v1/subscriptions/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY"

PATCH /api/v1/subscriptions/{id}

Cancel at period end, resume, pause, or change seats scope: subscriptions:write

Parameters

NameTypeNotes
id pathstringSubscription id

Request body

FieldTypeNotes
cancel_at_period_endboolean
seatsinteger
pausebooleantrue pauses billing at the end of the paid period; false undoes the pause, or restarts billing today if already paused.
prorationstringHow added seats are billed.
curl -X PATCH https://api.sleetpay.com/api/v1/subscriptions/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /api/v1/subscriptions/{id}

Revoke a subscription now scope: subscriptions:write

Parameters

NameTypeNotes
id pathstringSubscription id
curl -X DELETE https://api.sleetpay.com/api/v1/subscriptions/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY"

Seats

GET /api/v1/seats

List seats scope: seats:read

Pass `subscription_id`, `order_id` or `email`. By email it returns every seat that person holds on a live subscription or paid order.

Parameters

NameTypeNotes
subscription_id querystringSubscription to list seats of.
order_id querystringOrder to list seats of.
email querystringSeats this person holds.
curl -X GET https://api.sleetpay.com/api/v1/seats \
  -H "Authorization: Bearer $SLEET_API_KEY"

POST /api/v1/seats

Assign a seat scope: seats:write

Idempotent per email. 409 when every paid seat is taken.

Request body

FieldTypeNotes
subscription_idstring
order_idstring
email requiredstring (email)
curl -X POST https://api.sleetpay.com/api/v1/seats \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /api/v1/seats/{id}

Revoke a seat scope: seats:write

Parameters

NameTypeNotes
id pathstringSeat id
curl -X DELETE https://api.sleetpay.com/api/v1/seats/<id> \
  -H "Authorization: Bearer $SLEET_API_KEY"

License keys

GET /api/v1/license-keys

List license keys scope: license_keys:read

Parameters

NameTypeNotes
page queryinteger
limit queryintegerPage size (max 100).
customer_id querystringOnly this customer's keys.
benefit_id querystringOnly keys of this benefit.
curl -X GET https://api.sleetpay.com/api/v1/license-keys \
  -H "Authorization: Bearer $SLEET_API_KEY"

POST /api/v1/license-keys/validate

Validate a license key public, no key

Public: call it from your customers' software. `organization_id` plus the secret `key` are the credentials.

Request body

FieldTypeNotes
organization_id requiredstring
key requiredstring
activation_idstring
benefit_idstring
curl -X POST https://api.sleetpay.com/api/v1/license-keys/validate \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /api/v1/license-keys/activate

Activate a license key public, no key

Idempotent per `label`. 403 once the activation limit is reached or the key is revoked or expired.

Request body

FieldTypeNotes
organization_id requiredstring
key requiredstring
label requiredstring
metaobjectUp to 20 flat keys. Echoed in webhooks.
curl -X POST https://api.sleetpay.com/api/v1/license-keys/activate \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /api/v1/license-keys/deactivate

Deactivate a license key public, no key

Request body

FieldTypeNotes
organization_id requiredstring
key requiredstring
activation_id requiredstring
curl -X POST https://api.sleetpay.com/api/v1/license-keys/deactivate \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Usage

POST /api/v1/events

Ingest usage events scope: events:write

Send one event or `{ events: [...] }` (1 to 500). Safe to retry: the `idempotencyKey` never double-counts. 402 when a prepaid customer has too few credits.

Request body

One of: UsageEvent | object

curl -X POST https://api.sleetpay.com/api/v1/events \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /api/v1/meters

List meters scope: meters:read

curl -X GET https://api.sleetpay.com/api/v1/meters \
  -H "Authorization: Bearer $SLEET_API_KEY"

Credits

GET /api/v1/balance

Get a customer's credit balances scope: balance:read

Parameters

NameTypeNotes
externalCustomerId querystringYour own user id.
curl -X GET https://api.sleetpay.com/api/v1/balance \
  -H "Authorization: Bearer $SLEET_API_KEY"

POST /api/v1/credits/transfer

Transfer credits between customers scope: credits:write

Atomic, never overdraws (402 with `available`), safe to retry with the same `idempotency_key`.

Request body

FieldTypeNotes
from_external_customer_id requiredstring
to_external_customer_id requiredstring
units requiredinteger
unit_labelstring
idempotency_key requiredstring
curl -X POST https://api.sleetpay.com/api/v1/credits/transfer \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Customer sessions

POST /api/v1/customer-sessions

Create a customer portal session scope: customer_sessions:write

Pass exactly one of `customer_id`, `external_customer_id`, `customer_email`. Send the customer to `customer_portal_url`.

Request body

FieldTypeNotes
customer_idstring
external_customer_idstring
customer_emailstring (email)
curl -X POST https://api.sleetpay.com/api/v1/customer-sessions \
  -H "Authorization: Bearer $SLEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'