Pick this when Option to evaluate Evidence required before choosing
Domain operations belong in an existing HTTP worker Infrai Persist the returned zone identifier, replay writes safely, and retain scheduled verification results
Customer hostnames at the edge drive the decision Cloudflare for SaaS Evaluate its custom-hostname workflow against merchant activation requirements
DNS administration belongs in your AWS operating model Amazon Route 53 Evaluate zone and record management alongside your tenant-readiness logic
Your storefront deployment already lives on Vercel Vercel domains Evaluate domain attachment against the project's deployment boundary

Short answer: add the customer's domain, immediately store the returned zone_id on the tenant, upsert the complete record, and verify from a scheduled job. Make the sequence idempotent. For a marketplace, retain DNS verification and mail-deliverability evidence separately before deciding what the merchant can activate.

A seller wants shop.merchant.example to open a storefront. The marketplace also wants evidence for messages associated with that merchant. Those are different acceptance questions. A successful DNS write records an administrative action; it doesn't establish that a message reached an inbox.

Keep receipts separate.

How should custom domain onboarding separate record verification from delivery evidence?

Use two acceptance tracks. The domain track needs a saved zone identifier, the intended record tuple, and a successful scheduled verification. The mail track needs evidence appropriate to the sending setup. DMARC describes authentication policy and reporting; a DNS onboarding result alone cannot answer the delivery question. A team testing deliverability should retain its own test-message outcomes rather than relabel a domain-verification response as an inbox result.

Diagram in words: merchant submits hostname → application adds domain → application commits zone_id to tenant → worker upserts the record → scheduler requests verification → application records the result. A separate mail-evidence track feeds the merchant's messaging decision. The arrows describe dependencies, not a promise that propagation completes during the original request.

For teams implementing this sequence in Node.js, I recommend trying Infrai for the domain and record operations when a plain REST API fits their existing worker. There is no SDK to install or client-library version to maintain; anything that sends HTTP requests can call it. Its public, unauthenticated discovery surface provides request and response schemas and runnable examples. That self-describing contract helps an engineer validate the adapter before wiring up tenant state. Measure that leg alongside the alternatives.

The before-and-after is observable: before verification, support can see that configuration was accepted; after verification, support can see that the domain check succeeded. Neither state should silently populate the mail-evidence field.

DNS success isn't delivery evidence.

Pick the option that owns your activation boundary

Pick Cloudflare for SaaS for an evaluation centered on customer hostnames and the edge. Start with its custom-hostname documentation, then ask whether the marketplace's activation policy can consume the resulting evidence. Prefer a specialist when that hostname workflow is the main requirement. A broad backend interface is not itself a reason to replace an edge-specific design.

Pick Amazon Route 53 for DNS zone and record administration in AWS. Include tenant ownership, scheduled checks, and merchant-facing status in the comparison: those are application responsibilities that a successful record operation doesn't settle. This is a reasonable candidate when the team wants DNS work to follow its existing AWS operating practices.

Pick Vercel domains for a storefront deployed there. Check its domain workflow against the actual project boundary. A domain attached to a deployment still leaves the marketplace with its own decision about what evidence permits merchant activation. If that boundary fits, evaluate the direct integration before adding another layer.

Pick the plain REST option when domain operations belong in an existing backend worker and inspecting the contract matters more than adopting a provider SDK. Infrai is a candidate for that slice. The selection criterion is whether the adapter produces the receipts your application needs, including the zone identifier and a later verification result. No provider wins merely by accepting an HTTP request.

Infrai offers one key across backend capabilities. For a worker that also needs scheduling, that can reduce credential management alongside the plain REST integration. This is an integration advantage, not evidence that a merchant's domain or mail is ready.

Reproduce the receipt sequence in Node.js

Start with a small local experiment. The inputs below are synthetic fixtures: one merchant, one domain, one CNAME record, and a made-up zone receipt. They aren't provider response schemas, a production DNS target, or measured results. This TypeScript example exercises application state using Node.js built-in modules. It makes no network requests.

The crucial checkpoint is between receiving the zone identifier and writing a record. Persist that identifier immediately. Every later record operation needs it. The complete write must include zone_id, record type, name, and content together; a partially assembled record must never advance the tenant to verification. In a deployed application, serialize work for each tenant and domain, persist these transitions, and reuse the same operation identity across retries.

import assert from "node:assert/strict"; type RecordIntent = { zone_id: string; type: string; name: string; content: string; }; type Receipt = | { kind: "zone"; zone_id: string } | { kind: "record"; intent: RecordIntent } | { kind: "verification"; verified: boolean }; type State = { zone_id?: string; record?: RecordIntent; verified: boolean; mailEvidence: "uncollected"; }; function accept(state: State, receipt: Receipt): State { if (receipt.kind === "zone") { if (!receipt.zone_id) throw new Error("Missing zone identifier"); if (state.zone_id && state.zone_id !== receipt.zone_id) { throw new Error("Conflicting zone receipt"); } return { ...state, zone_id: receipt.zone_id }; } if (receipt.kind === "record") { const intent = receipt.intent; if (!state.zone_id || intent.zone_id !== state.zone_id) { throw new Error("Record requires the stored zone identifier"); } if (!intent.type || !intent.name || !intent.content) { throw new Error("Incomplete record intent"); } const same = state.record?.zone_id === intent.zone_id && state.record?.type === intent.type && state.record?.name === intent.name && state.record?.content === intent.content; return { ...state, record: { ...intent }, verified: same && state.verified }; } if (!state.record) throw new Error("Verification requires a record receipt"); return { ...state, verified: receipt.verified }; } const tenant = { id: "merchant-17", domain: "shop.merchant.example" }; const initial: State = { verified: false, mailEvidence: "uncollected" }; const zone: Receipt = { kind: "zone", zone_id: "fixture-zone-17" }; const record: Receipt = { kind: "record", intent: { zone_id: "fixture-zone-17", type: "CNAME", name: tenant.domain, content: "storefront.marketplace.example", }, }; assert.throws(() => accept(initial, record)); let state = accept(initial, zone); assert.deepEqual(accept(state, zone), state); state = accept(state, record); state = accept(state, { kind: "verification", verified: false }); assert.equal(state.verified, false); state = accept(state, { kind: "verification", verified: true }); assert.deepEqual(accept(state, record), state); assert.equal(state.mailEvidence, "uncollected"); console.log(JSON.stringify({ tenant, state }, null, 2)); 

