API Reference
API REFERENCE
API Reference
Suward Gateway V2 public REST contract. 59 endpoints, OpenAPI 3.1.
Generated from swagger.json (OpenAPI 3.1), built from Go annotations in gateway-v2.
Authentication
The schemes below are exactly those in the swagger securitySchemes.
| Scheme | Where | Purpose |
|---|---|---|
| accessToken | cookie accessToken (HttpOnly) | Browser session (dashboard) |
| refreshToken | cookie refreshToken (HttpOnly) | Session refresh |
| X-Api-Key | header X-Api-Key | Server-to-server merchant integration |
Bearer / sk_* format is not declared in swagger and is not documented as fact until confirmed in the gateway code.
Cross-cutting rules
Idempotency
Via externalId on a payment (order dedup). There is no Idempotency-Key header.
Rate limit
v2 API keys are rate-limited. See API keys.
Pagination
ListPayments uses cursor pagination by last_id.
Money
All monetary fields are strings, never floats.
Errors
Standard error shapes from the swagger error schemas.
Endpoint groups
Browse each resource group for endpoints, request shapes, and notes.