I've setup a Pipedream workflow that listens to Stripe events using the webhook, and then adds purchasers to a mailerlite group.
I want to sell multiple products, but have users added to a different mailerlite group depending on what product they've purchased.
I thought I could do this by adding the target mailerlite group id to the product metadata, but when I test this, the metadata object comes into pipedream as empty.
How can I identify the product from a stripe charge.succeeded event?
There is no action to retrieve the product from a charge.succeeded, nor is there any data in the charge.succeeded event that can lead you back to the source product.
The metadata in this case isn't the metadata associated with the product, but rather with the charge.succeeded event.
Update June 2022
I've since contributed Stripe actions in Pipedream to do these two calls, so there's no need to code custom API calls.
Pre June 2022
To do what I wanted I had to: