API reference

Base URL https://api.suward.com. 18 endpoints across 3 resource groups, generated from the public OpenAPI 3.1 specification — the same file you can feed to your tooling.

Conventions

  • Authentication: every merchant endpoint takes the X-Api-Key header; keys are project-scoped and server-side only. → Authentication
  • Amounts are integer strings in the asset’s smallest unit (decimals from GET /v1/assets); never floats.
  • Timestamps are Unix milliseconds.
  • Pagination is cursor-based: limit (default 20, max 100), lastId from the previous page, order asc/desc.
  • Errors return { errorCode, message, args? } with a stable integer errorCode. → Errors & limits
  • Idempotency: pass your own externalId on create calls; a duplicate value never creates a second resource.
request.http
POST /v1/payments HTTP/1.1
Host: api.suward.com
X-Api-Key: sk_live_…
Content-Type: application/json

Paging a list

terminal
curl "https://api.suward.com/v1/payments?limit=100&order=desc" \
  -H "X-Api-Key: $SUWARD_API_KEY"

# next page: pass the last item's id
curl "https://api.suward.com/v1/payments?limit=100&lastId=pay_3f9a2c" \
  -H "X-Api-Key: $SUWARD_API_KEY"

Every list response carries hasMore — keep paging while it is true.

Stability

Suward API changes are backward compatible: existing integrations keep working. We add fields, assets, networks, and statuses — we don’t repurpose or remove what your code already relies on. Two habits keep your integration future-proof: read enumerations (statuses, assets, networks) from the API instead of hardcoding them, and ignore unknown fields in responses and webhooks.

We mayWe will not
Add fields to responses and webhook payloadsRemove or rename a field your code reads
Add assets, networks, statuses, and sub-statusesRepurpose the meaning of an existing value
Add optional request fieldsMake a previously optional field required
Add new endpointsChange the shape of an existing one under you

Endpoint groups

Every endpoint has its own page — parameters, fields, and a copy-ready request and response side by side. The group pages list what each one holds.

The shared error contract and signed events per resource are documented separately → Webhooks, Errors & limits.

Generate your own client

The specification is public OpenAPI 3.1 and is the source of the official SDKs, so anything you generate from it stays consistent with them. → SDK reference

Something unclear? payments@suward.com — we treat every integration question as a documentation defect.