#revxrsal-product-creation
1 messages · Page 1 of 1 (latest)
Hmm so no better alternative is available?
I don't fully grasp what the problem is
Basically, in supabase you specify that you want to send a http request to a url when a row is created (i.e. a course in the courses table). Because we have to supply a url, this requires the api to be up and running on a domain, which makes testing a lot harder
I'd love to see if there was a better way to create a product
hum
you can create a product manually in the Dashboard or via our API in general
but if you want the code to run automatically then it has to be server-side
How do you guys usually integrate stripe with stuff like firebase?
I think it's a similar process
You create a course using a website form, that form creates a new entry in firebase, but how would firebase dispatch that call to stripe?
firebase is a server
you can run arbitrary code
it's used by thousands of Stripe developers!
You can install our stripe-node library there and use it
Hmm so basically you can execute scripts in firebase to do that?
yes
I essentially meant firebase as an example for a pure cloud storage, didn't know that haha
https://morioh.com/p/803fe3bd8bce this is a simple doc on how they use Firebase to call our Checkout API for example
what's a cloud storage?
Just postgres on the cloud
ah gotcha
AFAIK supabase supports code too
That's what we're using
I haven't played with their API yet but I'm sure their support team can help
I'm not sure if it does, right now we have it run function hooks (when a row is created, it sends a request to our node api which then creates a product)
Hmm I'll see if they know anything. Thanks for the help!
Any idea for my second question though?
Also, is there a built-in API for getting all customers who purchased a product or do we have to track this by ourselves?
that depends a lot on wht APIs you use
so what APIs do you use to accept payments?
PaymentLinks, Checkout, Subcriptions, Invoices or PaymentIntents?
Okay so we don't have a direct API today for this and you have to use https://stripe.com/docs/api/checkout/sessions/list to basically ingest the data (or track it yourself overall)
All Sessions have the details of all line items and all prices/products involved