> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thiqwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete reference for the Thiqwave REST API.

## Overview

Thiqwave provides a RESTful API for pay-ins, payouts, bridging, swaps, and compliance operations. Whether you're building a fintech platform, mobile wallet, or payment infrastructure, the Thiqwave API enables seamless value transfer across fiat and stablecoin channels.

## Base URLs

**Production:**

```
https://api.thiqwave.com/v1/
```

**Staging:**

```
https://staging.api.thiqwave.com/v1/
```

## Authentication

All API requests require the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: your_api_key" https://api.thiqwave.com/v1/...
```

Treat your API key as sensitive. Use environment variables or secure vaults to manage credentials.

## Amount Formats

Thiqwave uses two distinct amount formats to prevent rounding errors:

**Fiat currencies** (AED, USD, EUR, GBP, etc.) are represented as **integers** in the smallest currency unit:

* 500 AED = `50000` (fils)
* 100 USD = `10000` (cents)
* 50 GBP = `5000` (pence)

**Stablecoins** (USDT, USDC, etc.) are represented as **human-readable strings**:

* 500 USDT = `"500.00"`
* 1000.50 USDC = `"1000.50"`

## Idempotency

All mutating operations (POST requests) support the `Idempotency-Key` header to ensure safe retries:

```bash theme={null}
curl -X POST \
  -H "X-API-Key: your_api_key" \
  -H "Idempotency-Key: unique_identifier" \
  https://api.thiqwave.com/v1/payins
```

If you retry a request with the same `Idempotency-Key`, you'll receive the same response without duplicate processing.

## Primary Endpoint

<Card title="Transfers" icon="arrow-right-arrow-left" href="/api/transfers/create">
  Move value between any combination of fiat and stablecoin. On-ramp, off-ramp, bridge, swap, or fiat-to-fiat — one endpoint handles all flows.
</Card>

## Supporting Endpoints

<CardGroup cols={2}>
  <Card title="Quotes" icon="tag" href="/api/quotes/create">
    Get real-time rates before initiating a transfer.
  </Card>

  <Card title="Accounts & Wallets" icon="wallet" href="/api/accounts/overview">
    Create and manage fiat accounts and stablecoin wallets.
  </Card>

  <Card title="Compliance" icon="shield" href="/api/compliance/overview">
    KYB verification and compliance status.
  </Card>

  <Card title="Partners" icon="building" href="/api/partners/overview">
    Manage your partner account and sub-partners.
  </Card>
</CardGroup>

## Granular Endpoints

For advanced use cases where you need fine-grained control over individual transaction legs:

<CardGroup cols={2}>
  <Card title="Pay-ins" icon="arrow-down" href="/api/payins/create">
    Fiat deposits and stablecoin on-ramp.
  </Card>

  <Card title="Payouts" icon="arrow-up" href="/api/payouts/create">
    Fiat disbursements and stablecoin off-ramp.
  </Card>

  <Card title="Bridging" icon="bridge" href="/api/bridging/create">
    Cross-chain stablecoin transfers.
  </Card>

  <Card title="Swaps" icon="exchange" href="/api/onchain-fx/create">
    Stablecoin-to-stablecoin conversion.
  </Card>
</CardGroup>

## Choosing the Right Approach

| You want to...                            | Recommended          | Alternative             |
| ----------------------------------------- | -------------------- | ----------------------- |
| Move value (any source → any destination) | `POST /v1/transfers` | —                       |
| On-ramp fiat to stablecoin                | `POST /v1/transfers` | `POST /v1/payins`       |
| Off-ramp stablecoin to fiat               | `POST /v1/transfers` | `POST /v1/payouts`      |
| Bridge stablecoins across chains          | `POST /v1/transfers` | `POST /v1/bridging`     |
| Swap between stablecoins                  | `POST /v1/transfers` | `POST /v1/onchain-fx`   |
| Fiat-to-fiat (stablecoin sandwich)        | `POST /v1/transfers` | Compose pay-in + payout |

Most integrations only need the Transfers endpoint. The granular endpoints are available for partners who need to manage individual transaction legs independently.

## SDKs

Official SDKs are in active development. We prioritize SDK releases based on partner requirements — if you need a specific SDK, reach out and we'll work with your timeline. The REST API is fully functional today from any language or platform.

## Error Handling

The API returns standard HTTP status codes:

| Status | Meaning                                                          |
| ------ | ---------------------------------------------------------------- |
| `200`  | Success                                                          |
| `201`  | Created                                                          |
| `400`  | Bad request (validation error)                                   |
| `401`  | Unauthorized (invalid or missing API key)                        |
| `403`  | Forbidden (insufficient permissions)                             |
| `404`  | Not found                                                        |
| `409`  | Conflict (e.g., duplicate idempotency key with different params) |
| `429`  | Rate limited                                                     |
| `500`  | Server error                                                     |

Error responses include a structured JSON body:

```json theme={null}
{
  "error": {
    "code": "INVALID_AMOUNT",
    "message": "Amount must be greater than 0"
  }
}
```

## Rate Limiting

API requests are rate-limited per API key. Check response headers for limits:

* `X-RateLimit-Limit`: Requests per second
* `X-RateLimit-Remaining`: Requests remaining
* `X-RateLimit-Reset`: Unix timestamp when limit resets

## Quote Lock

Quotes expire after **3 minutes**. All pay-ins, payouts, and bridge transactions must reference a valid (non-expired) quote via `quote_id`.

## Supported Networks

Thiqwave supports stablecoins across the following blockchain networks:

* **Ethereum** (`ethereum`)
* **Avalanche** (`avalanche`)
* **Arbitrum** (`arbitrum`)
* **Base** (`base`)
* **Polygon** (`polygon`)
* **Tron** (`tron`)
* **Stellar** (`stellar`)
* **Solana** (`solana`)
* **XRP Ledger** (`xrpl`)
* **Algorand** (`algorand`)
* **Sui** (`sui`)

## Supported Currencies

**Fiat:** AED, USD, EUR, GBP, and more\
**Stablecoins:** USDT, USDC

## Next Steps

Start with a [Transfer quote](/api/quotes/create), then create a [Transfer](/api/transfers/create). For advanced control over individual legs, explore [Pay-ins](/api/payins/create), [Payouts](/api/payouts/create), [Bridging](/api/bridging/create), and [Swaps](/api/onchain-fx/create).
