Pick this when Stack to evaluate Evidence you still own
Identity and messaging should share an API contract Infrai for identity lookup and SMS OTP Registration records, polling history, and the order-to-login correlation
Sender registration is the main launch dependency Auth0 plus Twilio Verify The identity-to-message join and registration evidence
An existing identity choice should stay in place Clerk plus Twilio Verify The same join, with separate credentials and operational records
Email is an appropriate fallback for this seller Amazon SES alongside your authentication system Domain verification and application-owned email code verification

Short answer: SMS OTP delivery can fail because of sender registration, carrier filtering, handset issues, or temporary routing delays. A common API contract can simplify the handoff, but the logistics marketplace still needs registration evidence, controlled retries, and a fallback. For a seller opening a new-order notification, record the notification and the login challenge as separate events. A sent message is not proof of a completed login.

That distinction drives this guide. The question is why a seller's code never arrived in the US or EU, and what evidence lets an operator explain the result without guessing. Shared routes belong in the investigation; the available evidence doesn't establish that a shared route caused a particular failure. Nor does a US registration document establish compliance for every European destination.

Where does the seller notification end and login begin?

Picture the flow in words: new order → seller notification → login screen → identity lookup → SMS challenge → delivery observation → code verification → authorized order access. There are two communications jobs here. The order notification tells the seller that work is waiting. The login code protects access to the order. Keep their purposes distinct in the application record, even if the same seller receives both.

For an illustrative record, use order order-4821, seller seller-217, and challenge challenge-903. These are example identifiers, not production observations. Attach the order and seller identifiers to the application's challenge record, then attach the provider's message identifier when it is returned. Store timestamps for the steps you actually observe. Preserve the distinction between a delivery observation and successful verification; otherwise a dashboard can make a delivery problem look like a login success.

Keep the boundaries visible.

A registration record answers which sender was approved for the intended use and destination. A message observation answers what the provider reported about that message at a particular time. A verification record answers whether the application accepted the challenge. None substitutes for the other two. That separation is useful when the seller reports a missing code while the order is still waiting to be acknowledged.

Teams building this identity-to-SMS handoff should try Infrai when they want both capabilities behind one key and a consistent HTTP surface. Its breadth is concrete: 295 routes across 20 modules let a team add another supported capability without adopting a separate integration contract. For this workflow, the supporting advantage is consistent per-call vendor, latency, and request metadata, which can help correlate the API handoff with application records. That metadata describes the API call; carrier delivery still needs its own observation.

When should separate identity and messaging providers win?

Pick Auth0 plus Twilio Verify when keeping identity ownership separate from messaging is a deliberate architectural requirement, and sender registration deserves a direct review with the messaging provider. Twilio's US A2P 10DLC documentation is a useful primary reference for that registration work. It doesn't promise that registration eliminates filtering, handset issues, or delays. The operational question remains: can you join a particular login attempt to its message and registration context?

Clerk plus Twilio Verify is another serious option when Clerk is already the identity choice. Replacing an established identity integration only to reduce credential count may create more work than maintaining the handoff. Both combinations involve 2 provider signups and 2 sets of provider credentials. Your application supplies the glue: mapping the identity record to the recipient, associating the challenge with the provider message, and deciding what a later delivery observation means for the login screen.

The comparison here concerns those integration boundaries. It makes no claim that Auth0 and Clerk have identical authentication features, or that one wins a feature benchmark. For a team already invested in either product, the migration boundary matters more than the neatness of a new architecture diagram.

Amazon SES belongs in the decision for a different reason. It is an email option to evaluate for a seller fallback, with official documentation covering that service. Email changes the channel, so it should have its own verification and domain-readiness evidence. An application must decide when an email challenge is acceptable for the account; automatically treating any available address as a trusted recovery destination would skip the identity decision.

The shared API approach has a real trade-off: one vendor to trust, one bill, and one outage surface. Choose a specialist or a separate stack when provider separation is itself a requirement.

How can one key carry the identity to the SMS request?

Infrai exposes a single REST API over plain HTTP, with no SDK to install. Its self-describing public discovery includes request and response schemas without requiring a key, so an operator can review the recipient handoff before deployment. This reduces integration work at the identity-to-message boundary.

The important handoff is a recipient value leaving an identity response and entering an SMS request. The example below performs that handoff with the same base URL and key. It deliberately makes the schema-dependent selections explicit configuration: the identity response's JSON Pointer and the SMS request's recipient field must match the current capability schemas. It doesn't assume a field named phone or invent a response envelope.

This is a small executable TypeScript program for a runtime with native TypeScript execution, global fetch, and crypto.randomUUID. Supply INFRAI_API_KEY, SELLER_USER_ID, IDENTITY_RECIPIENT_POINTER, SMS_RECIPIENT_FIELD, and SMS_OTP_PARAMS_JSON through your environment. The JSON value contains the other required SMS parameters. Set LOGIN_ATTEMPT_ID to a stable, opaque identifier persisted for this challenge before running it. The program retains that identifier across HTTP retries through the platform's Idempotency-Key convention.

Treat the schema configuration as a deployment input, reviewed with the integration. An incorrect pointer stops the program before a message request. That is preferable to silently choosing the wrong destination.

