# Introduction

IvoryPay is a global payment infrastructure that enables businesses to **accept and send payments** across both crypto and fiat rails — from a single API.

Whether you are collecting payments from customers around the world, paying out to bank accounts, or moving funds across blockchains, IvoryPay handles the complexity so you don't have to.

## What You Can Do

**Accept Payments**

* Let customers pay with cryptocurrency (USDT, USDC) on supported blockchain networks
* Let customers pay via bank transfer using a dynamically assigned virtual account
* Generate permanent wallet addresses per customer for recurring deposits

**Send Payments**

* Send crypto directly to any external blockchain wallet address
* Send fiat directly to a recipient's bank account — IvoryPay handles the crypto-to-fiat conversion

**Stay Informed**

* Subscribe to webhook events to get real-time notifications on every payment, payout, and settlement — no polling required

## Base URL

```
https://api.ivorypay.io/api
```

## Authentication

Every request **must** include your secret API key in the `Authorization` header:

```http
Authorization: <your-secret-api-key>
```

> **Keep your secret key private.** Never expose it in client-side code, browser environments, or public repositories. Use your **test key** during development and your **live key** in production.

To get your API keys, go to **Dashboard → Developer → API Keys**.

## Environments

| Environment | Key Prefix | Description                    |
| ----------- | ---------- | ------------------------------ |
| `TEST`      | `sk_`      | Sandbox — no real funds move   |
| `LIVE`      | `sk_`      | Production — real transactions |

## Response Format

All responses share a consistent structure:

```json
{
  "status": true,
  "message": "Human-readable message",
  "data": {}
}
```

### Error Response

```json
{
  "statusCode": 400,
  "message": "Descriptive error message"
}
```

## Available Endpoints

| Module                                                                                                              | Base Path                 | Description                                       |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------- | ------------------------------------------------- |
| [Accept Payment](https://ivorypay.gitbook.io/ivorypay-api-documentation/merchant-endpoints/transactions)            | `/v1/transactions`        | Create crypto or fiat payment collection requests |
| [Crypto Transfer](https://ivorypay.gitbook.io/ivorypay-api-documentation/merchant-endpoints/crypto-transfer)        | `/v1/crypto-transfer`     | Send crypto to any blockchain wallet address      |
| [Fiat Transfer](https://ivorypay.gitbook.io/ivorypay-api-documentation/merchant-endpoints/fiat-transfer)            | `/v1/fiat-transfer`       | Send fiat to a recipient's bank account           |
| [Blockchain Address](https://ivorypay.gitbook.io/ivorypay-api-documentation/transactions/blockchain-address)        | `/v1/blockchain-accounts` | Generate permanent wallet addresses per customer  |
| [Supported Tokens & Networks](https://ivorypay.gitbook.io/ivorypay-api-documentation/transactions/supported-tokens) | `/v1/tokens`              | Discover enabled tokens and networks              |
| [Webhooks](https://ivorypay.gitbook.io/ivorypay-api-documentation/transactions/webhooks)                            | —                         | Real-time event notifications                     |
