Hello @Reynaldy,
First and foremost, welcome to Klaviyo! We are so happy to have you as a part of the Klaviyo family. And thank you for sharing this question with our community!
With respect to setting up the coupon code itself, another member of the community had the same question and so I recommend reviewing the solution to this in the following thread:
keep in mind that these steps speak to setting up a dynamic-coupon code (a unique, single-use code for each user). That will become a factor when you are later adding in a flow filter (more detail on that later in this reply).
In terms of setting-up the flow itself and removing people who place orders after using that coupon code, I recommend reviewing the solution to this in the following thread:
You can see from the first screenshot in this thread the proper way to set-up the flow. It consists of the trigger (joins the list to trigger the welcome series flow) > first email > wait X amount of days > second email > wait X amount of days > third and final email.
Also, (and as the thread points out), ensure you add a flow filter to the flow: Placed order > zero times since starting this flow if you use a dynamic coupon.
However, if you use a static coupon code, you can specify the coupon code name in the flow filter: Placed order > zero times since starting this flow where coupon name = X. You can only use where coupon name = X if it is a static coupon, that is a coupon that remains the same for everyone i.e. WELCOME10.
Using either of these flow filters (placed order zero times since starting this flow or placed order zero times since starting this flow where coupon name = X) will automatically filter out anyone who places an order while going through this flow because flow filters are evaluated before each email is sent in the flow. Flow filters would also apply to any new-new emails you add to the flow at a later time, if you choose to do so.
I hope that is helpful and welcome again to the community family!