IT Glossary
What is an OTP code (one-time password) and how does it work?
OTP stands for One-Time Password: a short code, usually 6 digits, received by text or email or generated in an app, valid exactly once and only for a few minutes.
- 6
- sections
- 7
- questions answered
An OTP code is the temporary password you enter once to confirm a login or a payment: after use or after expiry — 30 seconds in authenticator apps, usually a few minutes by text message — the system rejects it. That is why an intercepted code is worth little: by the next attempt it is already useless, which removes the weakness of static passwords, reuse and theft. The abbreviation OTP also has other meanings, covered below.
The important differences sit in the delivery channel. SMS is the most widespread and also the most exposed: messages can be hijacked by cloning a SIM card (SIM swapping) or read by malware. Email inherits the security of the mailbox. Authenticator apps generate codes locally on the phone from an algorithm and the current time, with no transmission to intercept. For a company building an application or an online shop, the OTP channel is a product decision: the balance between security, cost per message and customer convenience decides whether the protection is real or merely decorative.
Why it matters for your business
A stolen password stops being enough
A password leaked in somebody else’s breach no longer opens your customers’ accounts — without the code generated at that moment, authentication simply stops.
Firm confirmation of transactions
Binding the code to a concrete operation, with amount and beneficiary shown beside it, guarantees the customer approves exactly the payment they can see — a central requirement of strong authentication in European payments.
Lower support costs
One-time codes for resetting access and confirming sensitive actions reduce support calls about locked accounts and disputes over operations customers insist they never made.
Other meanings of the abbreviation OTP
In IT and banking, OTP means One-Time Password. Outside them, the same letters appear elsewhere. OTP Bank is a Hungarian bank; its Romanian subsidiary merged into Banca Transilvania in March 2025, which is why searches for „OTP Bank Romania” still appear. OTP is also the IATA code of Bucharest Henri Coandă International Airport (Otopeni), which is why people search for „OTP departures” or „OTP arrivals”. In fandom and online chat, OTP stands for „one true pairing”, a favourite couple from a story.
On a login screen or in a text message from your bank, OTP is always the one-time password.
How the code is generated: HOTP and TOTP
The app and the server share a secret set at enrolment, usually by scanning a QR code. Codes are calculated from that secret by two standardised methods.
HOTP (RFC 4226, 2005) derives the code from a counter and requires at least 6 digits. TOTP (RFC 6238, 2011) derives it from the time: the recommended step is 30 seconds, and the server should accept at most one step of network delay.
Delivery is a separate choice from generation: the code can arrive by SMS, email, voice call or a push approval in an app.
Want an estimate for your project?
Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.
OTP, 2FA and strong customer authentication (SCA) for payments
An OTP alone only proves you hold the phone or the mailbox, so it is a single factor. Two-factor authentication (2FA) and strong customer authentication (SCA) combine it with a second element, such as a password or a fingerprint.
For online payments, Regulation (EU) 2018/389, applicable since 14 September 2019, sets concrete rules: the code is accepted only once (art. 4(1)), blocking applies after at most 5 consecutive failed attempts (art. 4(3)(b)), and the code is tied to the amount and the payee, any change invalidating it (art. 5(1)). That is why the 3D Secure screen shows the amount and the merchant next to the code field.
How to implement OTP correctly in an application
Starting rules for a company adding OTP to its own product: generate the 6-digit code with a cryptographic generator; invalidate it on the first successful use, not only on expiry; keep validity short; limit wrong attempts (at most 5 for payments under the regulation above; NIST SP 800-63B-4 allows at most 100 for general authentication); throttle resends, so the form cannot be used to send SMS at your cost.
The SMS names the app and the purpose of the code and contains no links. Offer a fallback method, such as an authenticator app or email. SMS alone is weak: NIST SP 800-63B-4 (final, July 2025) classes verification over the telephone network as „restricted” and asks verifiers to weigh SIM changes and number porting.
Frequently asked questions
OTP by SMS or through an authenticator app — which should I choose?
The authenticator app is safer: the code is generated locally on the phone, never travels across a network and cannot be diverted by cloning a SIM card. SMS remains useful as a fallback and for less technical audiences, since any handset receives it with nothing to install. Many products offer both, with the app recommended by default and SMS positioned as the alternative.
How long is an OTP code valid, and why does it expire so quickly?
It depends on the issuer. TOTP codes in apps change every 30 seconds (RFC 6238), while codes sent by SMS or email usually expire within a few minutes; Viva states 10 minutes. The short window is the protection: an intercepted code becomes useless before an attacker can use it.
Can an OTP system be tricked?
Yes, through social engineering: an attacker phones as „the bank” and asks for the code you just received, and a code handed over willingly works. The rule is absolute: your bank never asks for an OTP by phone. Binding the code to amount and payee reduces the risk but does not replace your attention.
What do I do if I do not receive the OTP code?
Check the phone number registered with the bank or service, your signal or roaming, and any SMS filters. Wait about a minute before asking for a new code, since the old one usually becomes invalid. If it still does not arrive, call the bank on the number printed on the card or on its official site, never one from a message.
What is the OTP code on a card?
There is no OTP printed on a card. The 3 digits on the back are the CVV/CVC, a fixed code. The OTP is different: it arrives by SMS or in the bank's app at the moment of payment and is valid only for that payment.
Is the bank's "unique password" the same as the OTP code?
Not always. At Banca Transilvania, the „parolă unică” is a password you set yourself and reuse to confirm online card payments, entered alongside the code received by SMS. The OTP changes with every operation. Check your own bank's app or help page.
What does OTP SMS mean?
OTP SMS is the one-time code delivered by text message, the most common channel in Romanian banking and shops. It is convenient, but more exposed than an authenticator app because of SIM swapping and malware on the phone.
Let’s talk about your project
Book a free 30-minute call or send us an email. We reply the same working day.
office@northdan.com · +40 750 252 851