Finally, we would like to be able to make a refund whenever a customer's transaction meets specific conditions. The easiest way to do so seems to be by pressing a button. Therefore, we shall just add a button to our tool and then have the button work the way we want it to.
1. Drag-and-drop the button component to the page:
2. Choose Run Operation as the type of the action the button performs, Stripe for the data resource and then set the operation as Refund:
3. To build a simple workflow that we can manage by pressing a button, we need to describe our projected daily routine as some logic: as soon as there's a charge to be refunded, we can enter certain amount and send it back to the customer's card. To identify a charge, select the charge ID and the amount as shown below:
4. The operation is now ready to be run: