refundStarPayment()
Refunds a successful payment in Telegram Stars. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | Identifier of the user whose payment will be refunded |
telegram_payment_charge_id | string | required | Telegram payment identifier |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { RefundStarPaymentParams } from "@yaebal/types";
await bot.api.call<boolean>("refundStarPayment", {
user_id: 123456789,
telegram_payment_charge_id: "...",
} satisfies RefundStarPaymentParams);context shortcut
also available as ctx.refundStarPayment() on
16
context types — see @yaebal/contexts.
/** Refunds a successful payment in [Telegram Stars](https://t.me/BotNews/90). Returns *True* on success. */
ctx.refundStarPayment(params: Omit<RefundStarPaymentParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#refundstarpayment