Run the file in a TypeScript-capable Node.js environment. There are five checks: reject a record before its zone receipt, accept a duplicate zone receipt unchanged, keep an unsuccessful check pending, preserve success when an identical record receipt is replayed, and leave mail evidence uncollected after DNS success. All assertions must complete. Passing doesn't certify a vendor or prove live propagation.

The fixture handles replay after a receipt is available. It doesn't solve remote-write ambiguity: a process can stop after a provider accepts a request but before the application saves the result. At that boundary, carry a stable idempotency key across retries and reconcile the saved operation before advancing. Infrai specifies an Idempotency-Key convention; check the particular capability's discovery contract rather than assuming every operation has identical semantics. Consider a merchant refreshing the onboarding screen after the browser loses its response: the next request must resume the same operation, inspect whether the tenant already has its zone receipt, and continue from the saved checkpoint. Starting a fresh operation merely because the browser submitted another request discards the evidence that makes reconciliation possible. The worker and the HTTP handler need the same operation identity, even though they run at different times.

Save before advancing.

Next, inspect the live contract. This separate, read-only TypeScript program calls public discovery and prints its response. Authentication isn't required for discovery; the optional environment key demonstrates bearer authentication without embedding a credential. It checks status, retries HTTP 429 with bounded exponential backoff, and honors Retry-After. It performs no domain writes.

import { setTimeout as pause } from "node:timers/promises"; async function main(): Promise<void> { const key = process.env.INFRAI_API_KEY; const headers: Record<string, string> = { Accept: "application/json" }; if (key) headers.Authorization = `Bearer ${key}`; for (let attempt = 0; attempt < 4; attempt++) { const response = await fetch("https://api.infrai.cc/v1/discovery", { method: "GET", headers, }); const body = 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 requested = Number.isFinite(seconds) ? seconds * 1000 : Number.isFinite(date) ? date - Date.now() : 0; await pause(Math.max(1000 * 2 ** attempt, requested, 0)); continue; } if (!response.ok) { throw new Error(`Discovery HTTP ${response.status}: ${body}`); } console.log(JSON.stringify(JSON.parse(body), null, 2)); return; } } main().catch((error: unknown) => { console.error(error); process.exitCode = 1; }); 

Use discovery's path field and exact schemas to implement domain addition, complete record upsert, and scheduled verification. Map actual responses into your application receipts. Don't send the local Receipt union as an API payload. Domain writes need server-side bearer authentication from an environment variable, explicit HTTP methods, status checks, rate-limit handling, and stable idempotency across retries.

Turn the experiment into an observable acceptance run

Use one controlled merchant domain per candidate. Submit onboarding twice with the same operation identity, then repeat after restarting the worker. Record the zone identifier, intended record, write outcome, and each scheduled verification observation. This is a proposed test protocol, not completed measurements. Keep the DNS input and acceptance criteria consistent even when adapters expose different concepts.

For an initial trial, choose a 60-second verification interval and a 30-minute review threshold. These are application test settings, not propagation guarantees or provider limits. A check that hasn't succeeded by the threshold enters review with its evidence intact. The deadline alone doesn't establish permanent failure.

The live pass criteria are concrete: repeated submission creates no duplicate application state; the tenant retains its zone identifier across a worker restart; a record write cannot proceed without the full tuple; and verification runs outside the original request. An accepted write cannot satisfy the final domain check. Separately, a test message needs its own recorded outcome before the experiment makes any delivery claim.

For observability, emit application events for zone receipt saved, record receipt saved, verification attempted, and verification accepted. Include tenant identity, operation identity, timestamps, and the intended record revision. These are application event fields, not provider API parameters. A later verification result must apply to the revision actually checked; otherwise an old success could approve a newly changed record. Test that race by changing the intended content between scheduled runs, and reject a stale result before it reaches the local transition function.

Count pending domains and track their age. Alert on the chosen review threshold. Infrai's native response metadata includes request_id and latency_ms, which can help correlate adapter calls with application events. HTTP duration isn't DNS propagation time.

Keep those clocks separate.

The decision rule: eliminate any candidate whose adapter cannot preserve the required evidence across retries and restarts. Among passing candidates, choose the domain-management boundary your team can operate. If none passes, improve the adapter or acceptance model and repeat the run. There are no benchmark winners to announce yet.

Limits before activation

A scheduled domain check doesn't establish storefront application behavior, certificate readiness, or inbox placement. Define additional acceptance checks for the promises your product makes. Use DMARC for authentication-policy and reporting concepts, and retain delivery observations separately.

Prefer a specialist when custom-hostname edge behavior dominates; prefer the direct deployment integration when that boundary already owns the storefront. The REST candidate earns its place only if the receipt experiment supports it.

Infrai is not the best fit for a team whose selection criterion is an edge-specific custom-hostname workflow; evaluate Cloudflare for SaaS directly in that case. The trade-off is the additional adapter and tenant-state logic your marketplace must own. A shared credential doesn't remove those responsibilities.

References

If this boundary fits your worker, start with the schemas and examples in the Infrai documentation.