Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To accept payments in a Telegram Mini App, build the storefront in Vue 3, use Pinia for shared catalog, cart, and checkout state, and have your bot backend create invoices and confirm payment before fulfilling an order. The payment path depends on what you sell: digital goods and services inside Telegram apps must use Telegram Stars (currency XTR); physical goods use a provider-based payment flow.

Choose the payment path before building checkout

Telegram treats digital and physical sales differently. The product type determines the invoice setup; a merchant’s website payment options do not change Telegram’s rule for digital goods sold inside its apps.

What you sell in the Mini App Payment path What that means for implementation
Digital goods or services Telegram Stars, currency XTR. Use the Stars invoice flow. Telegram says digital goods and services sold inside Telegram apps must use Stars, even if you also sell them through a website or another external payment provider. Telegram Stars payments.
Physical goods A payment provider integrated with Telegram. Use the physical-goods payment flow, which requires a provider token. Provider availability and setup depend on the merchant and market. Telegram Bot Payments and Telegram Mini Apps.

Telegram’s documentation establishes these two paths, but does not select a provider for a particular shop. For physical products, decide only after checking supported countries, payment methods, currency, fees, settlement, refunds, and integration requirements for your business.

How do I use Pinia with Vue 3?

Install Pinia once on the Vue application and place state and business logic there when they are shared across views. A catalog, cart, and checkout progress are natural store concerns; a dialog’s open/closed state can remain local to its component if no other part of the app needs it. Pinia describes stores as a place for state and business logic beyond a single component tree. Pinia introduction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Teacher Record Book
  • Keep track of everything from attendance to test scores
  • Spiral bound
  • Measures 8-1/2" x 11"
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'

const app = createApp(App)
app.use(createPinia())
app.mount('#app')

A minimal cart store might keep the selected product IDs and quantities, while checkout state tracks the order identifier and whether the app is waiting for the backend. Keep authoritative prices, eligibility, and payment status on the server: a client store is useful for interface behavior, not proof that a user paid.

import { defineStore } from 'pinia'

export const useCartStore = defineStore('cart', {
  state: () => ({ items: [] }),
  getters: {
    itemCount: (state) => state.items.reduce((sum, item) => sum + item.quantity, 0),
  },
  actions: {
    add(productId) {
      const item = this.items.find((entry) => entry.productId === productId)
      if (item) item.quantity += 1
      else this.items.push({ productId, quantity: 1 })
    },
  },
})

Pinia supports both Options Store and Setup Store styles. Choose the style that fits the team and application; neither is required by Telegram checkout. Vue recommends Pinia for new applications that need state management. If the app later uses server-side rendering, do not share a module-scope state singleton between user requests; scope application and store instances correctly. Vue state management guidance.

Rank #2
Elan Publishing Company Oversize Record Book for 6-10 Weeks; Extra-Large Squares (1/4") 42 Student Names (King Record)
  • 11" x 13" Over-sized Teacher Record Book
  • No more squinting!
  • 11" x 13" page size
  • Seating charts

Validate Telegram launch data on the backend

Load Telegram’s Mini App client script and use its WebApp interface for platform integration. When the Mini App calls your backend, send the raw initData value for server-side validation before using launch identity or parameters for authorization. Do not authorize from initDataUnsafe: Telegram warns, “WARNING: Data from this field should not be trusted.” Telegram Mini App initialization.

This is a trust boundary, not just an initialization detail. The backend should validate the signed launch data according to Telegram’s documented method and then apply its own access and order checks. Values visible in the Mini App are client-provided until verified server-side.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Elan Publishing Company Class Record Book for up to 10 Weeks. 50 Names. Extra Large Grade Recording Squares. (R9310)
  • 8 1/2 x 11 Teacher Record Book with unique 7 1/2" fold out flap
  • Grade recording sheets for up to 10 weeks in length
  • Columns for weekly averages, major tests, progress reports, parent conferences, and more
  • Enough lines for 50 students on each page, with extra-large grade recording squares

How do I open a Telegram invoice from a Mini App?

Have the backend create or retrieve the appropriate invoice link, then open it in response to a deliberate user action, such as tapping a checkout button. Telegram’s Mini App API provides openInvoice(url[, callback]). The invoice popup closes without closing the Mini App, and its result is reported through the invoiceClosed event; documented statuses include paid, cancelled, failed, and pending. Mini App openInvoice API and Mini App events.

async function startCheckout() {
  const response = await fetch('/api/checkout/invoice', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ items: cart.items }),
  })

  if (!response.ok) throw new Error('Could not prepare checkout')
  const { invoiceUrl } = await response.json()

  Telegram.WebApp.openInvoice(invoiceUrl, (status) => {
    // Use this for interface feedback only.
    // The backend's successful-payment update controls fulfillment.
    checkoutStore.invoiceStatus = status
  })
}

