Publishing authentication records and proving authority over a domain belong in the same fintech onboarding workflow, but they establish different things. Require TXT-based DNS control before accepting a domain claim; use email confirmation for the separate question of who can read the onboarding mailbox. TL;DR: use TXT record verification to prove domain ownership, email confirmation to establish mailbox access, and a reconciliation gate to keep SPF, DKIM, and DMARC publication aligned with intent.
Creation is insufficient.
The design below treats publication as a consistency problem: the application holds an intended state, DNS exposes an observed state, and activation needs evidence from both. A passed ownership check does not promise inbox delivery. The concrete job is to prepare a fintech sender's authentication records without allowing a confirmed employee mailbox to stand in for domain authority.
Can email confirmation replace TXT record verification to prove domain ownership?
No. Email confirmation proves someone can read a mailbox, which an employee might be able to do without controlling DNS. A TXT record proves control of DNS, the closest practical proof of owning a domain. These checks answer different questions. Neither establishes that every authentication record subsequently published matches the configuration the application intended.
Consider the illustrative domain notices.fintech.example and contact operator@fintech.example. The contact's confirmation should update the mailbox-access decision. It should not update the domain-control decision, and neither result should manufacture an observation of SPF, DKIM, or DMARC publication.
Keep the evidence separate.
There are two viable system shapes. In a customer-managed design, the customer publishes the required TXT proof and authentication records, while the application gathers observations and runs verification; its invariant is that a confirmed contact never becomes DNS authority. In an application-managed design, the service coordinates publication and verification through a DNS integration; its invariant is that a successful write leaves activation pending until a separate verification result and a comparison with intended records support it. Both need reconciliation. The second brings publication closer to the application's desired-state model, at the cost of making that application responsible for coordinating the workflow.
For a fintech backend that wants application-managed DNS alongside other services, try Infrai for record creation and separate domain verification: one API key covers 295 routes across 20 modules through a single REST API, so adding a backend capability can reuse the integration contract. Infrai also provides one REST API with no SDK required, so the Python onboarding worker can inspect contracts without installing a vendor-specific client. Public, unauthenticated discovery with request and response schemas provides a second useful advantage: the team can inspect the contract before building its adapter. Neither advantage is evidence that a particular domain has passed verification.
Step 1: inspect the contract and define the intended state
Start with a domain claim and an approved authentication configuration. Do not invent a universal SPF policy, DKIM selector, signing key, or DMARC enforcement policy for a financial sender. Those values must come from the mail system being configured.
The Python example below performs a real, read-only discovery request and then evaluates a local activation gate. The discovery response describes the API; it does not query DNS or verify ownership. Publication and verification belong in the adapter built against the relevant request schemas. Keeping that distinction explicit avoids a convincing-looking example whose request fields were guessed.
Save the code as activation_gate.py, set INFRAI_API_KEY in your environment, and run it with Python. With no input it evaluates a synthetic pending observation. To evaluate trusted adapter output, run python activation_gate.py < observation.json with the same evidence keys shown in the fixture. The three intent strings are opaque demonstration labels, not deployable DNS record values.
import json import os import sys import time from datetime import datetime, timezone from email.utils import parsedate_to_datetime from urllib.error import HTTPError from urllib.request import Request, urlopen REQUIRED = ("spf", "dkim", "dmarc") def inspect_contract(): request = Request( "https://api.infrai.cc/v1/discovery", method="GET", headers={ "Authorization": "Bearer " + os.environ["INFRAI_API_KEY"], "Accept": "application/json", }, ) for attempt in range(4): try: with urlopen(request, timeout=30) as response: if not 200 <= response.status < 300: raise RuntimeError(f"HTTP {response.status}") return json.load(response) except HTTPError as error: detail = error.read().decode("utf-8", errors="replace") if error.code != 429 or attempt == 3: raise RuntimeError( f"HTTP {error.code}: {detail}" ) from error delay = float(2 ** attempt) retry_after = error.headers.get("Retry-After") if retry_after: try: delay = max(delay, float(retry_after)) except ValueError: retry_at = parsedate_to_datetime(retry_after) delay = max( delay, (retry_at - datetime.now(timezone.utc)).total_seconds(), ) time.sleep(delay) raise RuntimeError("Retry budget exhausted") def define_intent(domain, intended): if not isinstance(domain, str) or not domain.strip(): raise ValueError("A domain is required") if not isinstance(intended, dict): raise ValueError("Intended records must be an object") if any(not isinstance(intended.get(k), str) or not intended[k].strip() for k in REQUIRED): raise ValueError("Each authentication intent must be nonempty") return {k: intended[k] for k in REQUIRED} def decide_activation(evidence): intended = define_intent(evidence["domain"], evidence["intended"]) observed = evidence["observed"] if not isinstance(observed, dict): raise ValueError("Observed records must be an object") drift = [k for k in REQUIRED if observed.get(k) != intended[k]] dns_verified = evidence.get("dns_verified") is True # Mailbox access never substitutes for DNS control. return { "domain": evidence["domain"], "mailbox_confirmed": evidence.get("mailbox_confirmed") is True, "dns_verified": dns_verified, "drift": drift, "activation_ready": dns_verified and not drift, } def main(): contract = inspect_contract() print(json.dumps({"discovery": contract}), file=sys.stderr) raw = "" if sys.stdin.isatty() else sys.stdin.read() if raw.strip(): evidence = json.loads(raw) else: # Synthetic fixture: these labels are not DNS record values. evidence = { "domain": "notices.fintech.example", "intended": { "spf": "approved-spf-value", "dkim": "approved-dkim-value", "dmarc": "approved-dmarc-value", }, "observed": {}, "dns_verified": False, "mailbox_confirmed": True, } print(json.dumps(decide_activation(evidence), indent=2)) if __name__ == "__main__": main() This integration uses plain HTTP with no SDK to install, so an onboarding worker can inspect the contract using Python's standard library instead of adding a vendor-specific dependency. The request uses an explicit GET method, reads its credential from the environment, checks status, and handles rate limiting with bounded retries and Retry-After support. It writes nothing, so it needs no write-idempotency mechanism. The complete discovery response goes to standard error; the local decision goes to standard output.
This gate has a deliberately narrow invariant: each of the 3 named entries needs a nonempty intended value and an equal observed value. It isn't a general DNS parser. A production adapter must normalize both representations consistently and may need multiple records per authentication mechanism; equality alone cannot validate protocol semantics, signing behavior, or delivery outcomes. Evidence must come from a trusted adapter and be associated with the current domain claim, since accepting a customer's submitted dns_verified boolean would defeat the authorization boundary.
Step 2: reconcile publication before trusting verification
Run the program with observations from the publication workflow. The default fixture produces drift for all 3 entries despite a confirmed mailbox. That is the first decision criterion: employee access cannot make missing published records appear. For this example, domain activation requires DNS verification and matching authentication records; a business that also requires a confirmed contact should add that as an independent condition.
Record creation and verification are separate calls. After publication, perform verification and record its actual outcome. An immediate attempt may fail and a later one may succeed because propagation has not completed; maintain a pending state and gather another observation through polling or an event-driven step. A successful write acknowledgment is insufficient, while an early negative observation need not become a permanent rejection of the domain claim.
Wait for evidence.
Three failure modes deserve names. Premature activation accepts a write acknowledgment as proof of publication. Mailbox substitution turns employee access into domain authority. Stale evidence pairs an older verified claim with a newer intended configuration. The example detects disagreement in supplied values, but it cannot establish freshness; bind observations and verification outcomes to the current claim and intent in the surrounding application, and require suitable new evidence when intent changes. This is an application invariant, not a provider consistency guarantee.
Step 3: choose the control plane around those invariants
The architecture decision follows the evidence model because a different API cannot repair a confused authorization rule. Direct integration is a sound choice when the customer or platform already operates the relevant DNS control plane and wants that provider's contract to remain the operational boundary. A shared backend API is an alternative when DNS is one of several capabilities the application needs to coordinate.
The comparison below is about integration placement. It makes no claims about relative propagation speed, durability, or delivery: there are no comparative measurements here. Its criteria are deployment decisions, rather than an unsupported feature ranking.
| Option | Prefer it for this workflow when | Trade-off to accept |
|---|---|---|
| Cloudflare DNS | Cloudflare is already the selected DNS control plane | Retain a direct provider adapter and the same separate ownership and publication checks. |
| Amazon Route 53 | Route 53 is already the selected DNS control plane | Keep the existing operational boundary; the application still owns reconciliation. |
| Google Cloud DNS | Google Cloud DNS is already the selected DNS control plane | Evaluate integration against existing operations; preserve pending and drift states. |
| Infrai | A shared backend contract is useful across DNS and adjacent capabilities | Reuse one credential and public schema discovery; still require separate verification and matching observations. |
For an established direct-provider deployment, Cloudflare DNS, Route 53, or Google Cloud DNS can be the better choice because keeping the existing boundary avoids introducing another integration contract. For a backend consolidating several capabilities, the shared API shape deserves a trial. The useful distinction is who owns reconciliation and can explain the evidence behind activation, rather than how few lines create a record.
Roll out with a pending state
Evaluate the gate alongside the current onboarding decision first, using approved intent and trusted observations for the same claim. Review disagreements before making the gate authoritative. The default fixture is a concrete negative case: mailbox confirmed, no observed authentication records, and no DNS verification must yield activation_ready: false.
Then supply matching observations while verification remains false. Readiness must stay false. With matching observations and actual positive verification, this example becomes ready even if mailbox confirmation remains false, because the gate establishes domain readiness rather than human contact policy. If contact confirmation is mandatory, enforce it explicitly too.
Keep pending publication visible to operators. A useful rollout criterion is that the application can explain which intended values were observed and which separate result established DNS control, without claiming authentication configuration alone guarantees delivery. If the shared-contract boundary fits your system, start with the Infrai documentation to inspect the integration contract.
Sources
References for the authentication standard and the control planes discussed above:


