English
Capturing Panamanian SMS verification codes in code, step by step
OTP Route lets you receive Panama (+507) SMS verification codes through the OTP Gateway API, with each code delivered to a signed webhook or returned by polling, and the same orders available in the dashboard. Numbers start from $0.20 per code, each one is held for 20 minutes for a single code, and the money goes back to your wallet when no SMS arrives.
Which endpoints do I call to get a +507 code?
Everything lives under https://otproute.com/api/v1 and authenticates with a Bearer key that starts or_live_. Panama's country id is pa. A typical run for a test case looks like this:
GET /api/v1/prices?country=pa&service=whatsappreturns the live rate for that pairing, so your runner can stop if it exceeds a budget you set.POST /api/v1/activationswith{"service": "whatsapp", "country": "pa"}reserves a number and returns an activation id.- Your test enters the number in the sign-up screen and triggers the SMS.
- The code reaches you through a webhook event or through
GET /api/v1/activations/{id}. POST /api/v1/activations/{id}/cancelends a run early and refunds it.
Use GET /api/v1/balance before a large suite so a drained wallet does not show up as a wave of false failures. The developer overview and the full API reference list request and response details.
Should I rely on webhooks or polling for Panama routes?
Webhooks are the cleaner choice for a Panama OTP API integration. Register an endpoint (up to 5 per account) and subscribe to activation.sms_received, activation.expired and activation.cancelled. Each request carries X-OTPRoute-Signature: t=<unix>,v1=<hex>; rebuild the HMAC-SHA256 of "<t>.<raw body>" with the endpoint secret, compare it in constant time and drop anything with an old timestamp. Key the handler on the activation id so a retried delivery never processes the same code twice.
Polling suits short scripts or networks that cannot accept inbound calls. Space the requests out; the account limit is 300 requests per minute shared across up to 10 keys, and a hot loop on one activation wastes that budget. More patterns are in our article on webhook-based OTP capture.
What should my code know about Panamanian phone numbers?
Panama has no trunk prefix, so the national digits follow +507 unchanged. Mobile numbers are eight digits and begin with 6, whereas landlines are seven digits, which matters if your validator enforces a single length for the whole country.
- Persist numbers in E.164, for example
+5076followed by seven more digits for a mobile. - Accept a hyphen after the fourth digit on input, since that is a common local way of writing mobiles, then strip it before saving.
- Reject a seven-digit entry on SMS-only flows, because it is almost certainly a landline that cannot receive the code.
Spanish is the official language, so verification texts typically arrive in Spanish when the app localises by region or by account language. Check that your own message template, character counts and any code-extraction regex cope with accented characters.
Why do teams test or operate in Panama in the first place?
The canal, the shipping and logistics trade, and a large international services sector make Panama a common base for regional headquarters covering Central America and the Caribbean. Product teams launching a Spanish-language app in the region often start their localisation QA here, and operations teams based elsewhere still need to prove that customers with +507 numbers can finish onboarding.
A Panama verification number from the OTP Gateway lets them do that from any office. When a test does not specifically need Panama, nearby routes such as Costa Rica or Colombia can be a useful comparison for country routing behaviour.
Which services can receive codes on the Panama route?
Today's snapshot lists WhatsApp, Telegram, Google (Gmail & YouTube), Facebook, Instagram, TikTok, X (Twitter), ChatGPT (OpenAI), Claude, Microsoft & Outlook, Amazon, Uber, eBay, Airbnb and Netflix. Altogether the route currently carries more than 1,000 services. Inventory changes during the day, so always read GET /api/v1/services or the dashboard rather than hard-coding a list.
Non-developers get the same coverage in the browser: sign up, add funds, choose a service and Panama, confirm the displayed price, copy the number into the app and wait for the code to appear beside the order.
How do I handle a Panama number that receives nothing?
The 20-minute window is your safety net: you are billed only when a code arrives, and an expired or cancelled activation refunds the full amount automatically. When a number stays quiet:
- Let it run to expiry instead of cancelling and re-ordering within seconds; tight loops look suspicious to the sending service.
- Retry after a pause, or try a different service route.
- Confirm the service accepts virtual numbers; some decline them outright, and the refund exists for that case.
- Log the
activation.expiredevent so flaky runs are visible rather than silent.
These numbers are for testing and running your own legitimate accounts. Stay within every sending service's terms, and remember that OTP Route's Acceptable Use Policy governs each order.
What about long-term Panama lines, billing and sandbox testing?
OTP Route does not sell a self-serve long-term Panama number. Dedicated Numbers are limited to the United States and Canada, from $1.95/month; for a Panamanian line, email [email protected] and the team will say whether local rules allow anything.
Payments go through one prepaid USD wallet with no monthly fee or plan, funded by card or USDT/USDC, with a PDF invoice emailed for each top-up. A development account can be moved to sandbox on request, which returns simulated numbers and codes so the full flow can be tested without touching wallet funds. See pricing for live rates.
Frequently asked questions
Can I automate Panama SMS verification in my CI pipeline?
Yes. Create activations with country pa through the REST API and consume the code from a signed webhook or by polling the activation.
How long are Panamanian mobile numbers?
Mobiles have eight digits starting with 6, written after +507, and there is no trunk prefix to remove.
What does it cost to receive a Panama SMS OTP?
From $0.20 per code; the API's price endpoint returns the exact amount for each service before you order.
Is my wallet charged if the code does not arrive?
No. Without an SMS inside the 20-minute window, or after a cancellation, the amount is refunded automatically.
Will Panama verification messages be in Spanish?
Usually, if the app localises by region or account language, so make sure any parsing logic handles Spanish text.
Can I test my Panama sign-up flow without a local SIM?
Yes. A +507 number from the OTP Gateway covers one code at a time, so your team never needs a Panamanian handset.
Can I buy a permanent +507 number?
Not self-serve. Long-term Dedicated Numbers are a US and Canada product; email [email protected] to ask about Panama.
Service names are trademarks of their respective owners. OTP Route is not affiliated with them. Use numbers lawfully, follow each service's terms and our Acceptable Use Policy.