Webhooks
Notification about a shop order payment completion.
shop_orderPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a recurring shop order charge fails. Sent after each failed charge attempt. The system makes up to 3 attempts (1 initial + 2 retries) over ~8 hours before cancelling the subscription.
Only fires for card-based recurring payments. Subscriptions paid directly with Telegram Stars (no fiat card on file) are auto-renewed by Telegram itself — when Telegram does not renew, the subscription is cancelled with cancelReason="stars_subscription_expired" via shop_order_cancelled without any preceding shop_order_charge_failed events.
Charge timing relative to memberExpiresAt:
- Card payments: charge happens strictly after
memberExpiresAt, typically within minutes. - OnlyStars (card-to-Stars): charge happens up to 72 hours before
memberExpiresAtto pre-purchase Stars for Telegram renewal.
shop_order_charge_failedPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a recurring shop order is charged successfully.
shop_order_charge_successPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a recurring shop order subscription is cancelled. See cancelReason in the payload for the trigger:
cancelled_by_seller— explicit cancel from the Mini App / public API (POST /api/v1/shop/orders/{orderUuid}/cancel).charge_failed— recurring charge could not be completed after all retries.payment_method_expired— saved card is no longer usable.stars_subscription_expired— Telegram Stars subscription did not auto-renew (no fiat card on file; renewal is handled by Telegram).seller_unavailable— seller can no longer accept payments.last_charge_refunded— the buyer's most recently created shop-order buyer transaction was refunded (via any path: bank chargeback, Telegram Stars refund, manual seller refund). Refunding an older charge while a newer one still exists does NOT cancel the subscription. This event is emitted in addition to theshop_order_refundedevent for the same transaction.
shop_order_cancelledPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a merchant-initiated token charge completes successfully.
shop_token_charge_successPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a merchant-initiated token charge fails.
shop_token_charge_failedPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when a shop order transaction is refunded. Fires for one-time and recurring orders alike, regardless of refund trigger (bank chargeback, Telegram Stars refund, manual seller refund).
Lifecycle. Manual seller-initiated refunds emit status=initiated first, then a second event with status=completed once the provider confirms. Bank chargebacks and Telegram Stars refunds skip the initiated step and emit status=completed directly. Consumers must idempotently handle two events with the same transactionId (one per status).
Recurring orders — last-charge cancellation. When the refunded transactionId is the most recently created shop-order buyer transaction for a recurring subscription, this event is followed by a shop_order_cancelled event with cancelReason="last_charge_refunded". Refunding an older charge (i.e., when a newer recurring charge still exists for the same subscription) does NOT cancel the member.
shop_order_refundedPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Notification when an initial shop order payment fails (e.g., card declined, insufficient funds). This is sent for one-time payments that fail during the initial payment attempt.
shop_order_payment_failedPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
The customer has paid the invoice. Sent immediately after payment, before the shop_order webhook.
This is an intermediate signal: funds have not been credited to the merchant yet and the payment may not complete. Do not deliver goods or treat the order as paid — the final status arrives via the shop_order webhook.
shop_order_payment_receivedPossible values: Event creation time
2025-03-20T01:15:58.33246ZEvent sending time
2025-03-20T01:15:58.542279448ZWebhook successfully processed
okInvalid webhook data
Invalid webhook signature
Payload
Last updated