Everything you need to integrate CryptoPayCheckout into your application
All API requests require your API key sent in the X-API-Key header.
X-API-Key: cpk_live_your_api_key_here Content-Type: application/json
Find your API key in Dashboard > API Keys.
Create a new payment request. Returns a checkout URL to redirect your customer to.
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | number | Yes | Payment amount in USD |
| currency | string | Yes | BTC, ETH, BNB, SOL, LTC, DOGE, TRX, USDT_TRC20, USDT_ERC20, USDT_BEP20, USDC_ERC20, USDC_BEP20 |
| order_id | string | No | Your internal order reference |
curl -X POST https://cryptopaycheckout.com/api/v1/payment/create \
-H "X-API-Key: cpk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 49.99,
"currency": "USDT_TRC20",
"order_id": "order_12345"
}'
{
"success": true,
"transaction_id": "tx_a1b2c3d4e5f6...",
"amount_usd": 49.99,
"currency": "USDT_TRC20",
"pay_address": "TYourWalletAddress...",
"network": "tron",
"expires_at": "2026-04-03 01:00:00",
"checkout_url": "https://cryptopaycheckout.com/pay?tx=tx_a1b2c3...",
"status": "pending"
}
Check the status of a payment.
| Parameter | Type | Required | Description |
|---|---|---|---|
| transaction_id | string | Yes | The transaction ID from create payment |
curl "https://cryptopaycheckout.com/api/v1/payment/status?transaction_id=tx_a1b2c3..." \ -H "X-API-Key: cpk_live_your_api_key"
When a payment status changes, we send a POST request to your configured webhook URL with the following payload:
{
"event": "payment.completed",
"transaction_id": "tx_a1b2c3d4...",
"order_id": "order_12345",
"amount_usd": 49.99,
"currency": "USDT_TRC20",
"status": "completed",
"tx_hash": "0xabc123...",
"completed_at": "2026-04-03 00:45:00"
}
Each webhook includes a X-Webhook-Signature header. Verify it with your webhook secret:
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'];
$expected = hash_hmac('sha256', $payload, $webhook_secret);
if (hash_equals($expected, $signature)) {
$data = json_decode($payload, true);
// Process the payment...
}
| Status | Description |
|---|---|
| Pending | Waiting for the customer to send payment |
| Confirming | Payment detected, waiting for blockchain confirmations |
| Completed | Payment confirmed and finalized |
| Expired | Payment window expired (30 minutes) |
| Failed | Payment could not be processed |
| Currency Code | Name | Network |
|---|---|---|
| BTC | Bitcoin | Bitcoin |
| ETH | Ethereum | Ethereum |
| BNB | BNB | BSC |
| SOL | Solana | Solana |
| LTC | Litecoin | Litecoin |
| DOGE | Dogecoin | Dogecoin |
| TRX | TRON | TRON |
| USDT_TRC20 | Tether (TRC20) | TRON |
| USDT_ERC20 | Tether (ERC20) | Ethereum |
| USDT_BEP20 | Tether (BEP20) | BSC |
| USDC_ERC20 | USDC (ERC20) | Ethereum |
| USDC_BEP20 | USDC (BEP20) | BSC |