API Documentation

Integrate non-custodial USDT payments into your platform in minutes.

Authentication

All API requests must include your API Key in the X-API-KEY header.

X-API-KEY: your_api_key_here

Create Payment

POST /api/v1/payments.php

Request Body

{
  "amount": 10.50,
  "external_id": "order_123",
  "metadata": {
    "customer_name": "John Doe"
  }
}

Response

{
  "status": "success",
  "data": {
    "id": 12,
    "amount_base": 10.5,
    "amount_total": 10.500001,
    "address": "T...",
    "status": "pending",
    "expires_at": "2026-01-21 12:00:00",
    "payment_url": "http://localhost/payment_system/pay.php?id=12"
  }
}

Webhooks

When a payment is completed, we will send a POST request to your Webhook URL.

Validation

We sign the payload using your Webhook Secret. Verify it using X-CryptoPay-Signature header.

$signature = hash_hmac('sha256', $raw_payload, $your_secret);
Back to Home