REST over HTTPS, JSON in and out. Base URL: https://kriptopago.com/api/v1. Amounts are decimal strings, in USD by default or in your local currency. Funds never touch Kriptopago: the customer pays your own wallet and we detect it.
Create a key in Dashboard → Developers and send it as a Bearer token. Keys are shown once; store them server-side only.
Authorization: Bearer kp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Rate limit: 120 requests/minute per key.
checkout_url.paid.charge.paid to your webhook and send the customer back to redirect_url.Statuses: new → pending → detected → paid, or expired / cancelled. A payment that arrives after expiry is still matched for 2 hours and flagged late: true.
POST /charges
| Field | Type | Description |
|---|---|---|
amount | string | Required. Decimal string in currency (2 decimals max; none for CLP, JPY…). Min. 0.50 USD equivalent. |
currency | string | Optional, default USD. Any ISO code we quote (EUR, GBP, CLP, MXN, INR…). Converted to USD at creation (daily rate, rounded up); the crypto amount comes from that USD value. The response returns your amount/currency plus amount_usd. |
order_id | string | Your reference. Idempotent: same order_id returns the same charge. |
assets | array | Restrict coins, e.g. ["usdt_trc20"]. Default: every coin you have a wallet for. |
description | string | Shown on checkout. |
customer_email | string | Optional. |
redirect_url / cancel_url | url | Where to send the customer after paying / on expiry. |
metadata | object | Returned untouched in API and webhooks. |
curl -X POST https://kriptopago.com/api/v1/charges \ -H "Authorization: Bearer $KP_KEY" -H "Content-Type: application/json" \ -d '{"amount":"25.00","order_id":"1042","redirect_url":"https://shop.example/ok"}'
{
"id": "ch_k2v9x4m1q7aa", "object": "charge", "status": "new", "late": false,
"amount": "25.00", "currency": "USD", "order_id": "1042",
"assets_allowed": ["usdt_trc20", "usdt_bep20", "bnb"],
"payment": null,
"checkout_url": "https://kriptopago.com/pay/ch_k2v9x4m1q7aa",
"expires_at": "2026-12-07T15:04:05Z", "paid_at": null
}
Once the customer picks a coin, payment holds asset, coin, network, address, amount, rate_usd, tx_hash, confirmations.
PHP
$ch = curl_init('https://kriptopago.com/api/v1/charges'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('KP_KEY'), 'Content-Type: application/json'], CURLOPT_POSTFIELDS => json_encode(['amount' => '25.00', 'order_id' => $orderId]), ]); $charge = json_decode(curl_exec($ch), true); header('Location: ' . $charge['checkout_url']);
GET /charges/{id}
GET /charges?status=paid&limit=25&starting_after=ch_…
GET /charges?order_id=1042
POST /charges/{id}/cancel
GET /account # plan, credits, enabled assets
GET /rates # USD price per asset
Reusable URLs with a fixed or open amount. Every visit creates its own charge.
POST /payment_links {"title":"Top-up", "amount":"10.00"} # omit amount = customer types it
GET /payment_links
Paste this HTML anywhere (replace the link id):
<a href="https://kriptopago.com/l/pl_xxxxxxxx" style="display:inline-block;padding:12px 20px; background:#f2c14e;color:#1a1405;border-radius:6px;font:600 15px sans-serif;text-decoration:none"> Pay with crypto</a>
Add an HTTPS endpoint in Dashboard → Developers. Events: charge.created, charge.detected, charge.paid, charge.expired, charge.cancelled, subscription.renewed, subscription.past_due, subscription.cancelled.
Verify every request: compute HMAC-SHA256 of t + "." + raw_body with your endpoint secret and compare with v1. Reply 2xx; failures are retried with backoff for ~2 days.
Kriptopago-Signature: t=1796551200,v1=5f1c… // PHP $raw = file_get_contents('php://input'); parse_str(str_replace(',', '&', $_SERVER['HTTP_KRIPTOPAGO_SIGNATURE']), $sig); $ok = abs(time() - (int)$sig['t']) < 300 && hash_equals(hash_hmac('sha256', $sig['t'] . '.' . $raw, $secret), $sig['v1']); $event = json_decode($raw, true); if ($ok && $event['type'] === 'charge.paid') { /* credit order $event['data']['order_id'] */ }
Always confirm the amount and order on your side; process each event id once.
| asset | Coin / network | Wallet | Confirmations |
|---|---|---|---|
usdt_trc20 | USDT · TRON | TRON | solidified |
usdt_bep20 | USDT · BNB Smart Chain | EVM 0x | 5 |
usdt_erc20 | USDT · Ethereum | EVM 0x | 3 |
bnb | BNB · BNB Smart Chain | EVM 0x | 5 |
eth | ETH · Ethereum | EVM 0x | 3 |
btc | BTC · Bitcoin | BTC | 1 |
ltc | LTC · Litecoin | LTC | 2 |
usdt_binance | USDT · Binance Pay | Binance Pay ID | 0 |
One 0x address receives USDT-BEP20, BNB, USDT-ERC20 and ETH. Binance Pay requires a paid plan.
{ "error": { "code": "no_credits", "message": "No credits left…" } }
| 401 | unauthorized |
| 402 | no_credits — buy a pack or upgrade; open charges are still detected |
| 422 | invalid_amount, no_wallet_for_asset, invalid_redirect_url |
| 429 | rate_limited |