guide

Telegram Mini App

Integrate QuantaPay payments into Telegram Mini Apps for seamless in-chat commerce.

Updated: 3/9/2026

Integrate QuantaPay payments into Telegram Mini Apps for seamless in-chat commerce.

Overview

Telegram Mini Apps (formerly Web Apps) are web-based applications that run inside the Telegram messenger. By integrating QuantaPay, you can accept cryptocurrency payments directly within Telegram.

Integration Approach

Use the QuantaPay Checkout Session API to create payments from your Mini App:

  1. Your backend calls create-checkout-session to create a payment.
  2. Open the payment_url in the Telegram WebView or redirect the user.
  3. The customer pays on the QuantaPay payment page.
  4. Your backend receives a webhook when payment is confirmed.

Example Flow

// In your Mini App frontend
async function handlePayment(amount, currency) {
  // Call your backend to create a checkout session
  const response = await fetch('/api/create-payment', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ amount, currency })
  });

  const { payment_url } = await response.json();

  // Open payment URL in Telegram
  window.Telegram.WebApp.openLink(payment_url);
}
// Your backend endpoint
$result = file_get_contents('https://cloud.quantapay.app/api.php', false,
  stream_context_create([
    'http' => [
      'method' => 'POST',
      'header' => 'Content-Type: application/x-www-form-urlencoded',
      'content' => http_build_query([
        'function' => 'create-checkout-session',
        'api-key' => 'YOUR_API_KEY',
        'price' => $_POST['amount'],
        'currency' => $_POST['currency'],
        'redirect' => 'https://t.me/YourBot/app', // Return to Mini App
      ])
    ]
  ])
);

Case Study: BuyCard

BuyCard (tg.buycard.vip) is a Telegram Mini App that uses QuantaPay for cryptocurrency payments. It demonstrates:

  • Gift card purchases paid with crypto via QuantaPay Checkout Sessions
  • TON Connect wallet integration for native TON payments
  • Telegram Stars payments as an alternative payment method
  • Multi-language support (11 languages)

TON Connect Integration

TON Connect is a custom integration for accepting TON (Toncoin) payments directly through the TON wallet. This is a custom development feature — contact us if you're interested in similar integration for your Mini App.

Custom Development

Need a tailored Telegram Mini App payment integration? We offer custom development services including:

  • TON Connect wallet integration
  • Custom payment flows
  • Multi-currency support
  • Order management systems

Contact us at [email protected] or via Telegram for custom development inquiries.