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.
Metadata is included in webhook events, making it easy to handle notifications with your custom data:
Copy
// Example webhook handlerapp.post('/webhook', (req, res) => { const event = req.body; if (event.type === 'payment.succeeded') { const orderId = event.data.object.metadata.order_id; // Process order using your internal order ID }});