Getting Started
A step-by-step guide to integrating with the hexCore API
The hexCore API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Base URL
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
https://sandbox.hexcore.io/v2Use this environment for testing and integration. No real money is moved.
https://api.hexcore.io/v2Use this environment for live transactions. Ensure your API keys are kept secure.
Authentication
The hexCore API uses API keys to authenticate requests. You can view and manage your API keys in the hexCore Dashboard.
Authentication to the API is performed via HTTP Bearer Auth. Provide your API key as the bearer token value in the Authorization header.
Authorization: Bearer sk_test_your_secret_key_hereYour First Request
Let's make a simple request to check your balance. Replace the bearer token with your actual Sandbox API key.
curl "https://sandbox.hexcore.io/v2/account/balance" \-H "Authorization: Bearer sk_test_abc123" \-H "Content-Type: application/json"If everything is set up correctly, you should receive a JSON response similar to this:
{"status": true,"message": "Balance retrieved successfully","data": {"currency": "NGN","available_balance": 5000000.00,"ledger_balance": 5000000.00} }Standard HTTP Codes
hexCore uses conventional HTTP response codes to indicate the success or failure of an API request.
| Code | Description |
|---|---|
200 OK | Everything worked as expected. |
201 Created | The resource was successfully created. |
400 Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 Unauthorized | No valid API key provided. |
403 Forbidden | The API key doesn't have permissions to perform the request. |
404 Not Found | The requested resource doesn't exist. |
500 Server Error | Something went wrong on our end. (These are rare). |