AttributesAPI
The API for interacting with cart and checkout attributes.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
The custom attributes left by the customer to the merchant, either in their cart or during checkout.
Anchor to checkoutapiCheckoutApi
The API object provided to purchase.checkout
extension targets.
Performs an update on an attribute attached to the cart and checkout. If successful, this mutation results in an update to the value retrieved through the attributes
property.
This method will return an error if the cart instruction is false, or the buyer is using an accelerated checkout method, such as Apple Pay, Google Pay, or Meta Pay.
Anchor to useApplyAttributeChangeuse Apply Attribute Change()
Returns a function to mutate the attributes
property of the checkout.
Anchor to useAttributesuse Attributes()
Returns the proposed attributes
applied to the checkout.
Returns the values for the specified attributes
applied to the checkout.
Anchor to useAttributeValues-parametersParameters
An array of attribute keys.
Attribute values
Anchor to examplesExamples
Anchor to example-applying-changes-to-attributesApplying changes to attributes
You can add or remove cart and checkout attributes by using the API.