Commerce

storefronts, checkout and the answer-engine audit

storefrontv1.0.0

create a storefront

project-write

Create a storefront

storefront_create: Create a storefront host record bound to a project, so a published site has an identity tenant for visitor sign-up and a storefront for payments.Teamanswers inline

FieldTypeRequiredDescription
storefrontIdstringrequiredthe storefront identifier
projectIdstringrequiredthe project to bind the storefront to
namestringoptionalthe storefront display name

Contract The storefront is bound to one project; a project records the storefront it was created under.

Contract The storefront provides an identity tenant for visitor sign-up and a payment surface for unit SKUs.

checkoutv1.0.0

a visitor checks out on one of the site's offers

project-write

Check out

checkout: Open the payment page for one of this site's offers, with the page's intake answers attached, and return its url for the visitor to go to. The price, name and turnaround come from the offer row, never from the page.Teamanswers inline

FieldTypeRequiredDescription
offerIdstringrequiredthe id of the site's offer the visitor buys; an id the site does not sell is refused
intakeobjectoptionalthe visitor's answers to the offer's intake questions, keyed by question key; stored on the sale
returnTostringrequiredthe page the buyer comes back to afterwards, usually location.href; it must be on this site's own address

Contract The offer id is the only thing the page names about the offer: the price is read off the site's offer row at mint, so a price in the input is ignored and a tampered id buys nothing.

Contract returnTo must be on the site's own label or a verified custom domain; any other host is refused.

Contract The answer is {url}: the page navigates there. The payment page is a navigation, never a request the page makes, and no card field is ever on the page.

Contract Intake answers are stored on the sale; oversize intake is refused at mint, never truncated.

auditv1.0.0

a site checked against the answer-engine rules

read

Check a site against the answer-engine rules

audit_site: Check a site already read into the project against every answer-engine rule, citing the page and line each verdict was read from.Teamruns on a thread, stream it

FieldTypeRequiredDescription
domainstringrequiredthe domain to check

Contract Every rule answers pass or fail against the pages the project already holds; nothing is filtered.

Contract It reaches no network: a domain no page has been read for reports that nothing was checked.