Payment Integration

Binance Pay Integration: Accept Crypto Payments

In brief

Integrate Binance Pay into your website or app. Step-by-step technical guide covering API setup, QR payments, webhooks and settlement in USDT or local currency.

On this page 6 sections
Binance Pay Integration: Accept Crypto Payments

Binance Pay is one of the fastest-growing crypto payment methods, letting over 200 million Binance users pay directly from their Binance wallet: in USDT, BUSD, BTC, ETH and 50+ other cryptocurrencies. For businesses, it means near-zero fees, instant settlement and access to a global customer base.

How Binance Pay works

Unlike traditional crypto payments where customers copy your wallet address and manually send funds, Binance Pay creates a structured checkout experience:

  1. Your system creates a payment order via the Binance Pay API.
  2. The customer scans a QR code or clicks a deep link that opens their Binance app.
  3. They confirm the payment in the app.
  4. Binance sends a webhook to your server confirming the payment.
  5. Your system releases the product or service.

The entire flow takes under 30 seconds and feels as smooth as any card payment.

Technical integration

Step 1: Get API credentials

Register on the Binance Merchant Platform. Generate an API key and secret. Store the secret securely, never in source code.

Step 2: Create an order

$timestamp = now()->timestamp * 1000;
$nonce = Str::uuid();
$body = json_encode([
    'merchantId' => config('binance.merchant_id'),
    'merchantTradeNo' => 'ORDER-' . $order->id,
    'orderAmount' => $order->total,
    'currency' => 'USDT',
    'goods' => [
        'goodsType' => '02', // physical goods
        'goodsCategory' => '5000',
    ],
]);

$payload = $timestamp . "\n" . $nonce . "\n" . $body . "\n";
$signature = strtoupper(hash_hmac('sha512', $payload, config('binance.api_secret')));

$response = Http::withHeaders([
    'BinancePay-Certificate-SN' => config('binance.api_key'),
    'BinancePay-Timestamp' => $timestamp,
    'BinancePay-Nonce' => $nonce,
    'BinancePay-Signature' => $signature,
    'Content-Type' => 'application/json',
])->post('https://bpay.binanceapi.com/binancepay/openapi/v2/order', json_decode($body, true));

$qrCode = $response['data']['qrCode'];
$checkoutUrl = $response['data']['checkoutUrl'];

Step 3: Handle the webhook

Binance sends a webhook when payment succeeds. Verify the signature before processing:

public function handleBinanceWebhook(Request $request): JsonResponse
{
    $timestamp = $request->header('BinancePay-Timestamp');
    $nonce = $request->header('BinancePay-Nonce');
    $signature = $request->header('BinancePay-Signature');
    $body = $request->getContent();

    $payload = $timestamp . "\n" . $nonce . "\n" . $body . "\n";
    $expected = strtoupper(hash_hmac('sha512', $payload, config('binance.api_secret')));

    if (! hash_equals($expected, $signature)) {
        return response()->json(['status' => 'FAIL']);
    }

    $data = json_decode($body, true);
    if ($data['data']['status'] === 'SUCCESS') {
        // Mark order as paid, release product
    }

    return response()->json(['status' => 'SUCCESS']);
}

Advantages over traditional payments

  • 0.5% fee vs 2.9%–3.8% for cards.
  • Instant settlement: funds arrive in your Binance wallet within seconds.
  • No chargebacks: crypto payments are final.
  • Global reach: 200M+ Binance users worldwide.
  • Multi-currency: accept USDT, BUSD, BTC, ETH, BNB and more.

TFast Digital Agency integrates Binance Pay into websites, e-commerce stores and mobile apps: handling the full API integration, webhook processing and order management so your business can start accepting crypto payments in days, not weeks.

<!-- SEO keyword optimization: binance pay integration -->

Focusing on binance pay integration is essential for modern business success.