Skip to content
Toolkit

ADR-0104 — A payment page names the destination, and states no price it does not store

Status: Accepted · Date: 2026-08-30 · Track: 008-card-view, phase 04

Context

A payment_link is the last of the four types phase 03 left on default:'s 302. Unlike the others, its redirect is not broken — payment_links.go requires a location_url on create and refuses one that is not http(s) — so the visitor does arrive somewhere. What they do not get is any say in it.

The census that matters here is what a payment link actually stores. Its editor collects exactly two things: the address, and the checkout URL (PaymentLinksPage's two fields). models.Link has no name or title column. The settings blob carries the gate configuration and nothing else that any write path in this tree puts there. There is no amount, no currency, no description, and no line item anywhere — not in the handler, not in the model, not in the form.

So "the resource's data and the action it sells" (the charter's phase 04 row) has to be read honestly: the data is the destination and the owner, and the action is the hand-off. Inventing the rest would mean a page that displays a price no write path collects, no processor honours and no one can change — the exact shape of "a stored setting with no serving-path reader", run backwards.

The other half is that a payment link is the one type where a bare 302 is a real hazard. A slug on the product's own domain sends a buyer to an arbitrary external host, and the buyer learns which host only once they are already on it, entering card details. Every other type in this track serves the author's own document; this one hands the visitor to somebody else's.

Decision

A payment page states who is asking and where the buyer is about to be sent, and offers the hand-off as an act the buyer takes.

  1. The renderer is ADR-0099's shape, one type over. /l/{slug} hands the visitor to /pay/{slug}; /api/public/payments/{url} serves the payload; both refuse behind closedGateFor (ADR-0098). Nothing new is decided about gating, pixels or view recording — all three are inherited.
  2. The payload names the destination twice: as a host, and as a URL. checkout_host is derived server-side from the stored destination and is what the page shows; checkout_url is what the button goes to. The page never parses the author's URL itself, so what the buyer reads and where the button goes cannot disagree — a page that derived its own host from a string could be made to show one host and navigate to another.
  3. A destination that is not http(s) is not a checkout. The payload then carries neither checkout_url nor checkout_host, and the page offers no action. The create path already refuses such a URL; this is the serving path refusing to trust that it always did, because a row can outlive the validation that wrote it, and javascript: in a link the product renders would be the author's script on the product's page (ADR-0094).
  4. The settings allowlist is empty, and that is a statement. ADR-0083's rule is that a public payload names the keys it serves; for this type that list has no members, because no write path stores a public field. The empty list is written out in the code with its reason, so a later commerce field is added deliberately rather than arriving because a blob was passed through.
  5. The page states no price. Not "0.00", not a currency, not a blank amount row. A payment page that displays an amount it does not hold would be lying to a buyer about money, and a placeholder is the same lie with a smaller font.

Consequences

  • The buyer is told the host before they go, which is the product improvement a document buys over a 302 — and it is the honest one, since it is drawn entirely from what is stored.
  • The page is thin, deliberately so. Whether a payment link should collect an amount, a currency, a title and a description is an owner decision, not a renderer's to invent: it decides what the product sells, how it reconciles against the processor that actually charges, and whether the stored figure is authoritative or decorative. It is raised as a Blocker, and the buildable remainder of phase 04 proceeds around it. Track 011's plan ladder meets the same question from the pricing side.
  • A row whose destination is not http(s) renders a page with no action rather than a broken button. The redirect path's own treatment of such a row is unchanged and outside this slice.
  • Nothing here widens what a payment link can store, per the charter's out-of-scope rule for phase 03 read one phase on: the renderer serves what today's editor already collects.

Source: docs/decisions/0104-a-payment-page-names-the-destination-and-states-no-price-it-does-not-store.md

Library