An example of how we used Flow v10 during CodeCon.sk 2022 for accepting payments via Stripe from an eshop with some clothes and food.
Components used:
As you can see in the image above we used a HTTP Route component with path /api/stripe/checkout/create
to recieve an order data which we passed through JSON Schema validator to make sure the data is in correct format. Then we saved the data using NoSQL database and created a Stripe Checkout session and redirected the user to the url provided by Stripe.
Once the user returned from Stripe payment page we verified the payment was successful and created an Invoice using SuperFaktura Invoices which we then sent to the user via email along with QR codes(only for food) generated by QR Generator component.
Although the flow on the image above might look complicated, it is not. There are quite a few components like Debug log which are not necessary to run the app as well as Triggers and some of NoSQL components which were only used for testing purposes.
This usecase also gave as a few ideas about how we can improve some components as well as which components we could create in order to make it easier to create API services like this.