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:

Base URL
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.

HTTP HeaderCopy
X-Api-Key: your_api_key_here
Content-Type: application/json
cURLCopy
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.

POST /v1/invoices
Create a new invoice for payment

Request parameters:

ParameterTypeDescription
amountstringAmount in fiat currency required
currencystringCurrency code: USD, EUR required
coinstringCryptocurrency: USDT, BTC, ETH... required
order_idstringOrder ID in your system optional
webhook_urlstringURL for receiving notifications optional
success_urlstringRedirect after payment optional
RequestCopy
{
  "amount": "49.99",
  "currency": "USD",
  "coin": "USDT",
  "network": "TRC20",
  "order_id": "order_12345",
  "webhook_url": "https://yoursite.com/webhook"
}
Response 200Copy
{
  "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.

Webhook payloadCopy
{
  "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:

StatusDescription
pendingAwaiting payment
confirmingTransaction found, awaiting confirmations
paidPaid and confirmed
expiredWaiting period expired
failedProcessing error

Create payout

Send cryptocurrency to a specified address. Requires sufficient balance in your 2328 account.

POST /v1/payouts
Create a payout to an external address
RequestCopy
{
  "address": "TXyz...abc",
  "amount": "100.00",
  "coin": "USDT",
  "network": "TRC20"
}

Supported currencies

List of cryptocurrencies and networks supported by the platform:

CoinNetworks
USDTTRC20, ERC20, BEP20, TON, Polygon, Solana
BTCBitcoin
ETHERC20
TONTON
BNBBEP20
TRXTRC20
USDCERC20, BEP20, Polygon, Solana
LTCLitecoin
DOGEDogecoin
XMRMonero