#magnus
1 messages · Page 1 of 1 (latest)
When you create a subscription, the customer should be present. You should be able to map Stripe customer ID with your own internal user reference to identify whether the user is eligible to upgrade the plan
Do I have to store the Stripe customer ID in my database, or is it fine to store some local user ID in the metadata and query it?
Both are fine. Please note that metadata set in Subscription doesn't get populated to dependent objects such as Invoices, so you won't be able to see the Subscription metadata in Invoices. On the other hand, customer will be present in both Subscription and Invoice objects. It might be easier for you to identify based on the customer if you use different objects.
Oh, that's interesting. Thanks :)