stupid but curious question
this is probably a stupid question regarding payments but i wanted to ask how is payment handling properly done (especially for subscriptions)
my current thought process would be this:
have the user schema mention the plan tier
use webhooks to listen for payments and update the user tier accordingly
on the frontend (assuming react), store the user info in some context or store and then accordingly have feature guards
is this the right way to do it? or is there something better? what are some edge cases i should be careful about? what happens when user doesn't pay for the next subscription period, do we still show them their old data? if so, wouldn't the schema be a bit different?
Your upvotes and feedback are welcome!
Words have more power than we think. Be kind.