#GlAof

1 messages · Page 1 of 1 (latest)

wind steppeBOT
chilly pawn
#

Hi 👋

To do that you would need to set the metadata on the related Invoice and Payment Intent upon creation. Alternatively you could always retrieve the Subscription object that is related to the Invoice or Payment Intent and examine the metadata there.

opaque rapids
#

How do I set the metadata on the invoice and payment intent when using stripe.net's SubscriptionService.Create method?

#

I have successfully set the metadata in the subscription by setting SubscriptionCreateOptions.Metadata

chilly pawn
#

Right, this will be cumbersome because you'd have to wait until they get created and then use the API to update them. Listening to invoice.created for example and responding by copying the metadata from the Subscription to the Invoice. It might actually be fewer API calls to simply retrieve the Subscription when your webhook handler receives an invoice.paid event.