#merino_code

1 messages ยท Page 1 of 1 (latest)

cloud zephyrBOT
#

๐Ÿ‘‹ 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/1334608046550417518

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

silk quarryBOT
paper thorn
#

Hi there ๐Ÿ‘‹ can you share the ID of a Checkout Session where you saw this behavior? I'd like to look at what actual URLs you provided us when your variables resolved.

Can you also elaborate on this question a bit:

and Iโ€™m wondering if I should be getting all new input from Stripe via webhooks
If this is regarding order fulfillment, then we strongly recommend using a webhook endpoint. Relying on your customer fully loading the next page could put your fulfillment process at risk if they unexpectedly lose connection and never load that page.

paper thorn
#

Pulling out the ID of the Checkout Session:
cs_test_a1Q5NFWcpAI66ls6obr74kZpo3mIPWAYowOWOBrlYHLkNnudxKOrHMhece

#

Hm, looks like those URLs would work

minor dragon
#

I'm quite sure I'm doing something wrong ๐Ÿคฃ

#

I'm using vue + vue router and nodejs for page indexing

#

I have a
app.get("/success", (req, res) => {
res.sendFile(path.join(__dirname + "/built/index.html"));
});
clause in node js

#

Which I think could be the problem, should I have a success.html file from you guys?

paper thorn
#

Sorry, I'm not sure how to route those requests correctly in Vue.

I'd suggest adding logging to that endpoint to confirm it's getting hit as expected, then work on iterating on how you're responding to those requests.

minor dragon
#

I see, no problem

On any case I was looking up some older codes I have where I used stripe successfully and oddly enough I do the exact same proccess and it used to work lmao

#

I shouldn't need any "success.html" and "cancel.html" files right?

paper thorn
#

I'm not sure, I'm not familiar with the web server stack you're using.

minor dragon
#

Regardless of the stack I'm using, is the correct thing to do is to use webhooks to get the information generated at the end of the checkout?

#

Or should I get a response directly from the API when the process ends?

paper thorn
#

Are you using it to populate a page you're showing to your customer, or are you using it to trigger order fulfillment/other downstream processes?

minor dragon
#

I'm populating a page for my customers but afterwards I'll need this data to start an order fulfillment process

paper thorn
minor dragon
#

When I hit "Pay" should I get any data that my order was fulfilled or the only response is to redirect the customer to success/cancel page?

paper thorn
#

That page is hosted by us, so you don't have any code running on that page to receive data. The redirect to your pages is indication that the checkout session was completed or canceled.

When a Checkout Session is completed, a checkout.session.completed Event is also generated and sent to any webhook endpoints listening for that type of Event.
https://docs.stripe.com/api/events/types#event_types-checkout.session.completed
We discuss this in our guide for automatic order fulfillment with checkout:
https://docs.stripe.com/checkout/fulfillment?payment-ui=stripe-hosted

minor dragon
#

Got it, thank you for your time Toby