How to pass custom field data in Stripe Metadata

Hi, I am s2member pro user. I hope the title is not that bad. I search internet for my issue but couldn’t find any. Also read but still no good luck. My issue is how to send custom field data in metadata to stripe. I want to send "vat number” and "Fiscal Code” in either stripe charge or stripe customer objects. Thanks

Hi, I have the same question. Is there a solution yet?

Hi urmamb.

You could start by searching for “metadata” in this file: s2member-pro/src/includes/classes/gateways/stripe/

Especially to the functios create_customer_intent, create_customer_setup and create_customer_subscription, if I remember correctly.

You’ll see that part of the array is the $post_vars. Look where those are called from and see how you can incorporate your vars to it. Probably called mostly from: s2member-pro/src/includes/classes/gateways/stripe/

Maybe not ideal, but it’s a start and perhaps makes possible what you’re trying to do.

I hope that helps! :slight_smile: