{"templateId":"markdown","versions":[{"version":"v1.0","label":"v1.0","link":"/docs/v1.0/guides/transactions/metadata","default":false,"active":true,"folderId":"a2557b8d"},{"version":"v2.0","label":"v2.0 (latest version)","link":"/docs/guides/transactions/metadata","default":true,"active":false,"folderId":"a2557b8d"}],"sharedDataIds":{"sidebar":"sidebar-docs/@v1.0/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"type":"markdown"},"seo":{"title":"Metadata","description":"An API for end-to-end transaction solution that seamlessly integrates payments, fulfillment, and support into your marketplace.","llmstxt":{"hide":false,"title":"Trustap API","description":"Trustap is an API for end-to-end transaction solution that seamlessly integrates payments, fulfillment, and support into your marketplace. Trustap is an escrow API service facilitating secure transactions.","sections":[{"title":"Intro","description":"Trustap API introduction.","includeFiles":["docs/v2.0/intro/*.md"],"excludeFiles":[]},{"title":"Concepts","description":"Trustap Concepts","includeFiles":["docs/v2.0/concepts/*.md"],"excludeFiles":["docs/v2.0/concepts/errors.md"]},{"title":"Guides","description":"Trustap integration guides","includeFiles":["docs/v2.0/guides/**/*.md"],"excludeFiles":["docs/v2.0/guides/listing/"]},{"title":"API Reference","description":"Trustap API reference guide","includeFiles":["**/apis/@v2.0/openapi.yaml"],"excludeFiles":[]}],"excludeFiles":[]},"meta":[{"name":"robots","content":"noindex"}]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"metadata","__idx":0},"children":["Metadata"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Trustap API transaction supports a metadata field."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Today, metadata is only supported for face-to-face transactions."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The metadata field stores key-value pairs in a JSON format."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You can store up to 100 key-value pairs."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The maximum length of each JSON key is 40 characters and each JSON value is 100 characters."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Only strings are supported."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you exceed your 100 key-value pairs, you will receive an error ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["too_many_metadata_fields"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-metadata-to-an-existing-transaction","__idx":1},"children":["Add metadata to an existing transaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Metadata can only be added to existing transactions. In this example, the transaction ID is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["23860"]},"."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Add metadata","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/23860/metadata' \\\n--header 'Content-Type: application/json' \\\n--user '<API_KEY>:' \\\n--data-raw '{\"customer_url\":\"https://my-bike-parts.com/\",\"part_number\":\"98932\"}'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"{\n    \"customer_url\": \"https://my-bike-parts.com/\",\n    \"part_number\": \"98932\"\n}\n","lang":"JSON"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"read-metadata","__idx":2},"children":["Read metadata"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the transaction ID in your path to retrieve the metadata for that transaction."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Read metadata","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":"curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/23860/metadata' \\\n--user '<API_KEY>:'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"{\n    \"customer_url\": \"https://my-bike-parts.com/\",\n    \"part_number\": \"98932\"\n}\n","lang":"JSON"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-metadata","__idx":3},"children":["Update metadata"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You cannot delete a metadata entry but you can update an existing entry."," ","You can add additional key-value pairs without overwriting existing metadata up to the maximum of 100 key-value pairs."," ","The Trustap API supports updating existing values and adding new key-value pairs in the same call."]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Update metadata","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"CURL","header":{"controls":{"copy":{}}},"source":" curl --location 'https://dev.stage.trustap.com/api/v1/p2p/transactions/23860/metadata' \\\n--header 'Content-Type: application/json' \\\n--user '<API_KEY>:' \\\n--data-raw '{\"part_number\":\"44432\",\"transaction_date\":\"12/09/2025\"}'\n","lang":"CURL"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Response","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"JSON","header":{"controls":{"copy":{}}},"source":"{\n    \"customer_url\": \"https://my-bike-parts.com/\",\n    \"part_number\": \"44432\",\n    \"transaction_date\": \"12/09/2025\"\n}\n\n","lang":"JSON"},"children":[]}]}]}]},"headings":[{"value":"Metadata","id":"metadata","depth":1},{"value":"Add metadata to an existing transaction","id":"add-metadata-to-an-existing-transaction","depth":2},{"value":"Read metadata","id":"read-metadata","depth":2},{"value":"Update metadata","id":"update-metadata","depth":2}],"frontmatter":{"excludeFromSearch":true,"seo":{"meta":[{"name":"robots","content":"noindex"}],"title":"Metadata"}},"lastModified":"2026-04-02T16:14:33.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/v1.0/guides/transactions/metadata","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}