Requests & responses
Understand JSON bodies, response envelopes and transaction outcomes.
- Request result
Check the HTTP status and top-level status.
- Response details
Read metadata.code and the endpoint payload.
- Purchase outcome
For purchases, check data.status and verify uncertain results.
Send JSON for POST requests
Content-Type: application/json Accept: application/json Authorization: Bearer YOUR_API_KEY
Keep phone, meter and smart-card numbers as strings. Product codes are identifiers, not display names. Copy exact codes from product responses.
The response envelope
{
"status": true,
"message": "Request successful",
"data": {},
"metadata": {
"code": "MACHINE_READABLE_CODE",
"timestamp": 1789340677,
"trace_id": "EXAMPLETRACE"
}
}
| Field | How to use it |
|---|---|
| status | Request-level boolean. Check with the HTTP status and metadata code. |
| message | Human-readable description. Do not parse it as a stable result identifier. |
| data | Endpoint-specific payload. See the endpoint examples. |
| metadata.code | Machine-readable result or error code. |
| metadata.timestamp | Response timestamp for diagnostics. |
| metadata.trace_id | Support correlation identifier. |
HTTP success is not always fulfillment
Avoid floating-point arithmetic for money. Preserve the precision of amounts returned by the endpoint.
Always check metadata.code; do not rely on HTTP status alone. See response codes and recommended
handling.
Questions? Let’s work through them.
Having an issue or need help with your integration? Join the Strongmb Slack community to ask questions and get assistance from our team and other developers.
Keep API keys and customer details private when sharing examples.
Experiencing a service issue? Check Strongmb’s service status for incident updates.
Did this page help you?
Up to 100 characters. Please leave out personal details, account information and API keys.