Fix: Stripe 'This phone number cannot be used' for AI Agents
Solve Stripe phone verification errors for AI agents. Learn about carrier lookup, VoIP blocking, and how to use real SIM numbers that pass verification.
If you're building AI agents that need Stripe accounts, you've hit this error: "This phone number cannot be used for verification." Stripe blocks VoIP numbers at the carrier lookup level. Here's how it works and how to fix it.
Why Stripe Blocks Your Number
When you submit a phone number, Stripe queries carrier databases before sending any SMS:
- LERG (Local Exchange Routing Guide) — Maps every North American number to its carrier and line type
- NPAC (Number Portability Administration Center) — Tracks numbers ported between carriers
- HLR (Home Location Register) — Real-time check of mobile network registration
If the lookup returns line_type: "voip" — instant rejection. The SMS is never sent.
Who Gets Blocked
| Provider | LERG Carrier | Line Type | Stripe Result |
|---|---|---|---|
| Twilio | Twilio Inc | voip | ❌ Blocked |
| Google Voice | voip | ❌ Blocked | |
| Vonage | Vonage | voip | ❌ Blocked |
| TextNow | TextNow | voip | ❌ Blocked |
| AgentSIM | T-Mobile USA | mobile | ✅ Passes |
A Stripe security engineer confirmed the logic on Hacker News:
"We reject VoIP phone numbers due to proven fraud activity. VoIP numbers can be obtained with no identity verification, recycled instantly after use, and are disproportionately associated with account takeover attempts."
The Fix: Real SIM Numbers via AgentSIM
AgentSIM provisions actual SIM-backed numbers on carrier networks. They pass LERG, NPAC, and HLR checks because they ARE real mobile numbers.
Install
pip install agentsim-sdk playwright
playwright install chromiumStripe Account Verification
import agentsim
from playwright.async_api import async_playwright
import asyncio
agentsim.configure(api_key="asm_live_xxx")
async def verify_stripe_account():
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
await page.goto("https://dashboard.stripe.com/register")
# Fill registration fields...
# Phone verification step
async with agentsim.provision(
agent_id="stripe-signup",
country="US"
) as num:
print(f"Using: {num.number}") # Real T-Mobile number
await page.fill('[name="phone"]', num.number)
await page.click('button:has-text("Send code")')
# Wait for Stripe's SMS on real SIM
otp = await num.wait_for_otp(timeout=120)
print(f"Stripe code: {otp.otp_code}")
await page.fill('[name="code"]', otp.otp_code)
await page.click('button:has-text("Verify")')
# Number auto-released
print("Stripe account verified!")
await browser.close()
asyncio.run(verify_stripe_account())Synchronous Version
import agentsim
agentsim.configure(api_key="asm_live_xxx")
with agentsim.provision_sync(agent_id="stripe-bot") as num:
print(f"Phone: {num.number}")
# Enter number on Stripe...
otp = num.wait_for_otp_sync(timeout=60)
print(f"Code: {otp.otp_code}")
# Enter code on Stripe...
# Auto-releasedWith MCP (Claude Code / Cursor / Windsurf)
{
"mcpServers": {
"agentsim": {
"url": "https://mcp.agentsim.dev/mcp",
"headers": {
"Authorization": "Bearer asm_live_xxx"
}
}
}
}Your AI coding agent calls provision_number → enters it on Stripe → calls wait_for_otp → enters the code. No SDK needed.
Carrier Lookup Comparison
// AgentSIM number — passes Stripe:
{
"number": "+14155552671",
"carrier": "T-Mobile USA",
"line_type": "mobile",
"hlr_status": "active"
}
// Twilio number — blocked by Stripe:
{
"number": "+19876543210",
"carrier": "Twilio Inc",
"line_type": "voip",
"hlr_status": "unreachable"
}Success Rates
| Provider | Stripe Success Rate | Cost |
|---|---|---|
| Twilio | 0% | $1.15/number |
| Google Voice | 0% | Free (ToS risk) |
| AgentSIM | 100% | $0.99/session |
Get Started
- Try it: agentsim.dev — 10 free sessions/month
- Docs: docs.agentsim.dev
- GitHub: github.com/agentsimdev
- PyPI:
pip install agentsim-sdk