Core concepts

Requests & responses

Understand JSON bodies, response envelopes and transaction outcomes.

Read the response in layers
  1. Request result

    Check the HTTP status and top-level status.

  2. Response details

    Read metadata.code and the endpoint payload.

  3. Purchase outcome

    For purchases, check data.status and verify uncertain results.

Send JSON for POST requests

HTTP
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

JSON
{
  "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.

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.

Join our Slack community

Did this page help you?

Search documentation