#SenorKarlos
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Are these services subscription based or just one-off purchases?
both ๐
I offer time based purchases for a higher fee, and subscriptions for savings
Ah okay! I don't think we have a single API endpoint which would return such information. One option would be to build a webhook endpoint and track the purchases in your own database (for new checkouts)
However for old purchases, you'd need to use the APIs to retrieve and backfill the data
Indeed... I guess focusing on the customer object and working early is clouding my creativity ๐
Whether it's one time or subscription, all money moves through the charges API eh?
And if they've tried and failed to purchase (and never came back) they'd only have payment intents?
Brain waking up a lil here on that 'no single api' comment bahaha
Would this logic check out you think?
Call the List all charges API function for each DB record I'm considering purging, if nothing is returned, good to delete? I don't really care about failed intents
Charges API is the older API. PaymentIntents API is the newer one that's mostly used for all payments (it does create a charge underneath though).
You can list all charges by PaymentIntents to see all their successful/failed charges
https://stripe.com/docs/api/charges/list
more specifically if the data [] array is empty but yea
yup, makes sense. You can list all charges by customer too (if you only care about if there's a charge or not)
indeed!
awesome ๐ just needed a brain shake and to type it out ๐ thanks very much!
NP! ๐ Happy to help
Good luck