The example’s endpoint is part of your application, not a Telegram URL or a prescribed route. On the server, derive the order and its price from trusted catalog data rather than accepting a client-supplied total. For digital goods, make sure the invoice uses Stars; for physical goods, configure the provider-based invoice flow.

Rank #4
Teacher Modern Farmhouse Record Book
  • Keep all your important information at your fingertips with this inspiring and stylish record book. Plenty of space is provided to record grades for assignments, tests, attendance, or other notations. Each two-page spread allows enough space for 10 weeks worth of record keeping.
  • Convenient, perforated pages allow for easy management of larger classes. An easy-to-use grading chart is also provided.
  • 8-1/2" x 11", 64 pages
  • Spiral bound
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why the bot backend must confirm payment before fulfillment

The popup result helps the interface respond when a user closes checkout, but it is not the authoritative payment record. Telegram’s bot payment lifecycle includes a pre-checkout query and a later successful-payment update. The bot must handle pre-checkout and process the successful payment; grant digital access or dispatch an order only after the backend receives that successful-payment update. Telegram Bot Payments lifecycle.

  1. Prepare the order on the server. Validate the user’s launch data, load trusted product and price information, and create an order tied to the intended customer.
  2. Create the invoice. Build it for the correct product category: Stars for digital goods and services, or the provider-based path for physical goods.
  3. Handle pre-checkout. Process Telegram’s pre-checkout query and perform the order checks required before the payment proceeds.
  4. Wait for the successful-payment update. Match the update to the server-side order and record its payment details before fulfillment.
  5. Fulfill idempotently. Make repeated delivery attempts safe, so retries or duplicate event handling do not grant extra digital entitlements or ship duplicate orders.

Store Telegram’s payment charge ID with the order: Telegram documents it as potentially needed for a future refund. The Mini App may show “payment pending” or another appropriate state based on the popup callback, but only the backend’s payment record should change an order to paid.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
Teacher Record Book
Teacher Record Book
Keep track of everything from attendance to test scores; Spiral bound; Measures 8-1/2" x 11"
$4.89
Bestseller No. 2
Elan Publishing Company Oversize Record Book for 6-10 Weeks; Extra-Large Squares (1/4') 42 Student Names (King Record)
Elan Publishing Company Oversize Record Book for 6-10 Weeks; Extra-Large Squares (1/4") 42 Student Names (King Record)
11" x 13" Over-sized Teacher Record Book; No more squinting!; 11" x 13" page size; Seating charts
$11.60
Bestseller No. 3
Elan Publishing Company Class Record Book for up to 10 Weeks. 50 Names. Extra Large Grade Recording Squares. (R9310)
Elan Publishing Company Class Record Book for up to 10 Weeks. 50 Names. Extra Large Grade Recording Squares. (R9310)
8 1/2 x 11 Teacher Record Book with unique 7 1/2" fold out flap; Grade recording sheets for up to 10 weeks in length
$12.95
Bestseller No. 4
Teacher Modern Farmhouse Record Book
Teacher Modern Farmhouse Record Book
8-1/2" x 11", 64 pages; Spiral bound
$14.00

A practical division of responsibility

  • Vue components: render catalog and checkout screens, collect user intent, and keep view-only details local.
  • Pinia stores: coordinate shared catalog, cart, and checkout presentation state across views.
  • Mini App API: provide Telegram platform integration and open the invoice popup.
  • Bot backend: validate initData, price orders, create invoices, handle payment updates, and control fulfillment.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.