API documentation
Complete guide to integrating the 2328 payment platform. REST API, Webhook notifications, SDKs, and code examples.
API Overview
The 2328 API is built on REST principles. All requests are made over HTTPS, data is transmitted in JSON format.
Base URL for all requests:
https://api.2328.io/v1
Authentication
All requests must include the API key in the X-Api-Key header. You can obtain the key in your account under Settings → API.
X-Api-Key: your_api_key_here Content-Type: application/json
curl -X POST https://api.2328.io/v1/invoices \ -H "X-Api-Key: your_api_key" \ -H "Content-Type: application/json" \ -d '{"amount": "100.00", "currency": "USD", "coin": "USDT"}'
Create invoice
Creates a new payment invoice. Returns a wallet address and the amount due in cryptocurrency.
Request parameters:
| Parameter | Type | Description |
|---|---|---|
| amount | string | Amount in fiat currency required |
| currency | string | Currency code: USD, EUR required |
| coin | string | Cryptocurrency: USDT, BTC, ETH... required |
| order_id | string | Order ID in your system optional |
| webhook_url | string | URL for receiving notifications optional |
| success_url | string | Redirect after payment optional |
{
"amount": "49.99",
"currency": "USD",
"coin": "USDT",
"network": "TRC20",
"order_id": "order_12345",
"webhook_url": "https://yoursite.com/webhook"
}
{
"id": "inv_8f4a2b1c",
"status": "pending",
"address": "TXyz...abc",
"amount_crypto": "49.99",
"coin": "USDT",
"network": "TRC20",
"expires_at": 1735689600,
"created_at": 1735686000
}
Webhook notifications
After a payment status changes, 2328 sends a POST request to the specified webhook_url with transaction data.
To verify the authenticity of notifications, use the X-Signature header — an HMAC-SHA256 signature of the request body using your Secret key.
{
"event": "invoice.paid",
"id": "inv_8f4a2b1c",
"status": "paid",
"order_id": "order_12345",
"amount": "49.99",
"coin": "USDT",
"tx_hash": "abc123...",
"paid_at": 1735686900
}
Payment statuses:
| Status | Description |
|---|---|
| pending | Awaiting payment |
| confirming | Transaction found, awaiting confirmations |
| paid | Paid and confirmed |
| expired | Waiting period expired |
| failed | Processing error |
Create payout
Send cryptocurrency to a specified address. Requires sufficient balance in your 2328 account.
{
"address": "TXyz...abc",
"amount": "100.00",
"coin": "USDT",
"network": "TRC20"
}
Supported currencies
List of cryptocurrencies and networks supported by the platform:
| Coin | Networks |
|---|---|
| USDT | TRC20, ERC20, BEP20, TON, Polygon, Solana |
| BTC | Bitcoin |
| ETH | ERC20 |
| TON | TON |
| BNB | BEP20 |
| TRX | TRC20 |
| USDC | ERC20, BEP20, Polygon, Solana |
| LTC | Litecoin |
| DOGE | Dogecoin |
| XMR | Monero |