#.nosdi
1 messages · Page 1 of 1 (latest)
Yeah you're currently setting metadata on the checkout session object. To set it on the subscription object, you'll need to set it here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and how do I implement that to my existing code?
Yep! Just need to set it once there
So this should work:
'subscription_data' => [ 'metadata' => [ 'dmuportal_company_id' => strval($_ACCOUNT['selected_company']), ], ],