Suppressing an invalid recipient protects delivery reliability, but treating a successful text delivery as proof of account ownership creates a different risk. Short answer: SMS OTP alone does not establish EU or US compliance for pharmacy refill alerts. Keep login assurance, health-data handling, and recipient eligibility as separate decisions; GDPR, PSD2, and NIST address different obligations and risks, and none turns a delivery receipt into an authentication guarantee.
Consider a hypothetical production review for a B2B SaaS platform that sends refill reminders on behalf of pharmacies. An email address has become invalid, the account also has a mobile number, and the next reminder is due. Falling back to SMS may appear to rescue delivery. It also raises questions that a mail bounce cannot answer: whether that number is still controlled by the intended person, whether the message may disclose sensitive information, and whether that channel is authorized for this purpose. This is a scenario to test, not an account of an observed incident.
Delivery isn't identity.
The useful incident lesson is an invariant: a change in recipient reachability must never silently increase authentication assurance or broaden permission to send health-related content. That invariant gives the platform team something concrete to enforce during failures, when an optimistic fallback is most tempting.
Why isn't SMS OTP enough for GDPR and PSD2 compliance in pharmacy login?
An SMS one-time password demonstrates access to the receiving channel at the time the challenge is completed, subject to the controls around that challenge. It does not, by itself, resolve SIM-swap risk or phishing. A person can relay a valid code to an attacker, and control of a telephone number can change. NIST's current digital identity guidance treats authentication over the public switched telephone network as restricted and describes risk considerations for its use; SMS is not a phishing-resistant authenticator.
Two factors require two distinct factors.
Repeating a code over another messaging channel does not automatically create a second factor, and a text delivery status is not a completed challenge. A platform should record successful authentication only after its verifier validates the challenge under the relevant policy. Keep provider acceptance and delivery observations in the messaging system.
For a pharmacy platform, the practical distinction is between sending a reminder and releasing account information. A minimal notification can direct a recipient to the established portal without including a medication name or an authentication code in a link. Access to refill details then follows the portal's authentication policy. Minimal content reduces disclosure; it does not remove the need to assess the message itself.
This is also where a reliability dashboard can mislead. A rising delivered-message count says nothing about resistance to credential theft. Authentication assurance deserves its own review.
GDPR, PSD2, and NIST answer different questions
GDPR requires a lawful basis for processing personal data, and health data additionally requires an applicable condition under Article 9. Its requirements for data minimization and security appropriate to risk cannot be satisfied by checking an SMS OTP box. The controller must assess purpose, recipients, retention, and security measures across the workflow, including what a reminder reveals and which processors handle it. Article 32 addresses risk-appropriate security; it does not prescribe SMS as a universal compliance mechanism.
PSD2's strong customer authentication rules concern activities within the payment-services framework. A pharmacy reminder does not become a PSD2 payment transaction just because it contains a phone number. If the service also initiates an in-scope electronic payment, assess that payment flow separately: the strong customer authentication requirements and applicable exemptions belong to that analysis, with dynamic linking relevant to remote electronic payment transactions. An OTP attached to a reminder cannot stand in for that assessment.
NIST guidance supplies an authentication framework, not a general US healthcare compliance certificate. Determine whether a particular US healthcare deployment is subject to HIPAA and which contractual and regulatory responsibilities apply to its participants; a B2B SaaS label alone does not settle that scope. The engineering decision is to document the required assurance and handling controls for each operation, then verify that the implementation meets them.
No single SMS setting answers all three questions.
A claim that an entire EU/US pharmacy workflow is compliant needs evidence about the actual service and its obligations. Message deliverability is only one input.
Make suppression a recipient decision, not an account verdict
The failure worth designing around is a permanent email failure triggering an account-wide action. An invalid mailbox should not disable a valid mobile number, erase a patient's account, or establish that an alternate channel is safe. Scope the suppression record to the recipient and channel, and include the tenant or purpose wherever eligibility policy depends on those boundaries. Authentication state belongs elsewhere.
Email delivery-status notifications provide structured information. RFC 3463 defines enhanced status-code classes: 2 indicates success, 4 a persistent transient failure, and 5 a permanent failure. Those classes still require interpretation. A permanent policy rejection is not the same evidence as a nonexistent mailbox, so blindly suppressing every address associated with a permanent failure can discard reachable recipients. Preserve the diagnostic category, then map it through an explicit policy.
SMS needs its own mapping. Do not copy email status-code semantics into SMS receipts. Preserve the underlying status for investigation, normalize only the states that the integration contract actually supports, and leave ambiguous outcomes unresolved until the platform has a defined action for them. The CTIA material is relevant to messaging practices; it is not evidence that a particular receipt proves ownership.
A bounce is evidence about a delivery attempt.
That distinction matters.
The preventative path below illustrates a narrow decision boundary. It assumes the worker has already authenticated and normalized the delivery event; it deliberately gives neither a generic permanent failure nor a transient failure authority to mark an address invalid. These are internal application types, not a provider API.
package delivery
import "context"
type FailureKind uint8
const (
UnknownFailure FailureKind = iota
TransientFailure
PermanentPolicyFailure
InvalidRecipient
)
type RecipientKey struct {
TenantID string
Channel string
RecipientID string
}
type Event struct {
ID string
Recipient RecipientKey
Failure FailureKind
}
type SuppressionStore interface {
// ApplyInvalid records the event and suppression atomically.
// Reapplying the same event must have no additional effect.
ApplyInvalid(context.Context, string, RecipientKey) error
}
func HandleFailure(ctx context.Context, s SuppressionStore, e Event) error {
if e.Failure != InvalidRecipient {
return nil
}
return s.ApplyInvalid(ctx, e.ID, e.Recipient)
}
The handler's small size is intentional. Its correctness depends on the classifier and the store contract, so tests should exercise the boundaries: a policy rejection leaves invalid-recipient suppression untouched; duplicate delivery of an invalid-recipient event has one effect; and an event for one tenant cannot suppress another tenant's recipient. A storage error must reach the worker's retry or failure path. Acknowledging the event despite that error would lose the protection the code is meant to provide.
Suppressing future sends also requires the dispatcher to consult the suppression state. Define how that check interacts with queued messages and concurrent updates; a worker that copied eligibility into its queue payload hours earlier can otherwise send after suppression. Restoring an address needs an explicit revalidation policy, including treatment of delayed events from earlier attempts.
Buy or build the control, then budget for failure
A platform lead should compare where correctness is enforced and who has to repair it. Outsourcing delivery can reduce transport operations while leaving the application responsible for tenant boundaries, authentication policy, and the meaning of a refill reminder. Owning the entire delivery stack moves more of that operating burden onto the team. Neither choice makes event reconciliation disappear.
| Decision | Managed delivery integration | Self-operated delivery components |
|---|---|---|
| Suppression authority | Check event semantics, scope, and export behavior before relying on remote state. | Own classification, storage, reconciliation, and removal policy. |
| On-call work | Maintain integration health and reconcile local eligibility with remote events. | Operate transport and event processing as well as application eligibility. |
| Exit burden | Keep internal recipient keys and a documented state export plan. | Keep storage and transport interfaces understandable to the next team. |
| Assurance boundary | Verify login challenges in the authentication service. | Verify login challenges in the authentication service. |
Capacity planning belongs here, before the next reminder batch. As an illustrative planning input, 120,000 attempts released over 20 minutes average 100 attempts per second; that is arithmetic, not a throughput benchmark. Receipt bursts, retries, and duplicate events can make the ingestion profile very different from the send profile. Size and load-test those paths independently, with explicit queue limits and retry budgets.
Choose an SLO for event-to-suppression latency separately from reminder delivery latency. Define its denominator and start time: for example, authenticated invalid-recipient events received by the platform, measured from durable receipt to committed suppression. That measures the control the team owns. It does not claim visibility into an event the transport has not yet reported.
Track the age of unprocessed events, failed state writes, sends rejected by eligibility checks, and the volume of unresolved delivery outcomes. Avoid logging message bodies or raw recipient details merely to make a dashboard convenient. Introduce classifier changes in shadow mode, inspect disagreements, and deploy with a rollback path that preserves the event history needed for reconciliation.
Where this advice stops
The main limitation of this design is its narrow authority: an invalid-recipient suppression rule does not decide every reason a message should be blocked. Opt-outs, purpose restrictions, and other applicable messaging requirements need their own eligibility rules. Nor does this design establish an authentication assurance level or authorize health-data processing. SMS OTP is not suitable where phishing resistance is required; use an authenticator that meets that requirement. The trade-off in separating these controls is additional state and reconciliation work, which the platform must fund and operate rather than hide behind a delivery success rate.
For pharmacy refill alerts, the release decision should therefore require three independent answers: the recipient is eligible for this message, the message handles data appropriately, and access to account details meets the required authentication policy. SMS OTP may have a role in a risk-assessed flow. Its presence alone is insufficient.
The operational acceptance test is concrete: inject an invalid-recipient event, confirm that future sends to that recipient are blocked within the chosen SLO, and confirm that login assurance and alternate-channel permissions have not changed. Then test phishing and account recovery against the authentication policy separately. Passing a delivery test cannot compensate for failing that security review.
References
The references below support different boundaries: the digital identity guidance addresses authenticators; the legislation defines legal scope and duties; the email standards describe mail mechanisms and status reporting. SPF authenticates use of a sending domain, so a successful SPF result cannot establish that a receiving mailbox exists or that a phone number belongs to a patient.
Sources
- NIST SP 800-63B-4, Authentication and Authenticator Management: https://pages.nist.gov/800-63-4/sp800-63b.html
- General Data Protection Regulation, especially Articles 5, 6, 9, and 32: https://eur-lex.europa.eu/eli/reg/2016/679/oj
- Payment Services Directive, especially Article 97: https://eur-lex.europa.eu/eli/dir/2015/2366/oj
- Regulatory technical standards for strong customer authentication: https://eur-lex.europa.eu/eli/reg_del/2018/389/oj
- US Department of Health and Human Services, Covered Entities and Business Associates: https://www.hhs.gov/hipaa/for-professionals/covered-entities/index.html
- RFC 3463, Enhanced Mail System Status Codes: https://datatracker.ietf.org/doc/html/rfc3463
- RFC 3464, An Extensible Message Format for Delivery Status Notifications: https://datatracker.ietf.org/doc/html/rfc3464
- RFC 7208, Sender Policy Framework: https://datatracker.ietf.org/doc/html/rfc7208
- CTIA, Messaging Interoperability: https://www.ctia.org/the-wireless-industry/industry-commitments/messaging-interoperability-sms-mms
Top comments (0)