The bill for a short-lived password-reset message includes delivery attempts, integration work, and the continuing work of retaining and explaining authentication records. For a fintech backend evaluating a login SMS API, the practical choice between direct send and an OTP endpoint depends on who owns verification and its audit trail. A delivery receipt cannot establish that an account holder completed a reset.
TL;DR: Choose the integration boundary by enumerating the verification state your application must own, then retain the minimum evidence needed to reconcile that state. Direct sending leaves challenge verification with the application; an OTP endpoint can reduce that work only to the extent its documented contract covers the required lifecycle. Keep expiry authoritative in the backend. Keep reset secrets out of the audit ledger.
Consider an explicitly hypothetical planning case: 10,000 reset requests, two retained events per request, and a 30-day retention window. That produces 20,000 events for the cohort. If debugging adds a message-body snapshot to each event, there are also 20,000 copies of sensitive message content to govern. These are design assumptions, not traffic measurements or compliance requirements. Removing those snapshots changes the retained payload term to zero without reducing the number of state transitions recorded; the trade-off is losing the ability to replay the exact text during an investigation.
That is the retention decision to make before selecting a messaging interface. The dominant avoidable term in this example is the number of retained body copies, not a claimed monetary expense. Actual financial dominance requires measured payload sizes, attempt counts, retention charges, and engineering effort; no unit price establishes it here.
How should a login SMS API compare direct send with an OTP endpoint?
A public-sector appointment alert and a fintech password reset can share a delivery adapter, but they should have different evidence requirements. For an alert, the application may need to explain which notice it attempted to send. For a reset, the design must also explain which challenge authorized an account change, when that authorization expired, and whether it had already been consumed. Treating both as a generic send operation leaves the security decision implicit.
Delivery is insufficient evidence.
For the reset workflow, define an internal reset identifier and a separate identifier for each delivery attempt. A transport retry belongs to the existing reset request; a deliberate request for a new challenge needs an explicit policy for invalidating or superseding the previous challenge. Otherwise, a queue retry and a user pressing “send again” can accidentally become the same operation, even though they carry different security meanings. The design should be able to reconstruct that distinction without retaining the challenge value.
Direct send is a reasonable boundary when the application already has a verification state machine whose behavior it can test and audit. Under that design, the adapter delivers application-prepared content, while challenge issuance, expiry, attempt limits, and consumption remain application responsibilities.
This is an allocation of work.
For an OTP endpoint, inspect its documented behavior for those same transitions. Ask whether expiration is evaluated during verification, what resending does to an existing challenge, and how concurrent verification requests behave. Treat missing contractual evidence as unresolved integration work. An endpoint name alone does not establish those properties, and a successful verification response still has to be connected safely to the local password change.
An authenticator application belongs in the authentication-policy decision. It is not a transport replacement for a password-reset message, and a reset flow should not silently redefine which factors are required for login. Keep recovery authorization distinct from ordinary appointment notifications and from routine second-factor verification.
| Proposed integration | Work to account for | Evidence needed before adoption |
|---|---|---|
| Direct send | Application-owned challenge lifecycle | Tests for expiry, attempt limits, and atomic consumption |
| OTP endpoint | Contract review and local account-change binding | Documented verification, retry, and expiration behavior |
| Shared notification adapter | Channel dispatch shared across workflows | Separate reset authorization and appointment-notice records |
Expiry turns a retry queue into a security boundary
Suppose the design assigns a reset challenge a five-minute lifetime. This is another illustrative policy choice, not a standards requirement. If a job spends four minutes waiting and then encounters an uncertain transport result, a retry policy that considers only attempt count can continue sending after the useful authorization window has closed. The application should evaluate expiry at verification and should also avoid beginning dispatch when the remaining lifetime is too short for its chosen delivery policy.
Late messages still happen. A dispatch check reduces wasted attempts; it cannot guarantee arrival before expiry.
The following Go example isolates that check. Its 30-second minimum dispatch window is a local policy assumption, not a delivery guarantee. The caller supplies the current time so boundary behavior can be tested deterministically; the actual transport is deliberately outside this example, because this function neither generates a secret nor makes a claim about external acceptance.
package reset import ( "errors" "time" ) var ( ErrInvalidJob = errors.New("invalid reset job") ErrExpired = errors.New("reset challenge expired") ErrTooLate = errors.New("insufficient dispatch window") ) type Job struct { ResetID string AttemptID string ExpiresAt time.Time } func CheckDispatch(job Job, now time.Time, minWindow time.Duration) error { if job.ResetID == "" || job.AttemptID == "" || job.ExpiresAt.IsZero() || minWindow < 0 { return ErrInvalidJob } if !now.Before(job.ExpiresAt) { return ErrExpired } if job.ExpiresAt.Sub(now) < minWindow { return ErrTooLate } return nil } Check again immediately before invoking the adapter. Persist a dispatch intent before making the external call, then record acceptance, rejection, or an unknown outcome under the attempt identifier. If acceptance is uncertain, reconcile it using whatever evidence the transport contract supplies before scheduling another attempt. Local deduplication should not be presented as proof that an external delivery occurred exactly once.
The exactly-once target belongs to the account mutation: design challenge consumption and the authorized password change as one atomic transition, with a conditional update or equivalent transaction rule that rejects repeated consumption. If verification is delegated, document how its result is bound to that local transition and how recovery works when either side times out. This is where a superficially short integration can accumulate substantial work.
Audit evidence should survive deployment and reconciliation
Use the same reset identifier across issuance, dispatch, verification, and consumption records, with attempt identifiers distinguishing transport activity. The audit schema should record the event type, timestamp, outcome, policy version, and a correlation reference whose access and retention are controlled. Avoid copying phone numbers, reset links, or challenge values into every record merely because they are available to the worker. A correlation identifier can still be sensitive when another system can resolve it to a person.
The useful ledger answers a narrow question: did an authorized, unexpired, unconsumed challenge permit this account change? A transport receipt answers a different question. Preserve that distinction in dashboards and incident queries, or a delivery success counter can become a misleading proxy for recovery success. Track expired-before-dispatch decisions, unknown transport outcomes, rejected verification attempts, and successful consumption separately, without making account identifiers metric labels. Testing should follow those state boundaries. Exercise the exact expiry instant, a request one instant before it, duplicate jobs, concurrent consumption, and a transport timeout whose acceptance cannot be determined locally. Verify that repeated consumption cannot repeat the account mutation, and that an expired challenge remains invalid even when a message arrives later. Test logs as outputs too: a successful negative-path test should not leave its reset secret in a retained error record. Deploy the policy and schema together. A queued job created under an earlier expiry policy must carry enough information for a new worker to interpret its deadline consistently; silently giving old jobs a fresh lifetime during rollout changes the authorization window. A useful release check is whether old queued work, new verification code, and the audit reader still agree about the meaning of expiration and consumption.
The deadline survives deployment.
There are also channel-specific limits. RFC 7208 defines SPF mechanisms for evaluating authorization to use a domain in specified email identities; it does not establish who performed an account recovery. MDN describes WebOTP as a browser API for obtaining OTP credentials from specially formatted SMS messages, with availability and security constraints. Neither source makes a delivery channel a compliance certification. Browser assistance, email sender policy, and account authorization require separate evidence.
Choose the boundary, then retire the payload
For integration effort, compare the work required to close the same state machine: issuance, dispatch, expiry, verification, consumption, reconciliation, and deletion. Count the code and operational procedures the team must maintain across those transitions. An OTP interface is useful only insofar as its documented guarantees remove specific work; a direct-send interface fits when those responsibilities already have an explicit home. Neither choice removes the need to reconcile a local account mutation with an external operation.
Retention has a separate approval boundary. A 30-day window is an example, not a conclusion about financial-services obligations. Determine the applicable jurisdiction, contractual requirements, access controls, deletion process, and any legal-hold requirements before assigning production retention. The two technical references below cannot settle those compliance questions.
The deliberate stopping point is message-body retention: once the workflow no longer needs the delivery payload, retire it according to policy and preserve only the justified transition evidence. Also remove expired challenge material from operational stores under the recovery design, while retaining the bounded audit record needed to explain consumption. During an incident, that means investigators can reconstruct state transitions but may be unable to recover the exact message or diagnose a content defect from historical bodies. Accept that loss explicitly. Reconciliation should depend on recorded decisions, not on an archive of usable reset credentials.
References
The sources below support the channel-specific boundaries discussed above. The reset lifecycle, sample quantities, dispatch policy, and retention choices are proposed engineering design decisions rather than requirements attributed to these sources.
Further reading
- RFC 7208, Sender Policy Framework (SPF): https://datatracker.ietf.org/doc/html/rfc7208
- MDN, WebOTP API: https://developer.mozilla.org/en-US/docs/Web/API/WebOTP_API
