Stripe Ridesharing Demo
Demonstrates the use of Temporal with Stripe's usage-based billing. Want to see it in action? Check out this demonstration from the Stripe Sessions conference (the demo starts at 13:09):
This application demonstrates how Temporal can manage the full lifecycle of pay-per-use rides in a ridesharing scenario.
The user interface (frontend) calls APIs to launch a Temporal Workflow and subsequently signals that Workflow for each 100 feet of distance traveled. The Workflow maintains information about the ride, such as the start time, identity of both rider and scooter, its ongoing cost, and current status. The frontend also uses an API to query the Workflow to determine the current status, using data received in response to update the UI. The Workflow calls Activities that interact with Stripe, including looking up the Stripe customer ID based on the rider's email address and later calling Stripe's usage-based billing as the ride progresses.
Because it uses Temporal, the application is able to overcome a variety of failure scenarios, such as a network failure that prevents it from reaching Stripe's API.
The Temporal Web UI shows detailed information, including the Workflow Execution's input and result, and a timeline of events that took place during the ride (such as the Activities that interact with Stripe's API and the Signals that indicate distance traveled).