Skip to main content

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, reference, metadata.

Please note

Please note that this operation cannot be performed if the purchase is completed.

While the checkout is suspended, the checkout can be updated by calling the Checkout API from your backend as demonstrated in the following code:

Update checkout request​

PUT /checkouts/1eec44b5-66d3-4058-a31f-3444229fb727/ HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json

{
"cart": [
{
"id": "10001",
"description": "A product description",
"unitPrice": 95.0,
"unitWeight": 0.3,
"quantity": 1,
"vat": 25.0,
"requiresElectronicId": true,
"sku": "a unique alphanumeric code for article identification"
},
{
"id": "10002",
"description": "Gift Card",
"type": "GiftCard",
"unitPrice": -100.0,
"quantity": 1,
"vat": 0.0
}
],
"shippingProperties": {
"height": 10,
"width": 20,
"isBulky": true
},
"fees": {
"shipping": {
"id": "shipping001",
"description": "Shipping cost (incl. VAT)",
"unitPrice": 59.0,
"vat": 25.0
}
},
"reference": "ABCDEFGHJIKLMNOP",
"metadata": {
"administrator": "John Doe",
"someOtherData": [1, { "myObj": { "key": 1 } }]
}
}

Request Properties​

Request headers

HeaderRequiredExplanation
AuthorizationYesInstructions on how to generate the authorization header value can be found here.
PropertyRequired
cartYes
shippingPropertiesNo
feesNo
referenceNo
metadataNo
Please Note

The Update checkout PUT request will replace the entire checkout state. Providing null to any optional root property will remove the existing value.

Please note

This endpoint can not be used for updating the reference after a purchase. Use Update order reference once the purchase is completed.

Important error responses​

Error codeError ReasonCause
400Validation_ErrorThe request contains properties with invalid values. Details are provided in the response body.
423Resource_LockedAnother modifying request is currently being executed for the Checkout session. Retry by sending the request again.
900Purchase_Commitment_FoundThe customer has clicked the Complete Purchase button and the Checkout is therefore locked for modifications.
900Purchase_CompletedPurchase is already complete.