Add additional metadata to payments
Send additional payments metadata from Adobe Commerce to Stripe.
When you click a payment in your Stripe Dashboard, you might see some metadata already set on the payment, such as the order number in Magento and the module version used to collect the payment. This guide describes how to extend the Stripe module to add additional metadata to each payment.
Create a new module
Create a new module with the following directory structure. Replace Vendor
with your preferred vendor name.
Inside registration.
, register your module with Magento.
Inside etc/module.
, define the module and set up dependencies to make sure it loads after the Stripe module.
Inside etc/di.
, define the following plugin:
Inside Plugin/Payments/ConfigPlugin.
, create an afterMethod interceptor:
Enable the module: