#danielky2
1 messages ยท Page 1 of 1 (latest)
Thanks for looking. Here's reference to the price metadata in the API:
https://stripe.com/docs/api/prices/create#create_price-metadata
Seems like it would follow that the price options objects would be IHasMetadata.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We are using Stripe.net 39.115.0.
Hi there ๐ sincere apologies for my delay in getting to your question.
No, metadata typically does not get transferred from one type of object to another type of object (even if those objects are related), it does in some rare cases but it's typically easier to assume it is never transferred.
If you need the metadata to be present on the object when it is created, I believe the best option is to create the Price first, and then pass its ID into your subscription creation request.
It does feel a bit odd tha we let you add metadata when creating the Price, but not when creating an ad-hoc Price using price_data. I'll be sure to capture feedback that this is something you'd like to see change in the future.
I understand, thank you for the pointers. It has been very helpful to come visit discord for the few times we've had stripe questions.