API v1 • REST

KronoPay API Documentation

KronoPay provides non-custodial crypto payment infrastructure (BEP-20, TRC-20, and Binance Pay / C2C) for B2B merchants with automated exact-amount matching and real-time webhook delivery.

Authentication

Authenticate all API requests by providing your Public API Key in the X-Api-Key HTTP request header.

X-Api-Key: kp_live_pub_9a8b7c6d5e4f3a2b1c
POST /api/v1/checkout/create

Creates a new payment checkout session with exact micro-delta amount or memo code, and returns the interactive checkout_url for the customer.

Parameter Type Required Description
amount Numeric Yes Base invoice amount in USD/USDT (e.g. 250.00)
merchant_order_id String Yes Your unique internal order/invoice reference (e.g. ORD-9921)
network String Yes BEP20, TRC20, or BINANCE_INTERNAL
customer_email String Optional Customer email address for receipts
return_url String Optional Redirect target URL upon payment completion
Sample cURL Request:
curl -X POST https://kronopay.net/api/v1/checkout/create \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: kp_live_pub_your_public_key" \
  -d '{
    "amount": 250.00,
    "merchant_order_id": "INV-2026-004",
    "network": "BINANCE_INTERNAL",
    "customer_email": "customer@example.com",
    "return_url": "https://yoursite.com/order/success"
  }'

Binance C2C / Pay Flow

When a customer initiates a payment with network set to BINANCE_INTERNAL:

Verifying Webhook Signatures (HMAC-SHA256)

Every webhook event includes an X-KronoPay-Signature header generated with HMAC-SHA256 using your Secret Key.

<?php
$payload = file_get_contents('php://input');
$signatureHeader = $_SERVER['HTTP_X_KRONOPAY_SIGNATURE'] ?? '';
$secretKey = 'kp_live_sec_your_secret_key';

$expectedSignature = hash_hmac('sha256', $payload, $secretKey);

if (hash_equals($expectedSignature, $signatureHeader)) {
    $data = json_decode($payload, true);
    if ($data['event'] === 'payment.completed') {
        $orderId = $data['data']['order_id'];
        // Deliver goods / fulfill order
        http_response_code(200);
        echo json_encode(['status' => 'success']);
        exit;
    }
}

http_response_code(400);
echo json_encode(['error' => 'Invalid signature']);
?>