Skip to main content

Introduction

Metadata allows you to store additional, structured information about your objects in Dodo Payments. You can attach metadata to most Dodo Payments objects, including payments, subscriptions, and more.

Overview

  • Metadata keys can be up to 40 characters long
  • Metadata values can be a string, number, or boolean; strings can be up to 500 characters long
  • Objects, arrays, and null are not accepted as metadata values
  • You can have up to 50 metadata key-value pairs per object
  • Keys should only contain alphanumeric characters, dashes, and underscores
  • Metadata is not searchable using our API but is returned in API responses and webhooks

Use Cases

Metadata is useful for:
  • Storing external IDs or references
  • Adding internal annotations
  • Linking Dodo Payments objects to your system
  • Categorizing transactions
  • Adding custom attributes for reporting

Adding Metadata

You can add metadata when creating or updating objects through the API. For products, you also have the option to add metadata directly from the dashboard UI.

Via API

Via Dashboard UI (Products Only)

For products, you can also add metadata directly from the Dodo Payments dashboard when creating or editing a product. The metadata section allows you to easily add custom key-value pairs without writing code.
Product metadata interface in Dodo Payments dashboard
Using the dashboard UI for product metadata is particularly useful for non-technical team members who need to manage product information and categories.

Retrieving Metadata

Metadata is included in API responses when retrieving objects:

Searching and Filtering

While metadata is not directly searchable via our API, you can:
  1. Store important identifiers in metadata
  2. Retrieve objects using their primary IDs
  3. Filter the results in your application code

Best Practices

Do:

  • Use consistent naming conventions for metadata keys
  • Document your metadata schema internally
  • Keep values short and meaningful
  • Use metadata for static data only
  • Consider using prefixes for different systems (e.g., crm_id, inventory_sku)

Don’t:

  • Store sensitive data in metadata
  • Use metadata for frequently changing values
  • Rely on metadata for critical business logic
  • Store duplicate information that’s available elsewhere in the object
  • Use special characters in metadata keys

Supported Objects

Metadata is supported on the following objects:

Webhooks and Metadata

Metadata is included in webhook events, making it easy to handle notifications with your custom data:
Last modified on July 15, 2026