#nanzepanze-stripe-integration

1 messages ยท Page 1 of 1 (latest)

low thunder
#

Hello ๐Ÿ‘‹

gentle current
#

hi @low thunder

low thunder
#

You should be able to use Stripe Checkout for this

gentle current
#

within the checkout.html there's this to build the html form:

 <form action="/create-checkout-session" method="POST">
        <button type="submit" id="checkout-button">Checkout</button>
      </form>
#

so is it within this <form> element that I'd need to create textfields for the ad details that would be submitted when the visitor clicks on the Checkout button?

low thunder
#

You could yes

gentle current
#

Would you do it differently ๐Ÿ˜œ

low thunder
#

Not really ๐Ÿ™‚
Stripe checkout with prebuilt checkout page is probably the easiest to integrate IMO
(easy is definitely subjective*)

gentle current
#

is the next option to use Stripe Elements? Would that allow the visitor to add their payment details as part of my form and not complete payment on a separate page?

low thunder
#

Yes that is another option you can look into.
It'd require more coding compared to prebuilt page flow

gentle current
#

ok I wish the two stripe examples (checkout and elements) were built out just a touch more to include something like a few text fields or similar and not just show the payment part

fading oasis
#

Yeah that's fair. My recommendation is to do 2 steps: 1/ collect the ad information, save it in your db as pending, 2/ accept a payment via Checkout, post the ad when the payment is successful

gentle current
#

My concern with that would be that you could spam the db and add lots of ads even if there's some rate limiting.

#

From an implementation perspective would it be two separate forms as you'd need a POST for each step, right?