Repository navigation
docs(charge): a new hosted gateway forwards only after its upstream domain verifies - #25
Merged
Merged
Conversation
…omain verifies The Gateway and onboarding pages said a new gateway endpoint is live as soon as it is saved. The gateway refuses a request with 403 gateway_unavailable until the upstream host's TXT proof (_aifp-verify.<upstream-host>) is valid and recent (gateway-routing.js selectGateway -> dns-state.js gatewayReadiness). Say so, name where the record is shown, note that one proof covers the Site URL when it shares the upstream's host, and call the dashboard page Site settings, as the sidebar does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
charge/gateway.mdx(Configure the Gateway) andcharge/onboarding.mdx(self-serve step 3) said a new hosted gateway endpoint is "live immediately" once saved. It is not: the page was wrong, the code is right.backend/app/aifp/gateway-routing.jsselectGatewayrefuses any gateway that is noteligible, and eligibility needsenabled_intentplusdns-state.jsgatewayReadiness(...).ok, which needs aDNS_VALID, recent proof for the upstream host. The refusal isrefused()→ 403{"error":"gateway_unavailable"}, returned inroutes/gateway.jsbefore any policy or quota step, so there is no 402 challenge. (A site router slug with no matching resource gets 503default_gateway_unavailableinstead.)e3632bd(deployed 2026-10-24 18:26 UTC). Since3e1c69d(#239) it has carried this gating, andgateway-routing.js,dns-state.jsandroutes/gateway.jsare byte-identical betweene3632bdandmain(fb7f6f8).GET https://gateway.aifinpay.io/vapan/(a configured gateway that is not ready) →403 {"error":"gateway_unavailable","detail":"the selected gateway is not available"}. An unknown slug →404 gateway_not_found.main): the page is Site settings (sidebar and page header). The flow is Add gateway → Review changes → Apply changes, and the new-gateway form defaults Enable after verification to ticked. The Domain verification card shows the TXT record (_aifp-verify.<upstream-host>) and Check DNS now, and the account Dashboard lists gateway rows in the DNS connection queue.Change
charge/gateway.mdx: the Configure step uses the Site settings / Add gateway flow. It says the endpoint starts forwarding once the upstream's TXT record verifies, and that until then it answers403 gateway_unavailable. It names where the record is shown and asks the merchant to keep the record in place: the monitor re-checks it, and a stale or missing proof stops forwarding. It notes that when the Site URL has the same host as the upstream, one record verifies both (reconcileSiteProof/reconcileProofsadd thesiteref to the existing proof, same generation).charge/onboarding.mdx: step 3 says the same thing in two sentences and uses the Site settings label.This is based on
mainand does not touch the lines changed by #24 (verify your domain). Agit merge-treeagainstdocs/verify-your-domainis clean.Checks
node scripts/check-internal-links.mjs→OK: 18 configured pages and no missing internal linksgit diff --checkclean@mdx-js/mdx3.1.0Linked surfaces
backend/): not affected. The page now matchesselectGateway/gatewayReadinessonmainand on prode3632bd. No API change.llms.txt,agent.txt,/manifesto.json, marketing app): not affected. None of them claims a hosted gateway goes live on save (greppedmain).main(Sidebar.tsx,pages/Gateway.tsx,GatewayConfigManager.tsx,ConfigImportModal.tsx,SiteDnsQueue.tsx).