#amandaj-adhoc-payments

1 messages · Page 1 of 1 (latest)

main obsidian
#

Hi there! Happy to help. Can you detail exactly what you want to do?

round void
#

Thanks! Basically i have a client that wants to accept payments on his website of any value. They manage their inventory outside of stripe and need to allow customers to put in a custom amount and submit payment

main obsidian
#

Gotcha. Are you planning on using Stripe Checkout or Elements?

#

Let me know if you aren't familiar with the differences there

round void
#

Checkout I believe

#

I'm not entirely sure haha

main obsidian
#

With Stripe Checkout you will redirect the customer to our hosted Checkout page

#

Versus with Payment Element you mount the iframe to collect card details directly on the website.

#

So just depends on what you are looking for

#

Stripe Checkout is the easier one to integrate

round void
#

lets go with stripe checkout for now as the client is wanting this done asap

main obsidian
#

Recommend reading through the docs I linked above which will give you a sense of how to integrate Checkout overall

#

The extra piece is just adding your own form to collect amount and dynamically setting the unit_amount on the Checkout Session based on that amount

round void
#

And if the desired amount is going to change from customer to customer? Would i need to create a checkout session for the desired amount anytime I know a customer is going to be paying?

main obsidian
#

Yep that's how Checkout works. You create a Checkout Session every time a customer pays

#

That is how you get the URL to redirect the user to

round void
#

okay. and if I dont want to have to create a checkout session for every customer would the elements be a better route? basically once I set this up for the client i would like to step back but theyre going to have no clue how to do so.

main obsidian
#

You would not actually create the Checkout Sessions manually. Your code does that automatically upon the customer clicking your "checkout" or "pay" button (or whatever you name it).

#

Same would hold true for Elements... you would programmatically create a PaymentIntent in that case.

round void
#

Oh right okay that makes sense! sorry i'm pretty clueless on this stuff.

main obsidian