#abaldo1977

1 messages · Page 1 of 1 (latest)

weary ventureBOT
slender panther
#

Good morning! If you are setting the metadata on the SubscriptionData property, it will be set on the subscription itself, so you can see it in customer.subscription.* events or you can retrieve the subscription itself to see the metadata

#

And you can also set the metadata on the Checkout Session itself if you want it in the checkout.session.completed event

pearl briar
#

Thanks for your response. I'm doing it in .net c# using the stripe nuget package. I'm setting the metadata in SubscriptionData property in a SessionCreateOptions object.

#

And trying to retrive it in a c# webhook, asking for CheckoutSessionCompleted event, using stripeEvent.Data.Object. stripeEvent is built using EventUtility.ConstructEvent

slender panther
#

Gotcha, can you try setting this via the Metadata argument at the top level of the SessionCreateOptions

#

SubscriptionData will only set the data on the subscription itself, we don't automatically copy it from the subscription to the checkout session

pearl briar
#

I can't find a Metadata property in SessionCreateOptions class. I'm using this package version: <package id="Stripe.net" version="32.0.0" targetFramework="net45" />

#

Should I update it?

slender panther
#

Good question. Checking in to this

#

I think it should be there if you can set metadata otherwise. I may have gotten the syntax a bit wrong

#

And it can just be the endpoint, you don't have to upgrade the entire account if you want to go this way