Integrate with Paymatic using our RESTful API.
The Paymatic API provides programmatic access to platform data including real-time mining statistics, coin prices, and user information. All endpoints return JSON responses.
Base URL: https://api.paymatic.cloud/v1
Authenticate by including your API key in the request header:
Authorization: Bearer your-api-key-here
To request an API key, create a support ticket or contact support@paymatic.cloud.
{
"POL": 0.65,
"WBTC": 67800.00,
"WETH": 3450.00,
"USDT": 1.00,
"USDC": 1.00,
"DAI": 1.00
}
# Get all prices curl -H "Authorization: Bearer YOUR_API_KEY" \ https://api.paymatic.cloud/v1/prices
$ch = curl_init('https://api.paymatic.cloud/v1/prices'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); print_r($data);
| Parameter | Type | Description |
|---|---|---|
| coin | string | Coin symbol (e.g. POL, WBTC, USDT) |
{
"symbol": "POL",
"price": 0.65,
"updated_at": "2025-01-15T12:00:00Z"
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/prices/POL
$coin = 'POL'; $ch = curl_init("https://api.paymatic.cloud/v1/prices/{$coin}"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); echo "POL price: $" . $data['price'];
{
"plans": [
{
"id": 1,
"name": "StakePool Blue",
"price": 25.00,
"daily_return": "0.15%",
"max_return": "150%",
"quota": 150000,
"active": 1
}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/plans
$ch = curl_init('https://api.paymatic.cloud/v1/plans'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $plans = json_decode($response, true)['plans']; foreach ($plans as $plan) { echo $plan['name'] . " - $" . $plan['price'] . "\n"; }
| Parameter | Type | Description |
|---|---|---|
| id | integer | Mining plan ID |
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/plans/1
$id = 1; $ch = curl_init("https://api.paymatic.cloud/v1/plans/{$id}"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); print_r(json_decode($response, true));
Authorization header.{
"username": "johndoe",
"email": "john@example.com",
"balance": 1250.50,
"upp_balance": 340.20,
"referral_code": "ABC123",
"total_referrals": 12,
"wallet_address": "0x...",
"created_at": "2024-03-10T08:30:00Z"
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/user/profile
$ch = curl_init('https://api.paymatic.cloud/v1/user/profile'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $profile = json_decode(curl_exec($ch), true); curl_close($ch); echo "Welcome back, " . $profile['username'] . "!";
| Parameter | Type | Description |
|---|---|---|
| wallet_address | string | New wallet address (Polygon) |
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"wallet_address":"0x..."}' \ https://api.paymatic.cloud/v1/user/update-wallet
$data = json_encode([ 'wallet_address' => '0x...' ]); $ch = curl_init('https://api.paymatic.cloud/v1/user/update-wallet'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Results per page (default: 20, max: 100) |
| type | string | Filter by type (deposit, withdraw, mining, commission, transfer_in, transfer_out, bonus, claim, plan_purchase) |
{
"transactions": [
{
"id": 1001,
"type": "deposit",
"amount": 100.00,
"coin": "USDT",
"tx_hash": "0x...",
"created_at": "2025-01-15T12:00:00Z"
}
],
"page": 1,
"total_pages": 5,
"total": 95
}
# Get page 2, filtered by mining type curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.paymatic.cloud/v1/user/transactions?page=2&limit=10&type=mining"
$params = http_build_query([ 'page' => 2, 'limit' => 10, 'type' => 'mining' ]); $ch = curl_init("https://api.paymatic.cloud/v1/user/transactions?$params"); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = json_decode(curl_exec($ch), true); curl_close($ch); foreach ($result['transactions'] as $tx) { echo $tx['type'] . " - $" . $tx['amount'] . "\n"; }
{
"coins": [
{
"symbol": "POL",
"name": "Polygon",
"wallet_address": "0x...",
"network": "Polygon",
"min_deposit": 10.00,
"active": 1
}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/deposit/coins
$ch = curl_init('https://api.paymatic.cloud/v1/deposit/coins'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $coins = json_decode(curl_exec($ch), true)['coins']; curl_close($ch); foreach ($coins as $c) { echo $c['symbol'] . ": " . $c['wallet_address'] . "\n"; }
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Results per page (default: 20) |
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/user/deposits?page=1&limit=10
$ch = curl_init('https://api.paymatic.cloud/v1/user/deposits?page=1&limit=10'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $deposits = json_decode(curl_exec($ch), true); curl_close($ch); print_r($deposits);
{
"coins": [
{
"symbol": "TPAY",
"name": "Paymatic Token",
"token_address": "0x8DF4c954C51E5ccBa51b8a21cC3fF6347760b31a",
"decimals": 18,
"min_withdraw": 10.00,
"fee_percent": 10
}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/withdraw/coins
$ch = curl_init('https://api.paymatic.cloud/v1/withdraw/coins'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $coins = json_decode(curl_exec($ch), true)['coins']; curl_close($ch); foreach ($coins as $c) { echo $c['symbol'] . " - " . $c['token_address'] . "\n"; }
| Parameter | Type | Description |
|---|---|---|
| coin | string | Coin symbol (e.g. TPAY) |
| amount | float | Withdrawal amount in USD |
| wallet | string | User's receiving wallet address |
| nonce | integer | Current on-chain nonce for the user |
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "coin":"TPAY", "amount":50.00, "wallet":"0xRecipientAddressHere", "nonce":1 }' \ https://api.paymatic.cloud/v1/withdraw/get-permit
$data = json_encode([ 'coin' => 'TPAY', 'amount' => 50.00, 'wallet' => '0xRecipientAddressHere', 'nonce' => 1 ]); $ch = curl_init('https://api.paymatic.cloud/v1/withdraw/get-permit'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $permit = json_decode(curl_exec($ch), true); curl_close($ch); echo "Signature: " . $permit['signature'];
| Parameter | Type | Description |
|---|---|---|
| coin | string | Coin symbol |
| amount | float | Withdrawal amount in USD |
| tx_hash | string | Polygonscan transaction hash |
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "coin":"TPAY", "amount":50.00, "tx_hash":"0x..." }' \ https://api.paymatic.cloud/v1/withdraw/submit
$data = json_encode([ 'coin' => 'TPAY', 'amount' => 50.00, 'tx_hash' => '0x...' ]); $ch = curl_init('https://api.paymatic.cloud/v1/withdraw/submit'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); echo $result;
{
"referral_code": "ABC123",
"referral_link": "https://paymatic.cloud?ref=ABC123",
"total_referrals": 12,
"total_earned": 245.80,
"levels": {
"level_1": { "count": 8, "earned": 180.00, "percent": 3 },
"level_2": { "count": 3, "earned": 45.00, "percent": 0.5 },
"level_3": { "count": 1, "earned": 20.80, "percent": 0.2 }
},
"referrals": [
{
"username": "janedoe",
"level": 1,
"earned_from_them": 45.00,
"joined_at": "2024-06-01T10:00:00Z"
}
]
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/user/referrals
$ch = curl_init('https://api.paymatic.cloud/v1/user/referrals'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $refs = json_decode(curl_exec($ch), true); curl_close($ch); echo "Referral link: " . $refs['referral_link'] . "\n"; echo "Total earned: $" . $refs['total_earned'];
{
"active_plans": [
{
"plan_id": 1,
"plan_name": "StakePool Blue",
"invested": 100.00,
"daily_return": "0.15%",
"total_earned": 12.50,
"started_at": "2025-01-01T00:00:00Z"
}
],
"total_invested": 500.00,
"total_earned": 67.30
}
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.paymatic.cloud/v1/user/plans
$ch = curl_init('https://api.paymatic.cloud/v1/user/plans'); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $plans = json_decode(curl_exec($ch), true); curl_close($ch); echo "Active plans: " . count($plans['active_plans']) . "\n"; echo "Total earned: $" . $plans['total_earned'];
| Parameter | Type | Description |
|---|---|---|
| plan_id | integer | ID of the mining plan to purchase |
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"plan_id":1}' \ https://api.paymatic.cloud/v1/user/purchase-plan
$data = json_encode(['plan_id' => 1]); $ch = curl_init('https://api.paymatic.cloud/v1/user/purchase-plan'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = json_decode(curl_exec($ch), true); curl_close($ch); if ($result['success']) { echo "Plan purchased!"; } else { echo "Error: " . $result['message']; }
{
"total_users": 150000,
"total_paid_out": 4200000.00,
"active_miners": 45000,
"total_mined": 8900000.00,
"plans_active": 62000,
"uptime": "99.9%"
}
curl https://api.paymatic.cloud/v1/stats
$stats = json_decode(file_get_contents( 'https://api.paymatic.cloud/v1/stats' ), true); echo "Total users: " . number_format($stats['total_users']);
The API uses standard HTTP response codes to indicate success or failure:
Error responses return a JSON object with details:
{
"error": "invalid_request",
"message": "The request parameters are invalid.",
"details": {
"amount": ["The amount field is required."]
}
}
# Example: missing required field curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{}' \ https://api.paymatic.cloud/v1/withdraw/get-permit # Response: 422 # {"error":"validation_error","message":"The coin field is required.","details":{"coin":["The coin field is required."]}}
$ch = curl_init('https://api.paymatic.cloud/v1/withdraw/get-permit'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([])); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode >= 400) { $error = json_decode($response, true); echo "Error [$httpCode]: " . $error['message']; }