#just-john_docs

1 messages ¡ Page 1 of 1 (latest)

empty belfryBOT
#

👋 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/1285650453387804744

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

desert lance
#

Hello! We don't have a single place that lays out all these options side by side, but aside from the primary "Accept a payment" guide, you can see all the other options in the payments sidebar in the docs here, under "More payment scenarios": https://docs.stripe.com/payments

rapid hound
#

Thanks. That seems a little different from what I'm talking about though. Those appear to be different options for when you need different functionality.

The 4 I listed above all appear to be different ways of accomplishing the same basic task of accepting a payment (that doesn't need to save details/place a hold/etc.)

desert lance
#

Still, might be worth a look.

rapid hound
desert lance
#

Okay, so probably best to provide me with more details about what you want to build, what your first choice is for how to build your integration, and I can give you recommendations from there.

rapid hound
#

It's a rental platform. Want to use React Elements provider, adjust charge based on rental dates selected, and allow customer to pay. React/Node, no SSR currently.

desert lance
#

That's not enough detail to give you a more specific recommendation. All of the options you mentioned will work for that criteria.

rapid hound
#

Right, that's what I thought, but my first question was whether those 4 were all the flow options for accepting a payment in that scenario.

#

I'd like to compare all the options to make a choice.

desert lance
rapid hound
#

Ok cool. So if those are all the options the next question is what are the pros/cons recommended scenarios for each?

#

I can also just describe the situation in more detail if that's easier.

desert lance
#

The pros and cons mostly depend on your specific scenario, business needs, etc. We have the different flows to accomidate different use cases. The deferred flow is broadly applicable, and I've found it to be the most intuitive/least surprising one for most developers to implement, which is why I recommended it.

#

That said, if you do want to share more details, or if you have any specific concerns or questions, I'd be happy to help further.

rapid hound
#

That's definitely helpful. Let me describe a little more and see if you think it still fits our scenario.

#

Currently people will apply to stay and when approved they can visit a page where they can update the stay length (which will change the price) and make a payment.

#

Things are still being adjusted so we may not need that much flexibility in the end (we may require a change in stay lenth to be approved), but we should assume that is needed for now.

#

I can grab that price and feed it to the React Elements

#

From there I'd basically just like the most striaghtfoward method to accept a payment for that amount.

desert lance
rapid hound
#

Okay, thanks. Let me see if I understand this flow correctly. It looks like it is

  1. Set up Elements in React with no secret (steps 1-3 in the guide)
  2. On form submit hit an endpoint on your own server that creates a payment intent (step 4)
  3. On the client, get back a secret from that endpoint and use that to hit stripe.confirmPayment (step 5)
  4. Handle any errors, success from stripe.confirmPayment means payment is complete (step 5)
desert lance
#

Yep, that's basically it.

rapid hound
#

Okay, thank you so much!