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 custom header. Do not share your API key publicly.

Example Header X-API-KEY: your_production_api_key_here

Create Payment

Generate a unique payment link and TRC20 address fragment for a customer checkout.

POST /api/v1/payments.php
ParameterTypeDescription
amount float Required The amount in USDT.
external_id string Optional Your internal order/user ID.
metadata object Optional JSON object with custom data.

Request Payload Example

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

Successful Response (200 OK)

{
  "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 & Verification

We send a POST request with a JSON payload to your configured Webhook URL when a payment status changes.

🛡️ Security Validation

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

PHP Verification Example


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