Stripe Checkout session implementation

Hello everybody !
I am developing a WebApp to rent rooms for students. Basically the students search for a room and when they find one they like, they can book it by paying a fee. This is the payment that I need to process with Stripe :slight_smile:

  • Its a one time payment,
  • The product (room) is not listed in Stripe
  • NO need to implement Stripe Connect to pay a third party (by now).

My API Connector configuration looks like this:

But I keep on receiving the following error message

I have searched in many different forums, I have dive into the infinite Stripe documentation and unfortunately could not solve this issue.

Any hint or suggestion is welcome.

Thanks!

Just use the official stripe plugin, in workflows you can charge the user

1 Like

You have a type mismatch.

1 Like

Dear Siddharth, thanks very much for your reply. I already implemented it, but I found that the user experience is quite poor and I could not customise it (see pic below)

In my business there is too much fraud and is very important for users to feel confident and trust the platform they are paying to.

1 Like

Dear @rico.trevisan Thanks very much for your reply and detailed information. I implemented it but the problem that I encounter is that I don’t have my products listed inside Stripe (my products dynamically are available and changes prices), so all the information for the transaction has to be sent from bubble at the payment moment including the price and quantity.
In this case the error I receive is:
“The price parameter should be the ID of a price object, rather than the literal numerical price”
Is there a way to pass all this info dynamically from Bubble to Stripe at the moment a customer starts the payment process ?

I am quite new at Bubble and is the first time I am dealing with Stripe, so Im sorry if I am missing some basic step here.

Thanks again

You need to reference an actual price object instead of integer. Prices | Stripe API Reference

One way to get it done is to create a price object right before you create a checkout session. You could also check this out: javascript - How can I use Stripe Checkout with dynamic prices? - Stack Overflow

1 Like

Don’t do this, if you want a solid and customizable integration with stripe.

yes

You do not

One way, but not the optimal way as it requires two api calls one after the other

Optimal way is to create the price object in the checkout session api call itself and you do that using the child parameters for the price data which is a child parameter of the line items parameter

https://docs.stripe.com/api/checkout/sessions/create

Here’s how i’ve done it .
You might have to change a couple things for your process

1 Like