#itsqwerty
1 messages ยท Page 1 of 1 (latest)
Yes:
https://stripe.com/docs/api/subscriptions/create#create_subscription-metadata
Are you facing any particular issue ?
the metdata doesnt show up here
it does show up in one of the 3 metadata's in the event data
but not there - any reason?
Could you please share the Subscription Id ?
sub_1NUdTtBTA47Sy6lMPQdBJWIh
Wasnt sure if thats what you were looking for ๐
appreciate the help!
thanks for sharing, checking...
For that subscription I'm seeing instagramUsername: "tobjizzle" as a metadata
which was sent via this request req_POPEdMsv6WDf9d
this event body is for Invoice and not Subscription. The metadata you are creating is at Subscripton level, and not Invoices.
is there a good practice where I should be storing data such as this?
In this case if a user is purchasing account magenment subscription - im assuming its better to store it on a subscription level
Can this be modified in the future by stripe api?
Hi! I'm taking over this thread.
You can store metadata on all Stripe objects: Customer, Subscription, Invoice, etc. This is completely up to you.
And you can update the metadata at any point if needed.
if we want the history of the metadata and once changed - i assume its better to store it on the invoice itself instead of the susbcription?
Yes agreed.
If I set the metadata on the invoice - will it automatically keep the metadata on the future invoices or will I need to manually add it to each invoice?
You will need to set it on each invoice, for example by listening to the invoice.created webhook event.
I was curious how would I go about making it so users can upgrade/downgrade their subscriptions?