application/json, every response follows the same envelope shape, and webhook events arrive in one of two documented formats. Use this page as your formatting reference when building or debugging your integration.
Standard Request Format
Include the following header on every request:Standard Response Format
Success Response
Every successful response wraps its payload in the same envelope:Error Response
Response Code Table
response_code is always one of these two-digit codes. It never carries the HTTP status code ("400", "429", …).Pagination Format
All list endpoints return a standard pagination object insidedata:
Control pagination with the
limit and offset query parameters:
FX trade listings are the one exception:
GET /fx/trades uses cursor pagination via startAfter (the last tradeId of the previous page) instead of limit/offset.Amount Formatting
Strails uses three amount representations, and the correct one depends on the individual endpoint - not on whether the operation “feels” fiat or on-chain. Sending the wrong one is the single most common integration mistake, so check this table before you send any amount.Token decimals
Used whenever you convert to or from the smallest unit:5000000000 means 5,000 cNGN (6 decimals -> 5000 x 10^6).
Helper Functions
Use these functions to convert between display amounts and the values the API expects.- JavaScript
- Python
- PHP
Webhook Payload Formats
Strails sends webhook events asHTTP POST requests to the URL you configure via /setwebhook. Your endpoint must respond with HTTP 200 to acknowledge receipt.
Two payload formats are in use depending on the event source:
Detect the format in your handler by checking which top-level key is present:
Legacy Format
The legacy format uses lowercaseevent and data keys:
Virtual Account Format
The virtual account format usesnotify, notifyType, and a PascalCase Data object: