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

# Deposits (Crypto + Fiat)

> Create deposit payment intents and track status programmatically

## Overview

NanoGPT supports multiple deposit methods (crypto, stablecoins, and cards). This page documents the public endpoints you can use to:

* Create a deposit payment intent
* Check deposit limits
* Track deposit status (polling or SSE)

Deposits are credited automatically after payment confirmation.

## Automating deposits

1. Choose a payment method and create its invoice or payment window using your
   account API key. Check the endpoint's amount units and current limits.
2. Save the complete response, including the transaction ID, destination, amount
   and expiry, before sending funds. Use the specified asset and network.
3. Send the payment once. A reused address does not necessarily mean continuous
   monitoring; methods with payment windows require a new window for each top-up.
4. Poll the method's status endpoint until balance credit is confirmed. Payment
   detection or blockchain confirmation alone is not proof of credited balance.
5. On a timeout or expired window, reconcile the original request and wallet
   transaction before trying again. Do not resend funds merely because polling
   failed. Keep the transaction ID and blockchain hash for support.

Retry protection, amount matching, expiry and fees differ by method. Only send an
`Idempotency-Key` where the endpoint explicitly supports it. Follow `Retry-After`
and polling headers, and use bounded backoff for temporary failures.

## Monitored deposits

`POST /api/deposit/create` creates a network-specific payment window, separate
from the invoice endpoints below. Authenticate with the same account API key.
Two flows are documented: native POL on Polygon PoS, and
[USDT on BNB Smart Chain](#usdt-on-bnb-smart-chain). The native POL contract:

| Request or response | Native POL |
| - | - |
| Request | `network: "polygon"`, `token: "POL"` (`POLYGON` is also accepted), `amount` in gross USD |
| Network | Polygon PoS, chain ID `137`; native POL only |
| Limits | Currently $0.10-$25,000 USD per request; check `minimumDepositUsd` in the response |
| Amount to send | `quotedTokenAmount` (decimal string) or `quotedTokenAmountAtomic` (integer string, 18 decimals) |
| Destination and expiry | Use the returned `address` and `expiresAt` (Unix seconds); the default window is 30 minutes |
| Optional expiry | `expires_at`, a future Unix timestamp in seconds, at most 30 minutes from creation |
| Status | Poll the returned `statusUrl`, or `/api/transaction/status/polygon/{txId}` with the complete ID URL-encoded |
| Confirmed credit | `status: "COMPLETED"` and `balanceCredited: true`; actual USD credit is `settlement.creditedUsdExact` |

Save atomic amounts as integers or strings, never floating-point numbers.
For this flow, the legacy `amountCrypto` creation field contains the USD estimate,
not the token quantity. The quote is not price-locked: one slightly smaller or
larger transfer is valued from the amount actually received. Do not split a
payment across multiple transfers.

Native POL (and [USDT on BNB Smart Chain](#usdt-on-bnb-smart-chain)) supports an optional `Idempotency-Key` of 8-128 visible ASCII characters
without spaces, retained for 24 hours. Use a unique key per top-up and keep the key
and request unchanged on retries. A replay neither extends expiry nor authorizes
another wallet transfer. If creation returns an existing pending payment or an
uncertain outcome (`409`/`503`), reconcile that request before sending. Other
methods do not inherit this support.

Send early enough for inclusion on-chain within the window. Confirmation can
continue afterward, but late arrivals are not guaranteed automatic credit.
An expired status does not mean that a transfer was reversed or that no funds
were sent. Contact support with the original transaction ID and hash if needed.

### USDT on BNB Smart Chain

The same endpoint opens a window for USDT (BEP-20) on BNB Smart Chain. It suits
server wallets and contract wallets such as a Safe: the window matches the USDT
transfer to your address, whoever sends it.

| Request or response | USDT on BNB Smart Chain |
| - | - |
| Request | `network: "bnb"`, `token: "USDT"` (uppercase), `amount` in USD |
| Network | BNB Smart Chain, chain ID `56`; USDT contract `0x55d398326f99059fF775485246999027B3197955`, 18 decimals |
| Limits | Up to $25,000 per window. After the quoted consolidation fee the credit must be at least $0.10; a smaller `amount` returns `400` with `requiredGrossUsd` |
| Amount to send | `quotedTokenAmount` USDT (decimal string), or `quotedTokenAmountAtomic` as the `uint256` of `transfer(address,uint256)`. 1 USDT is credited as \$1 |
| Destination and expiry | The returned `address` and `expiresAt` (Unix seconds); the default window is 30 minutes |
| Optional expiry | `expires_at`, a future Unix timestamp in seconds, at most 30 minutes from creation |
| Status | Poll the returned `statusUrl`, or `/api/transaction/status/bnb/{txId}` with the complete ID URL-encoded |
| Confirmed credit | `status: "COMPLETED"` and `balanceCredited: true`; the USD credited is `settlement.creditedUsdExact` |

Your address is the same every time, but it is only watched while a window is
open. **Open the window first, wait for the `200` response, then broadcast the
transfer.** A transfer mined before the window opened, or after it expired, is not
credited automatically; contact support with the transaction hash. For a Safe,
open the window just before you execute the transaction, not when you propose it.

* Send one USDT transfer per window. Any amount is credited; it does not have to
  equal `quotedTokenAmount`. A second transfer in the same window is not credited
  automatically, so open a new window for the next payment.
* Send USDT only. Other tokens (USDC, BNB, BUSD) are not credited by a USDT window.
* One USDT window can be open per account. Creating another while one is open
  returns `409` with `code: "deposit_already_pending"` and the open window in
  `transaction`; pay into that one or wait for it to finish. Match windows by
  `jobId`: the address inside `txId` can differ in letter case between responses,
  and either form works on the status endpoint.
* `Idempotency-Key` works the same way as for native POL. Keyed calls, including
  replays, are limited to 30 per 10 minutes per account, and every create call
  counts toward 30 per 10 minutes per account. Follow `Retry-After` on `429` and
  `503`.
* `PROCESSING` means the transfer was seen and the ledger credit is on its way;
  keep polling. `EXPIRED` means the window closed without a credited transfer.

```bash theme={null}
# 1. Open a window (amount is USD = USDT to send)
curl -X POST https://nano-gpt.com/api/deposit/create \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: topup-2026-11-17-0001" \
  -d '{"network":"bnb","token":"USDT","amount":150}'

# Response (abridged)
# {
#   "txId": "0xYourAddress:6f1c...:1795392000",
#   "address": "0xYourAddress",
#   "network": "bnb", "token": "USDT", "chainId": 56,
#   "tokenContract": "0x55d398326f99059fF775485246999027B3197955",
#   "tokenDecimals": 18,
#   "quotedTokenAmount": "150",
#   "quotedTokenAmountAtomic": "150000000000000000000",
#   "expiresAt": 1795392000,
#   "statusUrl": "/api/transaction/status/bnb/0xYourAddress%3A6f1c...%3A1795392000",
#   "status": "PENDING"
# }

# 2. Send 150 USDT to "address" on BNB Smart Chain before expiresAt

# 3. Poll until COMPLETED with balanceCredited: true
curl "https://nano-gpt.com/api/transaction/status/bnb/0xYourAddress%3A6f1c...%3A1795392000" \
  -H "x-api-key: YOUR_API_KEY"
```

For USDT, settlement credits the USDT received at \$1, minus the consolidation fee
quoted for the window (`consolidationFeeUsdExact`), plus the 3% bonus for eligible
deposits. `creditEstimate` itemizes this for the requested amount.

## Deposit fees and credit

Review the payment quote for conversion spreads, consolidation fees and bonus
eligibility. Your wallet pays any sending network fee separately. Do not treat
an estimated credit as a guaranteed final amount.

For native POL, settlement applies a 1% conversion spread, the current \$0.00
consolidation fee, then the 3% bonus for eligible deposits. The bonus is included
with the credit for API-created deposits too. `creditEstimate` itemizes the quote;
`settlement.creditedUsdExact` reports the completed ledger credit. Other methods
can have different fees and settlement rules.

## Supported Payment Methods

Limits vary by method and can change. Use `GET /api/transaction/limits/{ticker}` for the authoritative min/max.

### Crypto (invoice / address)

| Ticker | Name | Provider |
| - | - | - |
| `BTC` | Bitcoin | BTCPay |
| `BTC-LN` | Bitcoin Lightning | BTCPay |
| `LTC` | Litecoin | BTCPay |
| `LTC-MWEB` | Litecoin MWEB | BTCPay |
| `XMR` | Monero | BTCPay |
| `DOGE` | Dogecoin | BTCPay |
| `DASH` | Dash | BTCPay |
| `ZEC` | Zcash | BTCPay |
| `BCH` | Bitcoin Cash | Prompt.Cash |
| `BAN` | Banano | Nanswap (legacy) |
| `KAS` | Kaspa | Nanswap |
| `TON` | Toncoin | Nanswap |
| `NEAR` | NEAR Protocol | Nanswap |
| `EGLD` | MultiversX | Nanswap |
| `VVV` | VVV | Nanswap |
| `ZANO` | Zano | Zano proxy |
| `FUSD` | Freedom Dollar | Zano proxy |

### Stablecoins and multi-chain (Daimo Pay)

These methods settle as USDC and can be paid from multiple chains/wallets.

| Ticker | Name |
| - | - |
| `USDC` | USD Coin |
| `USDT` | Tether |
| `ETH` | Ethereum |
| `SOL` | Solana |

### Fiat (card)

| Ticker | Name | Provider |
| - | - | - |
| `USD` | US Dollar | Stripe |
| `EUR` | Euro | Stripe |
| `GBP` | British Pound | Stripe |

### Nano (direct deposit)

Nano deposits use a direct-send flow to your assigned Nano deposit address (no invoice creation).

See: [Check Balance](https://docs.nano-gpt.com/api-reference/endpoint/check-balance.md) and [Receive Nano](https://docs.nano-gpt.com/api-reference/endpoint/receive-nano.md).

## Authentication

The deposit creation and status endpoints require API key authentication using one of these methods:

```bash theme={null}
# Method 1: Authorization header
curl -H "Authorization: Bearer YOUR_API_KEY"

# Method 2: x-api-key header  
curl -H "x-api-key: YOUR_API_KEY"
```

## Endpoint Summary

Pick the endpoint based on the payment method:

* Monitored deposits (native POL on Polygon, USDT on BNB Smart Chain): `POST /api/deposit/create` (see [Monitored deposits](#monitored-deposits))
* Crypto invoice / swap deposits: `POST /api/transaction/create/{ticker}`
* Daimo Pay (multi-chain): `POST /api/transaction/create/daimo/{ticker}`
* Card (Stripe): `POST /api/transaction/create/usd`
* Limits: `GET /api/transaction/limits/{ticker}`
* Status polling: `GET /api/transaction/status/{ticker}/{txId}`
* Status SSE: `GET /api/transaction/status/events?ticker={ticker}&txId={txId}`
* Nano (XNO): send to `nanoDepositAddress` (from [Check Balance](https://docs.nano-gpt.com/api-reference/endpoint/check-balance.md)); optionally call [Receive Nano](https://docs.nano-gpt.com/api-reference/endpoint/receive-nano.md)

> [card] Create Crypto Deposit
>
> Create an invoice / pay-in address for supported crypto tickers

**ticker** `string` *required*

Ticker symbol. Examples: `btc`, `btc-ln`, `ltc`, `zec`, `bch`, `kas`, `vvv`, `zano`, `fusd`

**amount** `number` *required*

Amount of cryptocurrency to deposit. Must be between minimum and maximum limits.

```bash cURL theme={null}
curl -X POST https://nano-gpt.com/api/transaction/create/btc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 0.001}'
```

```javascript JavaScript theme={null}
const response = await fetch('https://nano-gpt.com/api/transaction/create/btc', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ amount: 0.001 })
});

const deposit = await response.json();
console.log('Send BTC to:', deposit.address);
```

```javascript BTC Lightning Example theme={null}
// BTC-LN has lower minimum ($0.10)
const lnResponse = await fetch('https://nano-gpt.com/api/transaction/create/btc-ln', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ amount: 0.00001 })
});

const lnDeposit = await lnResponse.json();
console.log('Lightning invoice:', lnDeposit.paymentLink);
```

```json Success Response theme={null}
{
  "txId": "abc123",
  "address": "bc1q...",
  "amount": 0.001,
  "status": "New",
  "paymentLink": "bitcoin:bc1q...?amount=0.001",
  "createdAt": "2026-01-19T12:00:00.000Z",
  "expiresAt": "2026-01-19T13:00:00.000Z"
}
```

### Response Fields

**txId** `string`

Unique transaction identifier for tracking

**address** `string`

Deposit address for sending crypto

**amount** `number`

Requested deposit amount

**status** `string`

Payment status. Common values include: `New`, `Pending`, `Processing`, `Paid`, `Completed`, `Expired`, `Failed`

**paymentLink** `string`

URI for wallet apps (e.g., `bitcoin:address`)

**createdAt** `string`

ISO timestamp of creation

**expiresAt** `string`

ISO timestamp when address expires

> [card] Check Payment Limits
>
> Get minimum and maximum deposit amounts for a payment method

**ticker** `string` *required*

Payment method ticker symbol (for example: `btc`, `btc-ln`, `zec`, `usdc`, `sol`, `usd`)

```bash cURL theme={null}
curl https://nano-gpt.com/api/transaction/limits/kas \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript JavaScript theme={null}
const limitsResponse = await fetch('https://nano-gpt.com/api/transaction/limits/btc', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const limits = await limitsResponse.json();

// Validate amount before creating deposit
if (amount < limits.minimum) {
  throw new Error(`Minimum deposit is ${limits.minimum} BTC`);
}
```

```json Limits Response theme={null}
{
  "minimum": 10.5,
  "maximum": 5250,
  "fiatEquivalentMinimum": 1,
  "fiatEquivalentMaximum": 500,
  "timestamp": 1705669200
}
```

> [card] Create Daimo Payment
>
> Create a multi-chain payment (USDC/USDT/ETH/SOL) via Daimo Pay

**ticker** `string` *required*

Daimo payment ticker. Common values: `usdc`, `usdt`, `eth`, `sol`

**amount** `number` *required*

Amount to pay. This is typically treated as a USD/USDC amount (for example, `10` for about \$10).

```bash cURL theme={null}
curl -X POST https://nano-gpt.com/api/transaction/create/daimo/usdc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10}'
```

```json Success Response theme={null}
{
  "paymentId": "encrypted_payment_id"
}
```

> [card] Create Card Deposit (Stripe)
>
> Create a Stripe Checkout session for card deposits

**amount** `number` *required*

Amount in the selected fiat currency (for example, `10`).

```bash cURL theme={null}
curl -X POST https://nano-gpt.com/api/transaction/create/usd \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10}'
```

```json Success Response theme={null}
{
  "paymentLink": "https://checkout.stripe.com/c/pay/cs_test_..."
}
```

## Status Tracking

Most deposit methods can be tracked by polling a status endpoint:

```http theme={null}
GET /api/transaction/status/{ticker}/{txId}
```

Some methods use provider-specific IDs (for example Stripe session IDs). The create response usually returns the correct `txId` value to use.

Example:

```bash theme={null}
curl "https://nano-gpt.com/api/transaction/status/btc/abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Real-time status (SSE)

Instead of polling, you can subscribe to Server-Sent Events:

```http theme={null}
GET /api/transaction/status/events?ticker={ticker}&txId={txId}
```

Example:

```bash theme={null}
curl -N "https://nano-gpt.com/api/transaction/status/events?ticker=btc&txId=abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The server may also return an `x-poll-after` header on status responses to indicate a recommended retry interval (seconds).

## Transaction Lifecycle

Status values can vary slightly by payment method, but a typical lifecycle looks like:

| Status | Meaning |
| - | - |
| `New` / `Pending` | Deposit created, awaiting payment |
| `Processing` | Payment detected and being confirmed/processed |
| `Paid` | Payment confirmed, crediting pending |
| `Completed` | Balance credited |
| `Expired` | Payment window expired (some providers can still credit late payments) |
| `Failed` | Provider error or processing failure |

Notes:

* `BTC` deposits can take longer to reach `Completed` due to on-chain settlement/confirmations.
* Some providers may accept payment after an invoice expires; in those cases the deposit can still complete.

## Payment Providers

NanoGPT uses different providers per ticker:

* **BTCPay**: BTC, BTC-LN, LTC, LTC-MWEB, XMR, DOGE, DASH, ZEC
* **Prompt.Cash**: BCH
* **Nanswap**: BAN, KAS, TON, NEAR, EGLD, VVV
* **Zano proxy**: ZANO, FUSD
* **Daimo Pay**: USDC, USDT, ETH, SOL (multi-chain payments settling as USDC)
* **Stripe**: card deposits (USD/EUR/GBP)
* **Native Nano**: XNO direct deposits to your `nanoDepositAddress`

## Pricing Endpoints

These endpoints are commonly used by deposit flows and checkout UIs:

* `GET /api/get-nano-price` (NANO/USD pricing)
* `GET /api/get-fiat-prices` (fiat FX rates)

Example:

```bash theme={null}
curl "https://nano-gpt.com/api/get-nano-price"
curl "https://nano-gpt.com/api/get-fiat-prices"
```

Example responses:

```json theme={null}
// GET /api/get-nano-price
{
  "pair": "NANOUSD",
  "latestPrice": 1.23
}
```

```json theme={null}
// GET /api/get-fiat-prices
{
  "usdTo": {
    "USD": 1,
    "EUR": 0.92,
    "GBP": 0.79
  },
  "currencies": {
    "USD": "United States Dollar",
    "EUR": "Euro",
    "GBP": "British Pound"
  }
}
```

## Bonuses and Discounts

* `BTC-LN`: Lightning deposits may include a bonus on the credited amount (if enabled).
* `XNO`: Paying with Nano balance may include a usage discount (if enabled).
* `USDC` via Daimo: USDC stablecoin deposits typically credit close to \$1 per 1 USDC.

## Error Handling

### HTTP Status Codes

| Code | Description |
| - | - |
| 200 | Success |
| 400 | Invalid amount, unsupported ticker, or below/above limits |
| 401 | Authentication failure |
| 429 | Rate limited |
| 500 | Provider unavailable or internal error |

### Common Error Messages

> [accordion] Amount Validation Errors
>
> * `"No amount specified"` - Missing amount in request body
> * `"Invalid amount. Must be a positive number."` - Amount validation failed
> * `"Minimum amount is X"` - Below minimum threshold
> * `"Maximum amount is X"` - Above maximum threshold

> [accordion] Provider Errors
>
> * `"Unsupported ticker"` - Ticker not supported
> * `"This payment method is currently not available"` - Provider temporarily unavailable

## Rate Limits

Limits vary by endpoint. Native POL creation with `Idempotency-Key`, including
replays, is limited to **30 requests per 10 minutes** per account and tenant.
Use status polling for known payments and follow `Retry-After` on rate-limit
responses; follow `X-Poll-After` where provided for polling.

## Payment Flow

**1. Create Invoice**

Call `/api/transaction/create/{ticker}` with desired amount

**2. Get Address**

Extract `address` from response

**3. Send Payment**

User sends crypto to the provided address

**4. Auto-Credit**

Account balance automatically updated when payment confirms


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.