Skip to content
← All articles

Twilio Verify alternative: OTP by SMS, no verification fee

6 min readDeutsch

Twilio Verify adds $0.05 per successful verification on top of the SMS. An OTP API that charges only the SMS (€0.089 to Germany), and where Twilio stays ahead.

In short

Twilio Verify charges a $0.05 base fee per successful verification plus channel fees. The TopSMS Verify API generates, sends and checks the code as well, but charges only the SMS itself: €0.089 to Germany and Austria, with no fee per verification or per check. Twilio remains ahead if you need several channels (WhatsApp, voice, e-mail, TOTP) and its built-in SMS pumping protection.

Twilio Verify is popular because it takes care of the whole one-time code flow: generating the code, sending it, checking it and limiting abuse. The price model has two parts, though: a fee for each successful verification and the cost of the message. If you only send codes by SMS, mostly to Germany and Austria, an API that charges the SMS and nothing else can work out noticeably cheaper. This article compares the two honestly.

What Twilio Verify costs

Twilio’s pricing page lists “$0.05 per successful verification plus standard channel fees”. For SMS the channel fee is shown for the US ($0.0083 per SMS); for other countries Twilio links to its SMS price list, which shows $0.112 per segment for Germany. Twilio does not charge the base fee for failed, expired or uncompleted verifications, and states that its SMS pumping protection, Verify Fraud Guard, is included in the base fee. Volume discounts are available through sales.

Put together, a successful SMS verification to Germany costs the $0.05 base fee plus the SMS channel fee. If the channel fee matches the SMS list price, that is about $0.16 per successful login, billed in US dollars.

What the TopSMS Verify API costs

The TopSMS Verify API has no verification fee. POST /api/verify/send costs exactly one SMS, €0.089 to Germany, Austria and the rest of the EU, a final price with no VAT added. POST /api/verify/check is free, however often you call it. There is no monthly fee.

Successful SMS verifications to GermanyTopSMS (SMS only)Twilio Verify base fee alone
1,000 per month€88.89$50, plus channel fees
10,000 per month€888.89$500, plus channel fees

The comparison assumes one SMS per verification. Resent codes cost an extra SMS at both providers.

What the TopSMS Verify API does

  • Code generation: 4 to 8 digits, default 6, from a cryptographic random generator. The code is stored only as an HMAC, never readable.
  • Validity: 60 to 1,800 seconds, default 300 (five minutes).
  • Attempts: 5 per code, counted atomically so parallel requests cannot get around the limit.
  • Abuse limits: at most 5 codes per hour to one number and at least 30 seconds between two codes. A new code cancels the previous one.
  • Text in ten languages: locale de, en, fr, nl, it, es, pt, pl, cs or sk, with your brand in front, for example “MyShop: Ihr Bestätigungscode lautet 482913. Gültig 5 Min. Geben Sie ihn nicht weiter.” The German text stays in one SMS, because ä, ö, ü and ß are part of the GSM-7 alphabet.
  • Retries: Idempotency-Key on /send, so a network retry does not send a second code.

Integration in two calls

const API = 'https://www.topsms.cz/api/verify'
const headers = {
  Authorization: 'Bearer ' + process.env.TOPSMS_KEY,   // CLIENT_ID:SECRET
  'Content-Type': 'application/json',
}

// 1) send the code
const sent = await fetch(API + '/send', {
  method: 'POST', headers,
  body: JSON.stringify({ to: '+4915112345678', brand: 'MyShop', locale: 'de', length: 6, ttl: 300 }),
}).then(r => r.json())
// { ok: true, id: "cmv...", status: "pending", expiresAt: "...", price: 0.089 }

// 2) check what the user typed
const check = await fetch(API + '/check', {
  method: 'POST', headers,
  body: JSON.stringify({ id: sent.id, code: userInput }),
}).then(r => r.json())
// { valid: true, status: "approved" }  or  { valid: false, status: "pending", attemptsLeft: 4 }

The status of a verification is pending, approved, failed (attempts used up), expired or canceled (replaced by a newer code). Instead of the id you can pass to; then the latest verification for that number is checked. Full reference in the documentation.

Moving from Twilio Verify

  1. Create an API key in the TopSMS dashboard, first as a test key.
  2. Replace the call that starts a verification with POST /api/verify/send and save the returned id instead of the Twilio verification SID.
  3. Replace the verification check with POST /api/verify/check. Treat valid: true as success; the response shape differs from Twilio’s, so map the status values.
  4. Run your tests with the test key: the response contains testCode (123456 for six digits), nothing is sent.
  5. Switch to a live key and, if you like, send codes under your own approved sender name.

Where Twilio Verify is ahead

  • Channels: WhatsApp, voice, e-mail, push, TOTP and silent network authentication in the same API. TopSMS Verify sends SMS only.
  • Fraud protection: Fraud Guard against SMS pumping is part of the base fee. TopSMS limits codes per number and time, which helps, but is not a comparable fraud model across traffic patterns.
  • Global reach and SDKs: official libraries for many languages and a large community.

If you need these, the base fee buys something real. If you send SMS codes to European numbers and want to pay per message, the extra fee is avoidable.

Try it

A test key costs nothing. New accounts also get €0.50 free credit after phone verification for the first live codes. Prices for all countries are on the pricing page; the background on secure OTP design is in our OTP implementation guide. Create a free account.

Frequently asked questions

Is a failed verification charged?

With TopSMS you pay for the SMS that was sent, whether or not the user enters the code. Checking the code is free. Twilio does not charge the $0.05 base fee for failed or expired verifications, but channel charges for messages sent can still apply, according to its pricing page.

How long is the code valid and how many attempts are there?

You choose 4 to 8 digits (default 6) and a validity of 60 to 1,800 seconds (default 300). Each code allows 5 attempts; after that the verification is marked failed.

Can I test without sending SMS?

Yes. With a test API key nothing is sent or charged and the code is always the first digits of 12345678, so 123456 for six digits. The response also contains it as testCode.

Do I have to store the code myself?

No. TopSMS generates the code and keeps only an HMAC fingerprint of it. You store the verification id, or simply check by phone number.