Stripe.JS Question. How do i confirm payment worked before workflow goes to next item?

Hey ma dudes, how do i confirm a stripe.js transaction worked in the workflow?

At the moment customer fills in their card details. Hits “Place Order” button then workflow event charge card happens and continues to create an Order. Right now it just charges card and continues to creating an order even if the card details fail. What are your practices and how do you check card before the workflow goes to next event? Need help would appreciate your help so much!

You can look at the result of the charge step and use the “paid” field (yes/no) in a condition to only run when “paid” is “yes”

You can also use the “status” field. Status value can be succeeded, pending, or failed (The Charge object | Stripe API Reference)


Gaby at Coaching No Code Apps (formerly Coaching Bubble)

Courses & Products, Tutorials, Private Coaching, and High-level Development

Start Learning Today :mortar_board:

2 Likes

Thank you @romanmg!!! For some odd reason i have done it exactly identical and selected, Paid is “yes”.
It still creates an “order”. Not sure what to do now at all :(.
It’s still creating “orders” with failed payments. Would love another simple solution like you had in the workflow

Are you testing with a test card currently? Stripe has a few different card numbers that return different results. If you’re using the same one that always returns a “charge successful” result then it’s always going to be paid = yes.

See this for other test card numbers: https://stripe.com/docs/testing#cards

Thanks @romanmg. It’s still happening even with random fake values that i enter in the field. Thoughts?

You tried the numbers that are specifically set to return a fail charge response?

Like this one: 4000000000000002

Yes! :sob:

This topic was automatically closed after 70 days. New replies are no longer allowed.