[STRIPE] Checkout Metadata doesn't send across

Hi all,

Been playing with the Stripe Checkout plugin (built by Weweb) and finding a fair bit of inconsistencies (other one mentioned here [STRIPE] Checkout Success and Cancel Page Issue).

The metadata key-pairs aren’t being sent to Stripe. Upon successful purchase, I’ve checked the charge object and the metadata fields are empty.

I can’t really gather much of where the problem might be from the console log either

Any ideas if this is just a bug issue with the plugin?

So figured out what the issue is here.

I had a webhook that was triggering based on Stripe Charge events (successful charges I should say) which would happen usually after someone put in their card details and hit Pay in the checkout page.

The metadata that is recorded is against the Stripe Checkout object, and not against the charge.

So one should do a “List all checkout sessions” with a parameter of payment_intent (which the charge event object will send in it’s response). Reference: List all Checkout Sessions | Stripe API Reference

This will allow you to obtain the metadata that you have recorded against that checkout session