Do you store lots of Stripe customer/billing data in your database or do you call it dynamically from Stripe?
Just wondering if it's best to store locally, in my own database, all of the customer's Stripe data or is it better to call for this every time I want to display it?
There's a lot of data and it feels funky to store it all locally and try to keep it all in sync. But on the other hand, calling the Stripe API all the time feels wrong too.
I'm thinking about card brand, card last 4 digits, trial end date, coupon applied, coupon end date, next billing date, etc.
There's a lot of data and it feels funky to store it all locally and try to keep it all in sync. But on the other hand, calling the Stripe API all the time feels wrong too.
I'm thinking about card brand, card last 4 digits, trial end date, coupon applied, coupon end date, next billing date, etc.
I personally store a local copy of all the information I care about. You can pretty easily sync this information and it's going to make your app a lot quicker not having to hit the API for every page view that needs that information. Stripe doesn't change their data structures very often so you should be fine syncing it. You can also use webhooks to keep it up-to-date.