API Documentation
Welcome to the Smart CloudPay Developer Portal. Our robust RESTful API enables you to seamlessly integrate crypto payments into your ecosystem with zero friction.
Production Base URL
https://www.smartcloudpay.com/api
Authentication
Secure your requests using your x-api-key
and merchant-id.
Keys can be managed in your Merchant
Dashboard.
curl -X POST https://www.smartcloudpay.com/api/payment/invoice/create \
-H "x-api-key: sk_abcd12345" \
-H "merchant-id: abcdef" \
-H "Origin: https://yourdomain.com" \
-H "Content-Type: application/json"
Invoices
Create Invoice
Initiate a new payment request. Both native coins and tokens are supported.
Native Coins (ETH, BNB)
{
"amount": 0.5,
"currency": "BNB",
"network": "bsc",
"customer_name": "John Doe",
"notification_emails": "[email protected]"
}
Stablecoins (USDT)
{
"totalusd": 0.5,
"currency": "USDT",
"network": "bsc",
"customer_name": "John Doe",
"notification_emails": "[email protected]"
}
Cancel Invoice
Revert a pending invoice. Once canceled, any incoming funds will be rejected.
POST /api/payment/invoice/cancel/:invoiceId
Get Invoice Details
Retrieve real-time status and payment data for a specific invoice.
GET /api/invoice/:invoiceId
Payouts
Execute Payout
Send funds from your merchant balance to any external address.
{
"recipient_address": "0xe24B4Ea27754e92Dd0D25f28e3B6C39707B7fe64",
"amount": 0.025,
"currency": "USDT",
"chain": "bsc",
"reference_wp": "WP1234520"
}
Bulk Payout
Distribute funds to multiple recipients in a single transaction.
{
"auto_confirm": true,
"items": [
{ "address": "0x123...", "amount": 10, "currency": "USDT", "network": "bsc", "id": "REF_1" },
{ "address": "TR7...", "amount": 50, "currency": "USDT", "network": "tron", "id": "REF_2" }
]
}
Payout History
Retrieve a list of past payout requests with their statuses.
GET /api/payout/history?limit=5
Get Payout Status
Check the state of a payout using your custom reference ID.
{
"reference_wp": "smartcloudpay-1769248259472"
}
Get Wallets
Retrieve your active wallet addresses for various networks.
GET /api/payout/wallets
Utility
Server IP Verification
Determine your server's outgoing IP for whitelisting purposes.
Node.js (Fetch)
fetch('https://www.smartcloudpay.com/api/public/check-ip')
.then(res => res.json())
.then(data => console.log('Your IP:', data.your_ip));
PHP
$url = 'https://www.smartcloudpay.com/api/public/check-ip';
$response = file_get_contents($url);
$data = json_decode($response, true);
echo "Your IP: " . ($data['your_ip'] ?? 'Unknown');
Prepaid Balance
Check your remaining prepaid API credits.
GET /api/payout/balance/prepaid
Chain Balance
Monitor on-chain liquidity for specific networks.
GET /api/payout/balance/chain?network=BSC¤cy=BNB
Webhooks
Stay updated on payment status changes in real-time. We'll send a POST payload to your
configured callback_url.
Payload Schema
{
"status": "paid",
"invoice_id": "INV-88219",
"amount": "100.00",
"currency": "USDT",
"tx_hash": "0xabc...",
"received_amount": "100.00"
}
Validation Example (PHP)
$json = file_get_contents('php://input');
$data = json_decode($json, true);
if ($data['status'] == 'paid') {
// Process order...
http_response_code(200);
}