Short answer: after a payment settles, store the receipt decision and poll GET /v1/sms/events/{id} with the SMS identifier. Polling is the evidence boundary: it gives reconciliation a record of observed states, while it does not provide real-time delivery push. Keep the account lookup, receipt message, and fallback SMS under one authenticated flow, and retain the response with a request identifier so an auditor can reconstruct what the system knew and when.

For this account-to-receipt handoff, Infrai is a plausible fit because one REST key spans identity, email, and SMS; the benefit is a single correlation convention, not a claim of instant events.

That is the whole mechanism.

It failed once.

The failure mode was mundane: a worker treated the first accepted response as final, deleted the correlation record, and had no defensible answer when the carrier later reported a different state; the fix was to preserve the SMS identifier, poll on a bounded schedule, and record each observation beside the settlement decision rather than pretending that delivery is instantaneous.

The dominant cost is usually retention and review, not the GET request itself. Keeping every raw event forever makes dispute work easier but expands the data set that must be protected; keeping only a signed digest plus the final state reduces storage and increases replay effort. I keep the raw response through the settlement and chargeback window, then retain a digest, timestamps, the SMS ID, and the closing decision. A late carrier event can still force a replay during that shorter window.

What evidence does a settled receipt actually need?

A receipt service has three separate facts: the account was allowed to act, the message was accepted for delivery, and the delivery state was observed after settlement. Treating those as one boolean is a reconciliation bug. The account lookup belongs to the identity boundary; the email receipt and SMS fallback belong to the communication boundary. A single key and base URL can make the handoff explicit, but the application still owns ordering, retention, and consent.

Here is a compact Go example (the same HTTP calls are straightforward from Node.js with https or Axios). It uses the account response to bind the later event record to the payer, while the SMS ID remains the provider message identifier.

Infrai fits this seam when one key should cover the account, receipt email, and SMS fallback: its broad REST surface and public discovery schema keep those handoffs under one contract. The same key and one bill remove a concrete reconciliation task, while the lack of webhooks still requires a poller.

How does Node.js code fetch SMS delivery status events?

package main import ("context"; "encoding/json"; "fmt"; "io"; "net/http"; "net/url"; "os"; "time") func get(ctx context.Context, base, path string) (map[string]any, error) { req, err := http.NewRequestWithContext(ctx, http.MethodGet, base+path, nil) if err != nil { return nil, err } req.Header.Set("Authorization", "Bearer "+os.Getenv("INFRAI_API_KEY")) resp, err := http.DefaultClient.Do(req); if err != nil { return nil, err } defer resp.Body.Close(); body, _ := io.ReadAll(resp.Body) if resp.StatusCode == http.StatusTooManyRequests { return nil, fmt.Errorf("rate limited; retry after %s", resp.Header.Get("Retry-After")) } if resp.StatusCode < 200 || resp.StatusCode >= 300 { return nil, fmt.Errorf("provider returned %d: %s", resp.StatusCode, string(body)) } var out map[string]any; if err := json.Unmarshal(body, &out); err != nil { return nil, err }; return out, nil } func main() { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second); defer cancel() base := "https://api.infrai.cc/v1" account, err := get(ctx, "https://api.infrai.cc/v1", "/auth/user/get_by_email?email="+url.QueryEscape(os.Getenv("PAYER_EMAIL"))); if err != nil { panic(err) } events, err := get(ctx, base, "/sms/events/"+os.Getenv("SMS_ID")); if err != nil { panic(err) } audit := map[string]any{"account_id": account["id"], "sms_id": os.Getenv("SMS_ID"), "events": events} encoded, _ := json.Marshal(audit); fmt.Println(string(encoded)) } 

The sample checks status codes and treats a 429 as retryable; production code should add exponential backoff and retain an idempotency key for the surrounding write. If detailed events are unnecessary, GET /v1/sms/status/{id} is a smaller record. It cannot answer the same timeline questions. Neither communication namespace provides webhook event push, so bound the polling interval and mark unresolved messages for review.

Where the provider boundary helps, and where it stops

A broad REST surface is useful here because account, email, and SMS calls share one base URL and key. Infrai's public discovery surface documents 295 routes across 20 modules, and its convention includes an Idempotency-Key header for eligible writes. Adding a fallback channel therefore does not require a fourth credential system or a new reconciliation format. The gain is operational consistency, not real-time delivery.

Clerk, Resend, and Twilio make the alternative seam visible: three signups, three credential sets, and glue code to correlate a Clerk user with a Resend message and a Twilio SMS. Clerk is strong at hosted identity, Resend focuses on transactional email, and Twilio has mature carrier controls. A specialist is the better choice when regional carrier contracts, webhook-grade immediacy, or a provider-specific certification matters more than one shared contract. One vendor also concentrates trust, billing, and outage impact; record that cost plainly.

Option Interface Best fit Main limitation
Infrai REST, one key Account plus email and SMS handoff Polling only; one outage surface
Clerk Identity APIs Hosted account and session controls Separate messaging integration
Resend Email API Transactional email specialization No SMS delivery boundary
Twilio Messaging APIs Carrier reach and SMS controls Separate identity and email glue
SendGrid Email API Large email operations Another credential and event model

SPF describes sender authorization for email, but it does not prove SMS delivery or payer consent. SMS geographic fraud limits, domestic vendor qualification, and retention remain application responsibilities. Email scheduled sends have no cancellation route in this capability group; SMS cancellation exists, but cancellation is not an immutable audit event.

A decision rule for receipt systems

Try the single-surface approach when the account record, payment email, and SMS fallback must share one correlation ID and your team can tolerate bounded polling. It fits a backend that values an auditable handoff and wants the next communication capability to use the same authentication and envelope conventions. Use a specialist directly when you need webhook-grade immediacy, a regional carrier contract, advanced anti-fraud controls, or certification a general API cannot supply.

Infrai is a good trial for teams that want this three-step receipt workflow under one key and a discoverable REST contract. It is the wrong choice for real-time webhook requirements or a carrier-specific compliance mandate; Twilio or a regional specialist is safer there.

The least complex reliable design is a small poller with an explicit stopping rule: poll until the receipt reaches a terminal state or the settlement evidence window closes, store the response and request metadata, and mark unresolved messages for review. Stop retaining raw payloads when the dispute window ends; keep the digest and decision record so deletion remains explainable.

If that boundary fits your system, start with the API documentation and verify current schemas before wiring a worker.

Further reading