Telegram "provider account invalid" error: what it means and what to check
Telegram does not document an error called "provider account invalid". Developers report a similar Bot Payments failure, `PAYMENT_PROVIDER_INVALID`, when an invoice is sent with a provider token. Checking that the bot uses the current token shown in BotFather, and testing in Stripe test mode, are the safest first steps.
On this page
What it means
The exact phrase "provider account invalid" does not appear in Telegram's documentation, so it is probably not a message Telegram itself shows. The nearest problem is in Telegram Bot Payments. Developers have reported a 400 error with the text PAYMENT_PROVIDER_INVALID when a bot sends an invoice with a provider_token.
This mostly concerns people who run a bot that takes payments through a third-party provider such as Stripe. If you are an ordinary user who saw the text while paying inside someone's bot, the cause is on the bot owner's side and the useful step is to tell them. The text may also come from a third-party platform or bot framework rather than from Telegram, so note exactly where it appears.
Symptoms and causes
You are likely dealing with this problem if:
- The Bot API returns a 400 error when your bot sends an invoice.
The usual causes, most common first:
- Test and live tokens mixed up (possible)
- A test token may be used where a live one is expected, or the reverse. Live Stripe tokens have
:LIVE:in the middle, such as123:LIVE:XXXX.
How to fix it
Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.
1.Copy a fresh token from BotFather
It rules out a typo, whitespace or an old token in your bot's configuration.
- In Telegram, open BotFather and send
/mybots, then choose your bot. - Go to Bot Settings, then Payments.
- Choose your provider and finish its setup in the provider's bot if it is not complete.
- BotFather lists the connected providers with a name, a token and a connection date. Copy the token again and paste it into
provider_tokenin your bot's code or configuration. Check for leading or trailing spaces. - Keep the token private. Do not post it in forums or bug reports.
2.Test with Stripe TEST MODE first
Test mode gives a separate token, so you can tell whether the problem is your code or the live provider setup.
- In the same BotFather payments menu, connect Stripe TEST MODE to get a test token.
- Use that token as
provider_tokenand pay with the test card4242 4242 4242 4242. - You can switch between test and live as often as you need.
3.Enable live mode and use the live token
A live bot needs the live token and finished live setup with both Telegram and the provider.
Before you start: Live mode handles real money. Test first before switching.
- In BotFather's payments menu, enable Stripe LIVE MODE.
- Copy the new live token (it has
:LIVE:in the middle, like123:LIVE:XXXX) and replace the test token with it. - Make sure the bot owner has completed the live checklists for Telegram and for the provider.
Check that it worked
- Your bot sends an invoice and the 400 error no longer comes back.
- In test mode, the test card
4242 4242 4242 4242completes a payment.
If it still fails
- Write down where you see the exact text (Telegram, a bot framework, a website). If it is not from the Bot API, ask that platform's support what it means.
- Contact the payment provider about the status of your account, since Telegram's pages give no guidance on this error.
- If you are a customer rather than the bot owner, report the problem to the seller and do not send card details or codes anywhere else.
Sources
- Bot PaymentsOfficial · Telegram