Hyperrails API Response Codes
Hyperrails uses standard HTTP response codes to communicate the outcome of API requests. Always inspect both the HTTP status code and the response body to fully understand what happened.Success (2xx)
-
200 OK
The request was processed successfully.
⚠️ Always inspect the response payload to confirm the actual transaction state. -
201 Created
A new resource was successfully created (e.g., transactions, accounts, or configurations).
Client Errors (4xx)
-
400 Bad Request
The request is malformed or missing required parameters.
✔️ Validate request payloads and data types. -
401 Unauthorized
Authentication failed due to a missing or invalid API key.
✔️ Ensure your API key is included in theAuthorizationheader. -
403 Forbidden
The API key does not have permission to perform the requested action.
✔️ Verify the key’s scope or assigned role. -
404 Not Found
The requested resource does not exist or the endpoint is incorrect. -
429 Too Many Requests
Rate limit exceeded.
✔️ Implement retry logic with exponential backoff.
Server Errors (5xx)
- 500, 502, 503, 504
These indicate internal server errors on Hyperrails’s infrastructure.
✔️ Treat the outcome as inconclusive and retry later.
✔️ If persistent, contact support.
Error Handling Best Practices
Beyond HTTP status codes, Hyperrails responses may include structured error objects with additional context such as error type, message, and resolution hints.General Guidelines
-
Do Not Assume Outcomes
Network or timeout errors may leave the transaction state unknown. -
Rely on Webhooks
Webhooks provide authoritative confirmation of transaction outcomes and should be treated as the source of truth.
Common Error Types
Error Code Reference
Every 4xx/5xx response body includes a machine-readablecode field.
Branch on code, not on the human-readable message (message text may
change; code will not).
By properly handling these errors and relying on webhooks for final state confirmation, you can build resilient, fault-tolerant integrations with the Hyperrails API.