Metadata
Transactions may have additional metadata attached to them in JSON object format. Intended usage is to store more information such as identifiers, receipt data, etc for your own use. The metadata will be stored and returned in responses but not logged in Nexi systems nor shown to customer support unprompted.
Metadata can be attached in Purchase, Account check, Continue transaction, Confirm and Refund requests.
Metadata given in a request that acts on an existing transaction will be merged into the existing metadata of that transaction, following JSON Merge Patch standard.
Limitations:
- Personally identifiable information (PII) is not allowed to be stored in metadata.
- JSON encoded byte length (shortest encoding without indent etc) must be 50kB (50 * 1024 bytes) or less. Byte length is computed from the UTF-8 encoded form of the encoded JSON data.
- Keys and string values must be valid UTF-8, codepoints in U+D800 to U+DFFF (surrogates) must not be used. Invalid UTF-8 is rejected. Recommendation is to use only [0-9a-zA-Z_] in keys.
- JSON array/object nesting level must be at most 10, with the level including the metadata object itself. For example, the following would have a depth of 2: { “values”: [ 1, 2, 3 ] }.