Presets
Save a preset
Save a named preset, or replace its rules. Saving filters nothing until the preset is attached.
PUT
The rules are replaced, not merged: send every rule the preset should hold. A replacement keeps every attachment, and purchases already counted toward a cap stay counted, so replacing the rules never resets a rolling window. Saving a preset attaches it to nothing; attach it to a stored card. Takes a platform access token or an API key.
Write the rules one of three ways: as the fields below, as
A merchant Agentcard does not know has no category and no country, so a category or place rule on a
preset with a built-in name (daily, cli_only, weekday_meals, or ai_labs), or as privileges, an array of rules in the same shape a card preset takes.
Categories the merchant must be in, comma-separated:
meals, groceries, travel, software, ai, wellness, retail. Judged on the merchant Agentcard names from checkout_origin and the payment request, never on the merchant text.Comma-separated patterns the merchant’s name or checkout host must match, such as
EXAMPLE SHOP,shop.example.com. The merchant text your agent sends is not matched.Places the merchant must be in, comma-separated: a country (
US, Canada), a US state (California, US-CA), or a region (europe, north-america, apac).The currencies a purchase may be in, comma-separated, by code or common name:
usd,eur or dollars,euros.What the preset does when a purchase breaks any of its rules:
strict refuses it (the default), watch lets it through and tells you.The rules as an array, for a rule the fields do not cover, such as
{"kind": "merchant_allow", "patterns": ["BRAXTER'S DELI"]}.strict preset refuses a purchase there with category_unknown or geo_unknown.
Errors. 400 policy_invalid when the name or the rules cannot be read; the message names the field or the rule. 502 policy_update_failed when the rules could not be saved; nothing changed.