I've sat with the AI Studio Billing tab open, hitting reload, right after buying credits. The confirmation email had arrived. The balance still read 0, and my script kept failing. It's an uncomfortable few minutes.
What I'd like to say up front: the first page to check is AI Studio, not Cloud Billing. Below is why, and the order I follow after that.
Two different symptoms
"I paid but it doesn't work" can mean two things:
- The balance on screen is stuck at 0 (a display problem)
- Requests keep failing with HTTP 402 (the API is actually blocked)
According to Google's billing page, requests fail with 402 when the balance hits $0, and adding credits restores service, though there can be a short delay before the new balance is reflected. So for a few minutes after a purchase, both the screen and the API can still reflect the old state.
Step 1: Only AI Studio manages the balance
Prepaid balances are managed in the Billing tab of Google AI Studio. Cloud Billing shows Gemini API costs, but you can't manage the credit balance there.
Cost data in Cloud Billing also lags behind AI Studio usage, usually within a day and sometimes longer. A missing amount in Cloud Billing doesn't prove the payment failed.
Step 2: Check the payment method and the wait
Card payments are usually instant. Bank transfers and similar methods can take several days, and service resumes only after the purchase is confirmed.
| Situation | Likely reading | Next move |
|---|---|---|
| Card, under 10 minutes ago | Still propagating | Wait, then reload AI Studio |
| Card, over 30 minutes ago | Payment may not be confirmed | Check the receipt and purchase history in Billing |
| Bank transfer or similar | Can take days | Wait for confirmation |
| Balance is positive but calls fail | Not a balance issue | Go to Step 3 |
The 10-minute figure follows the billing pipeline latency Google documents; I haven't timed it myself in a strict way.
Step 3: Positive balance, still blocked
If the balance is positive but requests fail, look beyond the balance. The billing page lists causes such as:
- You've reached your tier's spend cap
- A postpay problem on the same billing account (an unpaid bill for another Cloud service can suspend Gemini regardless of your prepaid balance)
- The message "The billing account type is inactive or unsupported," meaning the account type or status isn't eligible for the paid tier
- A canceled prepay setup that left the billing account in a state where it can't be charged
Only now do I open the Cloud Console to look at the billing account's status. Balance lives in AI Studio; account health lives in Cloud Console. Keeping that split avoids a lot of wandering.
For cap-related stops, I've written about separating retryable 429s from spend-cap exhaustion and spend caps per tier and project isolation.
Step 4: Let your own code tell you how it's stopping
Logging the result beats staring at a dashboard. This minimal script prints the status code and body, and separates "out of balance (402)" from everything else, so you don't have to eyeball it.
import os
import sys
import requests
# Read the key from the environment (YOUR_API_KEY never goes in source)
API_KEY = os.environ["GEMINI_API_KEY"]
MODEL = "gemini-3.8-flash" # replace with the model you actually use
URL = f"https://generativelanguage.googleapis.com/v1beta/models/{MODEL}:generateContent"
resp = requests.post(
URL,
headers={"x-goog-api-key": API_KEY, "Content-Type": "application/json"},
json={"contents": [{"parts": [{"text": "ping"}]}]},
timeout=30,
)
print(resp.status_code, resp.text[:300])
if resp.status_code == 402:
print("Likely out of balance: check the Billing tab in AI Studio")
sys.exit(2)
if resp.status_code == 429:
print("Likely a cap or quota: check tier limits and usage")
sys.exit(3)
if not resp.ok:
print("Not a balance issue: check billing account status, key, model name")
sys.exit(1)I split it this way because 402 and 429 point to different places. 402 means balance, 429 means a limit, and anything else points to the account or the key. The exit code alone tells me which step to go back to.
Three easy traps
- Buying more credits while the first purchase is still propagating (the minimum is $5, unused credits expire after 12 months, and refunds are generally not offered)
- Several projects sharing one billing account, so one empty balance stops every key at once
- Reading an empty Cloud Billing page as "the payment never arrived"
The second one is easy to hit as an indie developer who keeps keys for several apps under one billing account. When the balance runs out, they all stop together.
Where I draw the line
During the first few minutes after a purchase, I stop touching the screen. Reloading doesn't speed anything up. I run the check script once, wait ten minutes if it still returns 402, and only then move on to the receipt, the purchase history, and the billing account status.
Balance in AI Studio, account health in Cloud Console. I keep that split even on a tired night.
Next time you buy credits, I'd suggest having the check script ready before you click Buy. That's where I started.