Update contract metadata
Updates a contract’s metadata by merging the provided top-level keys with the existing metadata.
Providing a value sets or replaces that key. Providing null removes the key. Keys omitted from the request are left unchanged.
The merge is shallow: if a value is an object, it replaces the existing value for that key rather than merging recursively. Nested null values are stored as part of the object and do not remove nested keys.
Removing a key that does not exist succeeds without changing the metadata. If all keys are removed, the metadata becomes an empty object ({}). To clear metadata entirely and set it back to null, use DELETE on this endpoint.
The resulting metadata may not exceed 16KB when serialized as UTF-8 JSON. The limit applies after the update is merged, not to the request payload by itself. Requests that would exceed the limit return 400. Requests that only remove keys are always allowed.
This endpoint only accesses contracts belonging to the authenticated merchant. Requests for contracts owned by another merchant return 404.
Authentication
Path parameters
Request
Metadata keys to add, update, or remove. Providing a value sets or replaces the corresponding top-level key. Providing null removes the key. Keys omitted from the request are left unchanged. Objects are replaced as a whole rather than merged recursively. The resulting metadata may not exceed 16KB of UTF-8 encoded JSON; the limit is checked against the merged result, not against this payload on its own.
Response
Boolean with true=success, false=failure
Plain-text description of the result

