API Environments
You can use the Straddle API in sandbox mode, which doesn’t affect your live data or interact with real banking networks. It’s crucial to use the correct combination of API key and environment URL:- Sandbox API keys must be used with the sandbox environment URL
- Production API keys must be used with the production environment URL
Sandbox Environment
Sandbox Environment
https://sandbox.straddle.io
Use this environment for testing and development. It doesn’t affect live data or interact with real banking networks.
Production Environment
Production Environment
https://production.straddle.io
Use this environment for live transactions. Be cautious as this will interact with real banking networks and affect live data.
Using mismatched keys and URLs will result in authentication errors.
Authentication
Authentication to the API is performed via HTTP Bearer Auth. Your API key should be included in theAuthorization
header of each request:
Request Format
The Straddle API accepts JSON-encoded request bodies. Make sure to set theContent-Type
header to application/json
when sending request data.
Response Format
Responses from the Straddle API are always JSON-encoded. Successful responses include adata
object containing the requested information, while error responses include an error
object with details about what went wrong.
API Limitations
The Straddle API is designed for individual object operations. Bulk updates are not supported, meaning you can work on only one object per request.Best Practices
- Always use HTTPS for API requests to ensure data security.
-
Include a unique
Request-Id
header with each request to help with debugging and tracking. -
Use the
Correlation-Id
header for requests that are part of a larger operation or transaction. - Implement proper error handling to gracefully manage API responses.