Gram Shop
EN
Sign in Request access
Features

Nine modules, one system of record.

Telegram, the web workspace, the admin console and the API are different doors into the same policies and state transitions. Whatever the door, the same authorization, idempotency and audit rules apply.


01

Teams, Stores and authority

A Team is the tenant and billing boundary. A Store is the commerce and Customer-data boundary. A User can belong to several Teams; a Team can operate several Stores when its entitlements allow it.

Roles for Owner, Admin and Member, plus per-Store scoping
Invitations, ownership transfer and audit history
Effective authority recalculated from membership, scope, token abilities and entitlements on every request
A Telegram Customer is never treated as a workspace User
Invariant

Boundaries are enforced server-side. Hiding a UI element is not authorization.


02

Plans, entitlements and the Fee Wallet

A versioned plan catalog drives entitlement checks and quotas. Provider webhooks are normalized before they touch subscription state, and reconciliation commands close the gap when a provider goes quiet.

Plan versions with explicit entitlement keys and grace periods
Polar is selected for new subscriptions; availability depends on deployment configuration
Invoices, payment methods and transition services
Team Fee Wallet with an append-only ledger
Invariant

Downgrade, restriction and suspension never delete historical data.


03

Store configuration and bot provisioning

Paste a token from BotFather; Gram Shop verifies it against Telegram, registers the webhook, and resolves every inbound update to exactly one Store. Branding, languages and secrets are per-Store.

Token verification before the Store goes live
Webhook ingestion with signature and replay checks
Localization per Customer, remembered across sessions
Store branding and encrypted secret storage
Invariant

Secrets are encrypted or isolated and redacted from logs, exports, API responses and webhooks.


04

Catalog, quotes and finite inventory

Multilingual product data, priced quotes with expiry, and finite inventory held as encrypted units. Reservation is atomic, so the last unit of a sold-out product has exactly one winner.

Per-language names, descriptions and delivery notes
Quotes that expire rather than drift out of date
Encrypted units, reserved atomically under concurrency
Unlimited products for generated or externally sourced goods
Invariant

Concurrent requests for the last unit produce one winner and one clear refusal.


05

Orders, wallets, vouchers and referrals

An order can be paid from the Customer Wallet, an external gateway, or both. Every movement of money posts an immutable ledger entry in integer minor units for fiat and exact decimals for crypto.

Split payment across wallet balance and gateway in one order
Vouchers and referral credits applied before the quote is fixed
Append-only Customer Wallet ledger
Corrections by reversal or compensating entry, never by edit
Invariant

Never floating point for money. Posted ledger entries are append-only.


06

VietQR, crypto and reconciliation

Payment intents are matched to provider evidence. Duplicate and reordered events are absorbed idempotently, and anything that cannot be matched automatically lands in an exception queue with the raw evidence attached.

VietQR reference matching with amount and time windows
Crypto confirmations at a configurable depth
Idempotent handling of duplicate or out-of-order webhooks
Exception queue, reconciliation commands and exchange-rate history
Invariant

Screenshots, browser returns and repeated status polls are never payment proof.


07

Automatic fulfillment, warranty and support

Verified payment triggers delivery in-chat within seconds. The revealed unit is written to the order record, redacted everywhere else, and carried into any later warranty claim or support thread.

Delivery in the Customer’s language, in the original chat
Warranty windows and claims linked to the original order
Support threads that carry order and payment context
Redaction across logs, exports, API responses and notifications
Invariant

A paid order is never denied fulfillment because the Fee Wallet later ran short.


08

Team Workspace and Platform Admin

Two surfaces, two identities. Team Workspace is where your people work. Platform Admin runs under a separate guard and permission model for Gram Shop operations — no shared privileges, no shared sessions.

Email verification, 2FA, passkeys, magic links and QR login
Session management, connected accounts and activity history
Announcements, system banners and notification delivery
Least-privilege admin roles, menus and audit-oriented operations
Invariant

Team User and Platform Admin identities and privileges stay separate.


09

Store-scoped API, tokens and webhooks

A Developer is a normal Team member with scoped automation access, not a separate tenant type. Tokens carry granular abilities and a Store scope; writes take idempotency keys; outbound webhooks are signed with a retry history you can inspect.

Versioned /api/v1 resources, scoped to one Store
Granular token abilities with per-plan rate and burst limits
Idempotency keys on every externally retryable write
Signed outbound webhooks with attempt history and replay
Invariant

A duplicate or reordered event must not create a second credit, sale, fulfillment or disclosure.


Not every module is live yet — and we say which.

Preparing for Controlled Beta. Core journeys are implemented; admission awaits convergent release checks and signed operational rehearsals. Request an invitation to be considered for a future cohort.