Update checkout
The Update checkout request will replace the entire checkout state. If you
update the Checkout while the Checkout is visible, use the
Checkout Client API's to
invoke suspend before your operation and resume
afterward. You can also update the objects individually:
cart, shippingProperties, fees, shipping, reference, metadata
This operation is only available while the purchase is still in progress.
While the checkout is suspended, the checkout can be updated by calling the Checkout API from your backend:
PUT /checkouts/{checkoutId}
See Update checkout for the request schema, property descriptions, examples and error reasons.
Replace semanticsβ
The Update checkout PUT request will replace the checkout state. Providing null to (or omitting) the optional properties shippingProperties, shipping, fees or metadata will remove the existing value.
reference, settlementReference and upsell are the exceptions. Omit them, or send null, and the existing values stay.
Only cart is required for a Checkout session that results in an order. shippingProperties, shipping, fees, reference, settlementReference, upsell and metadata are all optional.
Cartβ
The cart cannot consist entirely of items with negative unitPrice values. At least one item in the cart must have a non-negative unit price.
The item constraints are the same as for the dedicated endpoint. See Update cart for gift cards, strong identification and age limits.
Feesβ
If the Delivery Module is used, the customer selects delivery method inside Walley Checkout and the fees.shipping object is obsolete.
To set the shipping fee, add a shipping object to the fees object of the request. The shipping object can be null to remove the shipping fee for the current Checkout. Keep the combination of id and description unique within the Checkout session, cart articles included. That keeps every line distinct on the invoice and the receipt. Walley trims leading and trailing white-space from both values.
Shipping and shipping propertiesβ
shippingProperties replaces any existing value. It consists of key-value pairs that will set shipping properties. Each key must be a string but the value can be string, boolean or number.
See Extending regular Walley API requests to learn more about how to update checkout when using Ingrid.
References and metadataβ
reference is a reference to the order, such as an order ID. It is not shown to the customer, but it can be correlated with the PurchaseIdentifier that the customer does see.
Set settlementReference if you would like to group your settlement reports based on this value. It requires Settlement Settings to be set up on the Store ID by Merchant Services. See Init Checkout Features for details.
metadata replaces any existing metadata. Each key in the object must be a string but the value can be any valid JSON value.
This endpoint cannot be used to update the reference after a purchase. Use Update order reference once the purchase is completed.
Error responsesβ
The error reasons this endpoint can return are listed per status code in the API Reference. The Error codes page explains the HTTP status codes used across the Checkout API.