> For the complete documentation index, see [llms.txt](https://docs.cryptoix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cryptoix.io/developers/api-overview.md).

# API Overview

Welcome to the Cryptoix API documentation. This guide provides external developers and integrators with the information needed to leverage Cryptoix's powerful cryptocurrency payment processing capabilities within their own applications and platforms.

## Introduction to the Cryptoix API

The Cryptoix API is a RESTful interface designed to allow businesses (merchants) to seamlessly integrate cryptocurrency payment acceptance, management, and payout functionalities into their existing systems. Whether you are building a new e-commerce platform, enhancing an existing one, or developing custom financial tools, the Cryptoix API empowers you to offer flexible and secure cryptocurrency payment options to your customers.

Our API is built to be robust, scalable, and easy to integrate with, providing programmatic access to core Cryptoix features.

## API Capabilities

The Cryptoix API enables a wide range of functionalities for managing cryptocurrency transactions and business operations:

* **Payment Processing:**
  * Create and manage payment requests.
  * Receive real-time notifications for payment confirmations via webhooks.
  * Track the status of cryptocurrency transactions.
* **Invoice Management:**
  * Generate and send cryptocurrency invoices to customers.
  * Monitor invoice statuses (paid, pending, expired).
* **Transaction Management:**
  * Retrieve details of all transactions processed through your Cryptoix account.
  * Search and filter transactions based on various criteria.
* **Balance and Payouts:**
  * Check your cryptocurrency balances across supported assets.
  * Initiate cryptocurrency payouts to external wallets.
* **Customer Management:**
  * Manage customer information relevant to payment processing. (Specific endpoints for customer management are available via the API; refer to the API Reference for details.)
* **Webhooks:**
  * Configure and receive real-time event notifications for critical updates such as payment confirmations, invoice status changes, and payout completions.

## Versioning

The Cryptoix API utilizes a versioning strategy to ensure stability and allow for future enhancements without breaking existing integrations. All API requests should specify the desired API version in the URL path.

The current stable version is **v1**.

**Example Endpoint Structure:**

```
https://api.cryptoix.io/v1/{resource}
```

We are committed to providing ample notice for any backward-incompatible changes to the API. Please monitor our developer portal for announcements regarding new versions or deprecation schedules.

## Getting Started with the API

{% stepper %}
{% step %}

### Create a Cryptoix Account

If you haven't already, sign up for a Cryptoix merchant account at [signup form](https://cryptoix.io/signup).
{% endstep %}

{% step %}

### Generate API Keys

* Log in to your Cryptoix merchant dashboard.
* Navigate to the "[**API Keys**](https://cryptoix.io/dashboard/api-keys)" from Developers.
* Generate a new API Key. You will receive a **Public Key** and a **Secret Key**.

{% hint style="warning" %}
**Important:** Treat your Secret Key with the same care as you would a password. Never expose it in client-side code or public repositories.
{% endhint %}
{% endstep %}

{% step %}

### Authentication

* All API requests must be authenticated using your generated API keys.
* Authentication is handled by including your Public Key in the request headers and signing your request with your Secret Key using HMAC-SHA256. See the "Authentication" section below for detailed instructions.
  {% endstep %}

{% step %}

### Make Your First Request

Once authenticated, you can start making requests to our API endpoints. We recommend beginning with a simple request, such as fetching your account balance.
{% endstep %}
{% endstepper %}

### Base URL

All API requests should be directed to the following base URL:

```
https://api.cryptoix.io/v1
```

### Authentication

Authentication is performed by sending your API credentials in the request headers.

* **`X-API-Key`**: Your Public API Key.
* **`X-API-Signature`**: A signature generated by hashing specific components of your request along with your Secret Key.

**Signature Generation Process:**

{% stepper %}
{% step %}

### Construct the Signature String

Concatenate the following elements in order:

* The HTTP request method (e.g., `GET`, `POST`).
* The full request URI path (e.g., `/v1/balance`).
* The `X-API-Timestamp` header value.
* The request body (if present, otherwise an empty string).

**Example Signature String:** `POST/v1/payments1678886400{"amount": 100, "currency": "BTC"}`
{% endstep %}

{% step %}

### Generate the Signature

* Use the HMAC-SHA256 algorithm to hash the constructed signature string.
* The **Secret Key** is used as the HMAC key.
* The output of the HMAC-SHA256 function should be Base64 encoded.
  {% endstep %}

{% step %}

### Include Headers in Request

* **`X-API-Key`**: Your Public API Key.
* **`X-API-Timestamp`**: A Unix timestamp (seconds since epoch) representing the time the request was generated. This timestamp must be within a defined validity window (e.g., 5 minutes) of the server's current time to prevent replay attacks.
* **`X-API-Signature`**: The Base64 encoded HMAC-SHA256 hash generated in the previous step.
  {% endstep %}
  {% endstepper %}

**Example Request Headers:**

```http
GET /balance HTTP/1.1
Host: api.cryptoix.io
X-API-Key: pk_test_abcdef1234567890
X-API-Timestamp: 1678886400
X-API-Signature: U3RyaWN0bHkgc2VjcmV0IGtleSBmb3IgaGFzaGluZw==
```

**Note:** The `X-API-Timestamp` header is crucial for replay attack prevention and must be included in the signature calculation.

### Error Handling

The API uses standard HTTP status codes to indicate the success or failure of a request. Error responses will typically include a JSON body with more details about the error.

* `200 OK`: The request was successful.
* `400 Bad Request`: The request was malformed or invalid.

  ```json
  {
    "error": {
      "code": "invalid_request",
      "message": "The provided amount is not valid."
    }
  }
  ```
* `401 Unauthorized`: Authentication failed or was not provided.

  ```json
  {
    "error": {
      "code": "authentication_failed",
      "message": "Invalid API Key or signature."
    }
  }
  ```
* `403 Forbidden`: You do not have permission to perform this action.

  ```json
  {
    "error": {
      "code": "permission_denied",
      "message": "You do not have the necessary permissions to access this resource."
    }
  }
  ```
* `404 Not Found`: The requested resource could not be found.

  ```json
  {
    "error": {
      "code": "resource_not_found",
      "message": "The requested payment with ID 'pay_123' was not found."
    }
  }
  ```
* `429 Too Many Requests`: You have exceeded the rate limit.

  ```json
  {
    "error": {
      "code": "rate_limit_exceeded",
      "message": "You have exceeded the allowed number of requests. Please try again later."
    }
  }
  ```
* `500 Internal Server Error`: An error occurred on the server.

  ```json
  {
    "error": {
      "code": "internal_server_error",
      "message": "An unexpected error occurred on our servers. Please try again later or contact support."
    }
  }
  ```

### Rate Limiting

To ensure fair usage and stability, the Cryptoix API enforces rate limits on requests. Exceeding these limits will result in a `429 Too Many Requests` response.

**Rate Limit Details:**

* **Requests per minute:** 60
* **Requests per hour:** 1000

These limits apply per API key. If you anticipate needing higher limits for your integration, please contact our support team.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cryptoix.io/developers/api-overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
