#revxrsal-product-creation

1 messages · Page 1 of 1 (latest)

astral heart
#

All those calls have to be created server-side with your Secret key

vagrant ice
#

Hmm so no better alternative is available?

astral heart
#

I don't fully grasp what the problem is

vagrant ice
#

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

astral heart
#

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

vagrant ice
#

How do you guys usually integrate stripe with stuff like firebase?

#

I think it's a similar process

astral heart
#

Firebase is still a server

#

it runs somewhere and gets a requests and executes

vagrant ice
#

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?

astral heart
#

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

vagrant ice
#

Hmm so basically you can execute scripts in firebase to do that?

astral heart
#

yes

vagrant ice
#

I essentially meant firebase as an example for a pure cloud storage, didn't know that haha

astral heart
#

what's a cloud storage?

vagrant ice
#

Just postgres on the cloud

astral heart
#

ah gotcha

vagrant ice
astral heart
#

AFAIK supabase supports code too

vagrant ice
#

That's what we're using

astral heart
#

I haven't played with their API yet but I'm sure their support team can help

vagrant ice
#

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?

astral heart
#

that depends a lot on wht APIs you use

#

so what APIs do you use to accept payments?

#

PaymentLinks, Checkout, Subcriptions, Invoices or PaymentIntents?

vagrant ice
#

Checkout I think

#

Don't remember using anything else

astral heart
#

All Sessions have the details of all line items and all prices/products involved

vagrant ice
#

Okay thanks

#

Appreciate the quick help!