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.

Sandbox Environment
https://sandbox.hexcore.io/v2

Use this environment for testing and integration. No real money is moved.

Production Environment
https://api.hexcore.io/v2

Use 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.

๐Ÿ›ก๏ธ
Keep your keys safe! Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication to the API is performed via HTTP Bearer Auth. Provide your API key as the bearer token value in the Authorization header.

HTTP
Authorization: Bearer sk_test_your_secret_key_here

Your First Request

Let's make a simple request to check your balance. Replace the bearer token with your actual Sandbox API key.

BASH (CURL)
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:

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

CodeDescription
200 OKEverything worked as expected.
201 CreatedThe resource was successfully created.
400 Bad RequestThe request was unacceptable, often due to missing a required parameter.
401 UnauthorizedNo valid API key provided.
403 ForbiddenThe API key doesn't have permissions to perform the request.
404 Not FoundThe requested resource doesn't exist.
500 Server ErrorSomething went wrong on our end. (These are rare).