Skip to main content

Telegram Stars + Acquiring

Getting the cost of Stars

Verify a Telegram username and get the acquisition cost and minimum sale price of one star

GET /api/stars/price

Request parameters

ParameterRequiredTypeComment
usernameYesStringThe user's Telegram username

Response parameters

ParameterTypeComment
starPriceNumberThe acquisition cost of one star, in RUB
minPriceNumberThe minimum sale price of one star, in RUB (acquisition cost plus the minimum WATA commission)

Creating an order

Create an order to purchase stars and get a payment link.

The merchant income is the stars' sale price minus the WATA commission (% of the price) and the stars' acquisition cost.

POST /api/stars

Request parameters

ParameterRequiredTypeComment
usernameYesStringThe user's Telegram username
countYesNumberNumber of stars to purchase (must be between 50 and 50,000 units)
amountYesNumberThe payment (transaction) amount in rubles for which the payment link will be created. Up to 2 digits after the decimal point for kopecks. Example: 1188.00. Value constraints: minPrice*count <= amount <= minPrice*count*1.5. If the amount exceeds 2,000 RUB, order confirmation is required — see Confirming an order
descriptionYesStringOrder description or other details
telegramIdNoNumberThe user's Telegram ID
orderIdYesStringOrder number. It is later used to check the order status
successRedirectUrlNoStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlNoStringThe store page URL the payer is redirected to if the order payment fails

Response parameters

ParameterTypeComment
orderIdStringOrder number. It is later used to check the order status
usernameStringThe user's Telegram username
countNumberNumber of stars to purchase
amountNumberThe payment (transaction) amount in rubles for which the payment link was created. Up to 2 digits after the decimal point for kopecks. Example: 1188.00
priceNumberThe stars' acquisition cost, in RUB
commissionNumberThe WATA commission, in RUB
descriptionStringOrder description or other details
paymentLinkStringThe payment link URL
successRedirectUrlStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlStringThe store page URL the payer is redirected to if the order payment fails

Confirming an order

Confirm the stars delivery.

If confirmation is required, the order is placed in the "Review" status. After confirmation, the order moves to the "Paid" status.

POST /api/stars/order/{id}/confirm

Request parameters

ParameterRequiredTypeComment
idYesStringOrder number

Cancelling an order

Cancel the stars delivery.

If confirmation is required, the order is placed in the "Review" status. After cancellation, the order moves to the "Refunded" status (funds are returned to the payer).

POST /api/stars/order/{id}/reject

Request parameters

ParameterRequiredTypeComment
idYesStringOrder number

Checking order status

GET /api/stars/order/{id}

Request parameters

ParameterRequiredTypeComment
idYesStringOrder number

Response parameters

ParameterTypeComment
orderIdStringOrder number
statusStringOrder status. Possible values: (1) Pending (awaiting payment) → (2) Review (awaiting merchant order confirmation) → (3.1) Paid (order paid and being fulfilled) OR (3.2) Refunded (order not confirmed, payment returned) → (4.1) Success (order fulfilled) OR (4.2) Fail (error)
usernameStringThe user's Telegram username
countNumberNumber of stars purchased
amountNumberThe payment (transaction) amount in rubles
descriptionStringOrder details or other information
creationTimeTimeTime in ISO 8601 format (UTC datetime format)
successRedirectUrlStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlStringThe store page URL the payer is redirected to if the order payment fails