Has anybody integrated Stripe payment gateway WITHOUT plugins? only using API connectors

Great info @banbimmo ! Thanks!

1 Like

Good thread, I am a semi-expert in Stripe thanks to this thread…no kidding, thanks!

but I am having an issue with webhooks failing. I depend on one of them to confirm the default payment method to use for a future subscription. it was working before but now failing 100% of the time, have you had an issue like this? how did you fix it?

Hi @natserrano,

1/ Have you checked you haven’t changed the name of the webhook?
2/ Have you checked you are not using the customer or product stripe id’s or other id’s for testing rather than production?
3/ Have you removed ‘initialise’ from the webhook?

I had to build different workflows for the testing enviornment and for the live environment. Apart from this, I don’t know what else it can be.

Regards

Hi @natserrano,

It’s also worth checking your logs in Bubble to see what’s happening when the webhook is received. There could be something broken in your workflows which is causing the webhook to fail (I had this issue recently).

thanks for the comments, the issue was that I moved from a 2nd dev instance to the 1st dev instance so I had to reinitialize the webhook for the 1st instance.

  • Build the authentification, see Stripe and bubble references about it (and stripe webhooks best practices/security ), way too long to explain.

Been searching all over the forum and Stripe references for how to do this; any chance you can share a link to (some of) the relevant resources for how to build the authentication?

Thanks!

Hi
Here you will find Stripe recommendation :slight_smile:https://stripe.com/docs/webhooks/signatures

https://stripe.com/docs/webhooks/best-practices

Or you can use it without authentication but have to be very careful

Thanks a lot for your feedback. Can you elaborate on the “without authentication but have to be very careful?”

As I understand it, running it without authentication poses the risk that “someone” would send a post request to my end-point triggering the actions that I have defined.

However, one potential solution that @nocodeventure suggested is to make a logic that “Current Customer’s id = Stripes endpoints Customer Id”.

@nocodeventure maybe you could add your 2 cents here?

Yes exactly !
And have to set the right privacy rules to make sure nobody could find it.

Also, you could watch for the request IP (in the Stripe header I think), and Stripe provide all the Ip’s they send request from. I believe it add an other security level.

Stripe recommends a whole process checking signatures though, it should be the most secure way.
Again I am not a tech so Maybe you should ask bubble support when you are all set.

Has anybody gotten a dynamic set of line_items into the body of the JSON when the number of possible items is unknown?

I understand how to put it into the body parameters with a limited number of line_items but I can’t configure the JSON properly for the body portion to allow for an unknown number of line_items.

@adamhholmes @banbimmo @varshneyandson @bartek.dev have any of you set something like this up?

Hi !
Sorry for the late answer…
Didnt do this but there might be a solution.
Could you explain what you are tryin to do exactly ?

No worries. Thanks for reaching out. I ended up not needing.

Thank you! I could not figure out how to write the JS. Was about to give up until I found this.
I also do not use the plugins.

1 Like

Has anyone done this using checkout_session-subscription_data-items?

https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-items

Hi @adamhholmes and @banbimmo ,
Would you mind sharing an example how to set up the Stripe webhook to confirm payments have been gone through? Thanks. :pray:

Hi Adam, I’m finally getting around to implementing this in production and was wondering if the (result) returned can be saved or accessed in any meaningful way and what might be contained in this object. Currently, I’m capturing the payment intent from step 1 and then saving this to the user object and using this to provide an option to the user to request the receipt url, so maybe I don’t need the result object at all, but thought I’d post here to find out what it’s all about.

You don’t need a result object for anything in your database…you just need the object ID and then if you need the details of that object you can run the API call to return the object using the stored ID…don’t forget to use the expand [] parameters in the call to expand all related objects, so you can reduce the number of calls you need to make to get access to all the different details of related objects like the customer, the checkout session etc.

1 Like

thanks for that!
You don’t really need to add custom javascript if I’m not mistaken (for the redirection)
I simply used: Open an external website

2 Likes

I have built the complete playlist to integrate Stripe into Bubble using api-

Hello everybody,
I am running into another weird issue. I am trying to capture the checkout session id (need it later to retrieve payment intent linked to the session that was created and capture funds).
It is however not being saved to a text field in my database. And it should, even in the step-by-step debugger it is being shown as saved. But the field in my database remains empty. Has anyone encountered this problem and solved it?
Thank you!