Why look up first
The most common reason an agent checkout fails is not a broken selector. It is landing on a store that never accepts a card. One lookup costs a single request and can save an entire run.Look up a page
- SDK
- MCP
- HTTP
recipesForUrl() strips the URL to a safe fingerprint for you. Pass the
absolute URL you navigated to, with its scheme: SdkPage has no url() getter.
A relative or malformed string does not parse, so it is sent as is.Cache-Control: no-store, so a token that
slips through is not kept in a shared cache.
Read the result
A lookup returns four slots. Each is a recipe ornull.
All four are
null when nobody has recorded coverage for the host yet. A missing
field inside a recipe means nobody recorded it, not that it does not apply.
Work through the checkout recipe in this order:
A signup recipe describes a form. It is not permission to create an account.
Opening an account still goes through a signup request the account holder
approves, one at a time or in advance through their
Pre-approved signups list. See Agent signup.
Choose a store
When the user names a product but not a store, let the registry choose.buyableMerchants() returns index entries (key, kind, platform, status).
platform is typed optional because the index omits it on platform recipes. A
merchant entry carries it.
Call recipesForUrl() once you have a product URL to get the full recipe.
Choosing a known store is the single biggest factor in whether a purchase
completes. Fall back to an arbitrary search result only when the registry has
nothing suitable, and expect to report a dead end honestly if you hit one.
Other reads
- Index
- Every recipe body
{ "recipes": [...] } with key, kind, status and
registryVersion per recipe, plus platform on merchant and signup recipes
only. Public, cached for five minutes. See the
HTTP API for the full entry shape.Errors
recipesForUrl() and buyableMerchants() throw without a code. A non-2xx
response reports its HTTP status in the error message, and an unreachable
registry reports that it could not connect.
Branch on which call threw, not on a code. recipesForUrl() accepts
{ signal } so you can bound the request with an AbortSignal.