Overview
Save sets of checkout questions once and reuse them on your products.
Checkout fields are the questions a customer answers before paying, such as a Discord username or a shirt size. A checkout field template saves a named set of them so you don't have to type the same questions into every product. The dashboard's product editor offers your templates when you add checkout fields.
A product's checkout fields belong to the product, in its
additional_information. Creating, changing, or deleting a template never
changes a product that already uses its fields; update the
product to change what its customers are asked.
All template endpoints need the listing API-key ability and the listing
permission in your team role. A template ID from another store returns 404.
Fields
Every field has a type, a label (the question), and required. The type
decides what else it takes: choice types need options, only some types take a
placeholder, and only date and date-range take date_options. Each field
property in the request schema lists the types it applies to. A template holds
1 to 25 fields, and labels must be unique within it.
Names and concurrency
Template names are 2 to 100 characters and unique in the store, so creating or
copying a template under a name that exists returns 422 on name. That also
makes a retry after a lost response safe: the second attempt is refused instead
of creating a duplicate.
To avoid overwriting someone else's edit, send the updated_at you last read as
expected_updated_at when you update or delete a template. If the template
changed since, the request returns 422 on expected_updated_at and changes
nothing.