# Trigger a workflow event from a Purchase in Stripe

**URL:** <https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047>\
**Category:** APIs\
**Created:** [April 1, 2017, 12:20pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047 "2017-04-01T12:20:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spotyourlocal](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/spotyourlocal/32/78749_2.png) [@spotyourlocal](https://forum.bubble.io/u/spotyourlocal)\
**Post date:** [April 1, 2017, 12:20pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/1 "2017-04-01T12:20:36Z")

</div>

I would like to trigger an event after someone successfully purchases an item using Stripe.

Real scenario:

After a BUYER purchases a shoe from a SELLER (via Connect) using Stripe I would like to Create A New Shoe Purchase in Bubble but I need the invoice or purchase ID in Stripe which will trigger the next event.

Any thoughts around this. Happy to send a screen shot or provide the development link to anyone that can help.

---

<div class="post-metadata">

**Author:** ![gf\_wolfer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gf_wolfer/32/262456_2.png) [@gf\_wolfer](https://forum.bubble.io/u/gf_wolfer)\
**Post date:** [April 1, 2017, 3:09pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/2 "2017-04-01T15:09:36Z")

</div>

Is the goal to make sure that the purchase was successful before creating the New Shoe Purchase?

If so, then you can put those actions in the same workflow as the Charge Action, just be sure to put them AFTER the Charge Action, so they will only run if the charge is successful.  
If the user cancels payment or the payment fails, the workflows to Create a Shoe Purchase will not run

You can then reference ‘Result of Step 1’ to save the Charge ID from Stripe in the Shoe Purchase data (recommended if you ever want to allow Refund actions through your system)

* * *

Geoff | Wolfer Tech  
Creator of [The Best Selling Bubble Template](https://001thepremiumlanding.bubbleapps.io/)  
Creator of [The Most Used Bubble Template (FREE)](https://thefreelandingpage.bubbleapps.io/)

---

<div class="post-metadata">

**Author:** ![spotyourlocal](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/spotyourlocal/32/78749_2.png) [@spotyourlocal](https://forum.bubble.io/u/spotyourlocal)\
**Post date:** [April 1, 2017, 6:20pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/3 "2017-04-01T18:20:53Z")

</div>

Thanks for the reply! I’m away from my laptop, if you don’t will send you a screen shot of the workflow I have. I think I’m on the same page with what you mentioned but missing the Charge ID piece.

You’re correct, I do.want to confirm that the purchase was successful.

---

<div class="post-metadata">

**Author:** ![spotyourlocal](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/spotyourlocal/32/78749_2.png) [@spotyourlocal](https://forum.bubble.io/u/spotyourlocal)\
**Post date:** [April 2, 2017, 9:57pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/4 "2017-04-02T21:57:34Z")

</div>

I think I have a full understanding but still not completely clear on capturing the Charge ID from Stripe. Which action should I start with to get the right data?

---

<div class="post-metadata">

**Author:** ![gf\_wolfer](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/gf_wolfer/32/262456_2.png) [@gf\_wolfer](https://forum.bubble.io/u/gf_wolfer)\
**Post date:** [April 3, 2017, 12:19am UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/5 "2017-04-03T00:19:12Z")

</div>

Based on your other post, I am guessing this is because your Data’s Charge id field is set to a type other than text?  
Saving the Charge Id should look like the following.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/09bac6c583487f0b103af63f6dbc0afc5ffdd13d.png)

* * *

Geoff | Wolfer Tech  
Creator of [The Best Selling Bubble Template](https://001thepremiumlanding.bubbleapps.io/)  
Creator of [The Most Used Bubble Template (FREE)](https://thefreelandingpage.bubbleapps.io/)

---

<div class="post-metadata">

**Author:** ![spotyourlocal](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/spotyourlocal/32/78749_2.png) [@spotyourlocal](https://forum.bubble.io/u/spotyourlocal)\
**Post date:** [April 3, 2017, 12:43pm UTC](https://forum.bubble.io/t/trigger-a-workflow-event-from-a-purchase-in-stripe/12047/6 "2017-04-03T12:43:54Z")

</div>

Awesome, worked perfectly! Thanks
