payments.refundStarsCharge
Refund a Telegram Stars transaction, see here » for more info.
func (c *Client) PaymentsRefundStarsCharge(ctx context.Context, request *PaymentsRefundStarsChargeRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsRefundStarsCharge(ctx, &tg.PaymentsRefundStarsChargeRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | yes | User to refund. |
ChargeID | string | yes | Transaction ID. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHARGE_ALREADY_REFUNDED | The transaction was already refunded. |
| 400 | CHARGE_ID_EMPTY | The specified charge_id is empty. |
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.refundStarsCharge#25ae8f4a