Payment orchestration SaaS — shops, sessions, providers, rotations.
The Limbus Pay API gives programmatic access to payment session state, rotation rules, provider connections, and the tenant audit log. Writes are applied on the writer daemon side; this public API is read-first in v0.1 and will gain write endpoints as those server-side purposes land.
Keys begin with `pay_live_` (real money) or `pay_test_` (test environment, separate data, no settlement). Pass them in `Authorization: Bearer`.
/v1/tenant Get the tenant tenant:readResponses
200 — The tenant.
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"plan": {
"type": "string"
},
"balance_usd": {
"type": "string"
},
"frozen": {
"type": "boolean"
},
"email_verified": {
"type": "boolean"
},
"twofa_enabled": {
"type": "boolean"
},
"trial_until": {
"type": "string",
"nullable": true
},
"environment": {
"type": "string",
"enum": [
"live",
"test"
]
},
"limits": {
"type": "object",
"properties": {
"monthly_sessions": {
"type": "integer"
},
"failover_rules": {
"type": "integer"
}
}
}
}
}/v1/shops List shops shops:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| query | limit | {"type":"integer","minimum":1,"maximum":100,"default":20} | |
| query | starting_after | {"type":"string"} |
Responses
200 — Shops of the tenant.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"has_more": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "shop"
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"url": {
"type": "string"
},
"currency": {
"type": "string"
},
"webhook_url": {
"type": "string"
},
"key_version": {
"type": "string"
},
"hmac_rotation_pending": {
"type": "boolean"
},
"business_descriptor": {
"type": "string"
},
"give_up_fast_window_sec": {
"type": "integer"
}
}
}
}
}
}/v1/shops Create a shop shops:writeParameters
| In | Name | Required | Shape |
|---|---|---|---|
| header | Idempotency-Key | {"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x20-\\x7e]+$"} |
Request body (application/json, required)
{
"type": "object",
"required": [
"slug",
"url",
"currency",
"webhook_url"
],
"properties": {
"slug": {
"type": "string",
"pattern": "^[a-z0-9_]{1,48}$"
},
"url": {
"type": "string",
"maxLength": 255
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"webhook_url": {
"type": "string",
"maxLength": 512,
"pattern": "^https://"
},
"business_descriptor": {
"type": "string",
"maxLength": 80
}
}
}Responses
201 — One shop.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "shop"
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"url": {
"type": "string"
},
"currency": {
"type": "string"
},
"webhook_url": {
"type": "string"
},
"key_version": {
"type": "string"
},
"hmac_rotation_pending": {
"type": "boolean"
},
"business_descriptor": {
"type": "string"
},
"give_up_fast_window_sec": {
"type": "integer"
}
}
}/v1/shops/{id} Get a shop shops:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| path | id | yes | {"type":"string","pattern":"^s_[A-Za-z0-9]{22}$"} |
Responses
200 — One shop.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "shop"
},
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"url": {
"type": "string"
},
"currency": {
"type": "string"
},
"webhook_url": {
"type": "string"
},
"key_version": {
"type": "string"
},
"hmac_rotation_pending": {
"type": "boolean"
},
"business_descriptor": {
"type": "string"
},
"give_up_fast_window_sec": {
"type": "integer"
}
}
}/v1/shops/{id}/rotation Get the rotation for a shop rotations:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| path | id | yes | {"type":"string","pattern":"^s_[A-Za-z0-9]{22}$"} |
Responses
200 — Rotation rules for a shop.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "rotation"
},
"shop_id": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"shop_driven",
"percentage",
"priority_limit"
],
"nullable": true
},
"config": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"updated_at": {
"type": "string",
"nullable": true
}
}
}/v1/shops/{id}/rotation Upsert the rotation for a shop rotations:writeParameters
| In | Name | Required | Shape |
|---|---|---|---|
| path | id | yes | {"type":"string","pattern":"^s_[A-Za-z0-9]{22}$"} |
| header | Idempotency-Key | {"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x20-\\x7e]+$"} |
Request body (application/json, required)
{
"type": "object",
"required": [
"mode"
],
"properties": {
"mode": {
"type": "string",
"enum": [
"shop_driven",
"percentage",
"priority_limit"
]
},
"config": {
"type": "object",
"description": "Mode-specific config. percentage \u2192 {splits: [{credential_pair_id, percentage}]} with percentages summing to 100. priority_limit \u2192 {rules: [{credential_pair_id, priority, daily_cap_usd?}]}. shop_driven \u2192 whatever the shop passes.",
"additionalProperties": true
}
}
}Responses
200 — Rotation rules for a shop.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "rotation"
},
"shop_id": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"shop_driven",
"percentage",
"priority_limit"
],
"nullable": true
},
"config": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"updated_at": {
"type": "string",
"nullable": true
}
}
}/v1/sessions List payment sessions sessions:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| query | limit | {"type":"integer","minimum":1,"maximum":100,"default":20} | |
| query | starting_after | {"type":"string"} | |
| query | shop_id | {"type":"string","pattern":"^s_[A-Za-z0-9]{22}$"} | |
| query | status | {"type":"string","enum":["created","pending","paid","partially_paid","partially_paid_finalized","cancelled","failed","refunded","disputed","expired","quarantine"]} |
Responses
200 — Payment sessions.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"has_more": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "payment_session"
},
"id": {
"type": "string"
},
"shop_id": {
"type": "string"
},
"shop_order_id": {
"type": "string"
},
"provider": {
"type": "string"
},
"status": {
"type": "string"
},
"shop_amount": {
"type": "string"
},
"shop_currency": {
"type": "string"
},
"provider_amount": {
"type": "string"
},
"provider_currency": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"at": {
"type": "string"
},
"payload": []
}
}
}
}
}
}
}
}/v1/sessions/{id} Get a payment session sessions:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| path | id | yes | {"type":"string","pattern":"^ps_[A-Za-z0-9]{22}$"} |
Responses
200 — One payment session with its event timeline.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "payment_session"
},
"id": {
"type": "string"
},
"shop_id": {
"type": "string"
},
"shop_order_id": {
"type": "string"
},
"provider": {
"type": "string"
},
"status": {
"type": "string"
},
"shop_amount": {
"type": "string"
},
"shop_currency": {
"type": "string"
},
"provider_amount": {
"type": "string"
},
"provider_currency": {
"type": "string"
},
"description": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"at": {
"type": "string"
},
"payload": []
}
}
}
}
}/v1/providers List connected providers providers:readResponses
200 — Provider connections.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "provider_connection"
},
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"created_at": {
"type": "string"
},
"active_pairs": {
"type": "integer"
}
}
}
}
}
}/v1/webhooks List webhook deliveries webhooks:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| query | limit | {"type":"integer","minimum":1,"maximum":100,"default":20} | |
| query | starting_after | {"type":"string"} | |
| query | shop_id | {"type":"string","pattern":"^s_[A-Za-z0-9]{22}$"} |
Responses
200 — Outgoing webhook delivery queue.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"has_more": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "webhook_delivery"
},
"id": {
"type": "string"
},
"shop_id": {
"type": "string"
},
"session_id": {
"type": "string"
},
"event_type": {
"type": "string"
},
"attempts": {
"type": "integer"
},
"last_attempt_at": {
"type": "string",
"nullable": true
},
"last_status": {
"type": "string",
"nullable": true
},
"next_attempt_at": {
"type": "string",
"nullable": true
},
"delivered_at": {
"type": "string",
"nullable": true
}
}
}
}
}
}/v1/events List audit events events:readParameters
| In | Name | Required | Shape |
|---|---|---|---|
| query | limit | {"type":"integer","minimum":1,"maximum":100,"default":20} | |
| query | starting_after | {"type":"string"} | |
| query | type | {"type":"string"} |
Responses
200 — Tenant audit events.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"has_more": {
"type": "boolean"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "event"
},
"seq": {
"type": "integer"
},
"type": {
"type": "string"
},
"at": {
"type": "string"
},
"actor_kind": {
"type": "string"
},
"subject_kind": {
"type": "string"
},
"subject_id": {
"type": "string",
"nullable": true
},
"payload": []
}
}
}
}
}/v1/account/keys List API keys account:keys:readResponses
200 — API keys of the tenant (never their plaintext).
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "list"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "api_key"
},
"id": {
"type": "string",
"pattern": "^k_[A-Za-z0-9]{22}$"
},
"env": {
"type": "string",
"enum": [
"live",
"test"
]
},
"prefix": {
"type": "string",
"maxLength": 16
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string",
"nullable": true
},
"created_at": {
"type": "string"
},
"last_used_at": {
"type": "string",
"nullable": true
},
"revoked_at": {
"type": "string",
"nullable": true
}
}
}
}
}
}/v1/account/keys Create an API key account:keys:writeParameters
| In | Name | Required | Shape |
|---|---|---|---|
| header | Idempotency-Key | {"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x20-\\x7e]+$"} |
Request body (application/json, required)
{
"type": "object",
"properties": {
"env": {
"type": "string",
"enum": [
"live",
"test"
],
"description": "Defaults to the env of the key making the request."
},
"name": {
"type": "string",
"maxLength": 60
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"*"
]
}
}
}Responses
201 — The newly created key. `secret` is shown ONCE.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "api_key"
},
"id": {
"type": "string"
},
"env": {
"type": "string",
"enum": [
"live",
"test"
]
},
"prefix": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string",
"nullable": true
},
"secret": {
"type": "string",
"description": "Plaintext key \u2014 shown ONCE. Store in your server environment immediately."
}
}
}/v1/account/keys/{id} Revoke an API key account:keys:deleteParameters
| In | Name | Required | Shape |
|---|---|---|---|
| path | id | yes | {"type":"string","pattern":"^k_[A-Za-z0-9]{22}$"} |
Responses
200 — Key revoked; it will not authenticate further calls.
{
"type": "object",
"properties": {
"object": {
"type": "string",
"const": "api_key"
},
"id": {
"type": "string"
},
"revoked": {
"type": "boolean"
}
}
}| Scope | Description |
|---|---|
tenant:read | Read the tenant, plan, balance, limits. |
shops:read | List and read shops. |
shops:write | Create and update shops. |
sessions:read | List and read payment sessions and their events. |
providers:read | List provider connections. |
rotations:read | Read rotation rules per shop. |
rotations:write | Upsert the rotation rule for a shop. |
webhooks:read | Read the outgoing webhook delivery queue. |
events:read | Read the tenant audit log. |
account:keys:read | List API keys of the tenant (never their plaintext). |
account:keys:write | Create new API keys. The secret is shown ONCE in the create response. |
account:keys:delete | Revoke an API key. Further calls with it get 401 invalid_key. |
Every error answer has {error:{type,code,message,doc_url,request_id,param?}}. code is stable across versions. The anchor id on each row is the #code fragment of doc_url.
| Code | HTTP | Type |
|---|---|---|
authentication_required | 401 | |
invalid_key | 401 | |
live_mode_disabled | 403 | |
scope_insufficient | 403 | |
invalid_request | 400 | |
invalid_body | 400 | |
missing_field | 400 | |
invalid_field | 400 | |
https_required | 400 | |
route_not_found | 404 | |
method_not_allowed | 405 | |
not_found | 404 | |
conflict | 409 | |
rate_limited | 429 | |
plan_quota_exceeded | 429 | |
server_error | 500 | |
service_unavailable | 503 |