Stripe plugin - Payment intent price array field names

Anyone know what field names the prices array is expecting for price and quantity when creating payment intent?

I’ve tried just about every variation I can think of (by referencing the Stripe API docs).

I’m sure I’ve missed an obvious one.

I assume I’ll know I have it correct when the “Test” button re-enables

Thanks!

  1. I believe that the “action incomplete” badge is an error. It seems that WeWeb is not updating when an array is bound to the variable. (@Joyce) … You should be able to click the test button in the top left though to test the whole workflow.

  2. You need to supply an array with quantity and price: [{“quantity”:1,“price”:“price_23452345”},{“quantity”:1,“price”:“price_123123”}]

A tip for debugging something like that … I opened the dev tools in Chrome, filled out the static fields for price and quantity (without binding an array) and looked at the payload in the failed API response under the Network tab in Dev Tools. It shows what WeWeb was sending when the price and quantity values were filled in manually.

Screen Shot 2023-01-16 at 9.39.46 AM

You’re the man @kevinwasie - thanks for the debug tip and taking the time to share.

In a need to move forward, I hacked together a sort of hard-coded workaround by adding manual lines for prices representing my current products then binding to quantity based on what’s in my “cart” object. Of course not a long-term solution.

Will keep an eye out for a fix from weweb on binding the array :+1:

My pleasure. The array binding will work, you just can’t test the step individually. You can test the whole workflow, and the workflow should process correctly in your app.