Problems with stripe checkout

Hello @Teodor, @George,

Thanks for this integration, a fantastic addition to Wappler again!!

Unfortunately, I am getting some errors on the server side integration.
I got a data storage cart already setup and followed the tutorial for server side stripe integration thoroughly. However, there are 2 problems up til now:

  1. I have to enable the output for all the server actions to prevent getting this error:
    Id is missing in session response.

  2. When the output is enabled for all actions, I am getting this error that I donā€™t know a solution for:
    Error:Missing required param: line_items[0][currency].

The first error is thrown by the AC Stripe element, the second one by SC.

The stripe API keys are valid for sure btw.

What am I doing wrong and how can this be solved? Thanks for your help in advance.

Hello Emiel,

Not sure what do you mean by:

But this error is caused because the setvalue step called id does not have the output enabled, and as per our docs:

Make sure to enable the Output option for this step.

Where exactly do you see this error? When? Post some screenshots please.
What actions do you have on the server side?

If the output is only disabled for the createCheckoutSession.id step the error Id is missing in session response occurs on the frontend when clicking the pay button.
I have to enable all outputs to prevent this error.
Hereā€™s my SC:
image

The second error is also shown after clicking the pay button on the checkout page as a notification. It has ā€œError:ā€ as a prefix, thatā€™s why I know itā€™s the SC error being passed on:
image

So how have you set up your product/pricing in Stripe then?

Is that necessary when using server side integration too? I didnā€™t setup any products in Stripe. I donā€™t want to have to add products to Stripe at all actually. I got a shop made in Wappler with a shopping cart and everything and only want Stripe to handle the payment.

I have searched everywhere and have come to the conclusion that products need to be setup in Stripe. This is easy to de, all it needs is a name, price and a unique ID. That way when a payment is made, no one can meddle with the price, e.g. pay a zero amount. Suits me fine. Set up an automatic procedure to enter the already existing products to Stripe. After that, each time a product is added to the site, also add it to Stripe.

No, thatā€™s not required.
I will setup a quick guide on how to do this without setting up the products in Stripe.

5 Likes

I would certainly find this very useful too. Itā€™s probably not feasible for my customers to store products in Stripe. I imagine this situation will be typical:

That would be great Teodor ā€¦ easier to do custom products in a database.

1 Like

Thank you @Teodor this is exactly what I need.

That would be great indeed @Teodor, thanks!

Iā€™m currently using Stripe on a couple of sites, based on @max_gbā€™s excellent tutorial.
What Iā€™m hoping is that Wapplerā€™s features can be used flexibly, to make it easier to customise the way payments are made - in particular, to place a hold on a card (to separate authorisation and capture of payments). I appreciate this is rather specific, but if the principals could be demonstrated, that would be very useful.

Should be doable by changing the capture method on the payment intent creation from automatic to manual which will capture the funds but not charge

https://stripe.com/docs/payments/capture-later

Many thanks @max_gb. I tried including ā€˜Manualā€™ with the input data before, but couldnā€™t get it to work. I havenā€™t tried the new Stripe features yet - but this seems to be exactly what I need.

Thanks @max_gb. Still for me @Teodorā€™s tutorial would be very welcome! :slight_smile:

1 Like

I am getting the same error reproduced here:

I have entered all my products into stripe using the price method with price_id line items and verified that USD was also entered as a line item. I think it is looking for the currency line item along with the price id and quantity. any ideas?

Yes itā€™s different when you donā€™t have products defined in Stripe. The checkout requires a different flow.
We are working on docs explaining this in cases when you donā€™t have the products and prices defined in Stripe.

3 Likes

@Teodor In my case, I do have the products defined. The error: There was an error:

"missing required param: line_items[0][currency] "

indicates that that the currency is not defined. Do you know how to we should enter that parameter or why I am receiving that error?

Well have you defined a price for your product in Stripe? And are you sending this price id to the checkout as explained in the tutorial?

yes, I have done both:


for testing purposes, I also tried adding a line item for currency which made no change. I noticed that someone else had the same error did that issue get resolved by updating the product info? I included my stripe test data for you to see.