Skip to main content

Update metadata

The Update metadata request will replace the current metadata.

Please Note

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

Update metadata request

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

"myCustomKey": 1234,
"myComplexObject": {
"firstKey": true,
"CasingIsKept": [1, 2, 3]

Request Properties

Request headers

AuthorizationYesInstructions on how to generate the authorization header value can be found here.

Request Body properties

Each key in the object must be a string but the value can be any valid JSON value. Providing an empty body will remove any existing metadata.

Important error responses

Error codeError ReasonCause
400Validation_ErrorMetadata object could not be parsed as a valid JSON object.
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.