In-app Purchases
Players can buy either items or virtual currency in your game.
It is your responsibility to define item ids. Title, description and currency name are for display purposes only and can be changed at any time.
Given how Telegram operates, you must define a single callback to receive payment results events. Refer to Configure In-app purchase.
Your callback will be invoked with a structure looking like:
Where:
- paymentId
Internal id for this payment.
- purchaseParams
The initial purchase params you sent
- status
One of
paid
failed
pending
cancelled
Buy item
Title and description will be displayed in the invoice to the user, so they should be readable. itemId
on the other hand is your own internal reference to the item. Ideally, you should maintain an item inventory somewhere in your code base, where itemIds will be immutable, but where you can change title and description at will.
Buy In-game currency
Symbol
and name
parameters refers to the In-game currency, not Telegram STARS.