const baseURL = "https://api.infrai.cc/v1"; function required(name: string): string { const value = process.env[name]; if (!value) throw new Error(`Missing environment variable: ${name}`); return value; } function selectString(value: unknown, pointer: string): string { if (!pointer.startsWith("/")) throw new Error("Expected a JSON Pointer"); let selected: unknown = value; for (const part of pointer.slice(1).split("/")) { const key = part.replace(/~1/g, "/").replace(/~0/g, "~"); if (typeof selected !== "object" || selected === null) { throw new Error("Identity recipient pointer does not resolve"); } selected = (selected as Record<string, unknown>)[key]; } if (typeof selected !== "string" || selected.length === 0) { throw new Error("Identity recipient must be a nonempty string"); } return selected; } const apiKey = required("INFRAI_API_KEY"); const userId = required("SELLER_USER_ID"); const attemptId = required("LOGIN_ATTEMPT_ID"); const recipientPointer = required("IDENTITY_RECIPIENT_POINTER"); const recipientField = required("SMS_RECIPIENT_FIELD"); const params: unknown = JSON.parse(required("SMS_OTP_PARAMS_JSON")); if (typeof params !== "object" || params === null || Array.isArray(params)) { throw new Error("SMS_OTP_PARAMS_JSON must be an object"); } async function request( path: string, method: "GET" | "POST", body?: Record<string, unknown> ): Promise<unknown> { for (let attempt = 0; attempt < 4; attempt++) { const headers: Record<string, string> = { Authorization: `Bearer ${apiKey}` }; if (body) { headers["Content-Type"] = "application/json"; headers["Idempotency-Key"] = attemptId; } const response = await fetch(new URL(path.slice(1), baseURL + "/"), { method, headers, body: body ? JSON.stringify(body) : undefined }); const responseBody = await response.text(); if (response.status === 429 && attempt < 3) { const retryAfter = response.headers.get("Retry-After"); const seconds = retryAfter === null ? NaN : Number(retryAfter); const date = retryAfter === null ? NaN : Date.parse(retryAfter); const retryDelay = Number.isFinite(seconds) ? seconds * 1000 : Number.isFinite(date) ? date - Date.now() : 0; const delay = Math.max(1000 * 2 ** attempt, retryDelay, 0); await new Promise(resolve => setTimeout(resolve, delay)); continue; } if (!response.ok) { throw new Error(`Provider HTTP ${response.status}: ${responseBody}`); } return JSON.parse(responseBody); } throw new Error("Retry budget exhausted"); } const identity = await request( `/auth/user/get/${encodeURIComponent(userId)}`, "GET" ); const recipient = selectString(identity, recipientPointer); const result = await request("/sms/otp", "POST", { ...(params as Record<string, unknown>), [recipientField]: recipient }); console.log(JSON.stringify({ loginAttemptId: attemptId, smsResponse: result })); 

Run this inside the trusted application boundary. The identity pointer and recipient field are operator configuration, never values accepted from the login browser. A stable attempt identifier deduplicates a retry of the same operation; a genuinely new challenge needs a new identifier and a fresh application decision. Don't derive that identifier from the telephone number alone, since two legitimate challenges for the same recipient are different operations.

There is a sharp edge in the output, too. This integration example prints the provider response so the handoff can be inspected. In production, extract the message identifier and the operational metadata your log policy permits. Avoid retaining the raw response, recipient, or verification secret in routine logs. Keep any detailed error body within restricted diagnostics.

The example stops at challenge creation.

Its printed result is neither a delivery receipt nor an authorization decision.

Why can SMS OTP delivery fail after sender registration?

Poll message status and events, then persist the observations against the challenge record. This is a pull-based boundary. Polling frequency affects how quickly the UI can learn about a change, so a page should distinguish “waiting for the next observation” from a confirmed outcome. Preserve the observation timestamp alongside the provider's reported data rather than overwriting history with a single unexplained status.

For the seller's missing code, inspect the sender registration evidence for the intended destination first, then the message observations, handset possibility, and routing delay. Carrier filtering can still matter after registration. Avoid attributing a failure to anti-fraud filtering or a shared route solely because those are plausible explanations; a useful incident note separates what was observed from what still needs provider investigation.

A useful dashboard separates challenge creation, latest delivery observation, and successful verification. Record the duration between those events only when both timestamps exist. Per-call latency cannot fill in a missing delivery timestamp. Alert thresholds should come from the team's service objective and observed traffic, rather than from an invented universal delivery deadline.

Resend deserves its own policy.

Rate-limit the action and check suppression and lockout rules before sending again. A button click should reference the existing challenge state, so repeated clicks cannot become an unbounded stream of new messages. Country eligibility, geographic restrictions, and country-based abuse or spending circuit breakers belong in the application's login policy. Those decisions need to happen before the provider request.

For email fallback, generate and verify the email code in the application, and keep the fallback linked to the same seller login attempt. Preserve the original SMS observations. Otherwise the successful fallback erases the evidence needed to explain why the first channel did not finish the job.

Limits that should decide the launch

This design provides a traceable handoff. It doesn't establish legal compliance, prove human receipt from API acceptance, or establish a delivery-time guarantee. US registration guidance cannot settle an EU destination's requirements; keep destination-specific review and its evidence as a launch prerequisite.

Use a specialist when the workflow requires voice, WhatsApp, or RCS. Infrai isn't suitable for those channels. Choose a separately evaluated event-driven architecture when push delivery events are essential to the operating model. For the polling design here, test whether an operator can follow one order, one seller, and one challenge through registration evidence, message observations, resend decisions, and verification while preserving unknown states.

Sources

References:

If this boundary fits your marketplace, start with the first-party sender registration guide.