CChainPay
Sign in

Quickstart: your first crypto deposit in 5 minutes

You need a wallet address you control and a public URL that can receive a webhook. No registration, no API key.

1. Create a deposit address

curl -X POST https://api.chainpay.site/deposit-address \
  -H 'content-type: application/json' \
  -d '{
    "ticker": "trc20/usdt",
    "callbackUrl": "https://your-service.example.com/webhook?token=your-secret",
    "forwardAddress": "TYourOwnTronWallet...",
    "externalReference": "order-123"
  }'

The response contains id and address. Show address to the payer. Repeating the same request returns the same address, so retries are safe.

2. Receive the webhook

When the deposit reaches the confirmation threshold (19 on TRON), ChainPay sends a POST with status: "confirmed" to your callbackUrl. Funds are then swept to your forwardAddress, minus the fee. Check the token query value on your side: webhooks are not signed.

3. Reconcile with the status API

curl https://api.chainpay.site/deposit-address/ADDRESS_ID/status
curl https://api.chainpay.site/deposit-address/ADDRESS_ID/transactions

Treat webhooks as at-least-once and use these endpoints as the source of truth.

Examples in your language

Node.js

const res = await fetch('https://api.chainpay.site/deposit-address', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    ticker: 'trc20/usdt',
    callbackUrl: 'https://your-service.example.com/webhook?token=your-secret',
    forwardAddress: 'TYourOwnTronWallet...',
    externalReference: 'order-123',
  }),
});
const { id, address } = await res.json();

Python

import requests

r = requests.post("https://api.chainpay.site/deposit-address", json={
    "ticker": "trc20/usdt",
    "callbackUrl": "https://your-service.example.com/webhook?token=your-secret",
    "forwardAddress": "TYourOwnTronWallet...",
    "externalReference": "order-123",
})
address = r.json()["address"]

PHP

$ch = curl_init('https://api.chainpay.site/deposit-address');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'ticker' => 'trc20/usdt',
    'callbackUrl' => 'https://your-service.example.com/webhook?token=your-secret',
    'forwardAddress' => 'TYourOwnTronWallet...',
    'externalReference' => 'order-123',
  ]),
]);
$address = json_decode(curl_exec($ch), true)['address'];

Next steps