Charge User After X Hours

Hi there,

I’ve built an app that allows customers to order items from restaurants while dining in. I have an option to close out their order (e.g. pay the bill), but I need to trigger a workflow that charges the open tabs at a certain time (4am or so).

I am completely at a loss on how to do this. I am using the Stripe Plugin from Bubble, by the way.

Best,
Anthony

Hi Anthony,

Welcome to the forums! Without a bit more info about the state of your open orders, it’s a bit difficult to provide a good solution. However this might set you on the right track - in your API workflows tab you can set something up like this:

Set up your charge open tabs (and do whatever else you need to them, including flagging them as closed) with an API workflow that self_triggers every 24 hours. You’ll just need to trigger it once from your actual app then it should self-trigger every day at the specified time.

If you don’t know about API workflows yet, both Bubble and Gaby have tutorials on Youtube, just run a quick search and start digging :slight_smile: Let us know if this helps, or if you need a bit more direction.

@duke.severn Thanks for the reply!

Couple of questions:

  1. What does Endpoint add_url do?
  2. Under the Custom do things to open tabs, how would I charge a list of open tabs. I would like to pull up a list of open tabs (i.e. Do a search for Tabs: Filtered -> Status = Open). The tab has a User associated with it, but I do not know how I can charge a list of Users with open tabs. Any Suggestions?