#cerebro_code

1 messages ¡ Page 1 of 1 (latest)

fathom jettyBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433439235733717113

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

brisk knot
#

hi there, taking a look at this now

opal carbon
#

for each result I still need to make sub calls again to the API to fetch more info... seems like an impossible task for something that should be so trivial

#

I already hate Stripe's API... but you guys rock! Thanks!

brisk knot
#

you could then keep track of which were associated with particular customers on your backend. would save you some API calls

opal carbon
#

the documentation says that completed is not the same as paid

#

I quote: "complete The checkout session is complete. Payment processing may still be in progress"

brisk knot
opal carbon
#

the problem with webhooks is that I need to store all this information in my DB

#

since it's not only once that I need to fetch this information

#

this is everytime the user logs-in

brisk knot
#

gotcha. let me think a bit about an alternative that doesn't involve storing...

opal carbon
#

yes but sometimes not sure why... invoices are not generated

brisk knot
#

that's interesting, do you have an example Subscription that didn't generate an Invoice?

opal carbon
#

ok so that's the issue, users can buy other things than subscriptions

#

one-off payments

#

before I had guest users too... now I'm making sure the session is always linked to an already existing customer (in Stripe)

brisk knot
#

hmm ok, then Payment Intent would be common denominator among those... I don't think there's any one-stop shop API endpoint that will meet your needs. if this is something that is dynamically kicked off by your customers, I think it'll be most efficient to track webhook events and store this on your backend, using customer as the key

opal carbon
#

ok thanks!

#

one last question, in the redirection url, is there a way to tell Stripe to add the connected account ID and the session ID? apparently, I need these values to retrieve information about the session

brisk knot
opal carbon
#

doesn't seem to work

#

double quotes around seems to fix it "{}"

brisk knot
#

... interesting. so just removing {CHECKOUT_SESSION_ID} made that error go away?

opal carbon
#

....session_id={CHECKOUT_SESSION_ID} doesn't work
....session_id="{CHECKOUT_SESSION_ID}" works

#

back to the initial problem of this thread, do you know what happens if a webhook request fails (suppose our server was down)? is is retried later?
because if Stripe doesn't retry... then I still need to figure out all these API calls to get the information I need

brisk knot