I am looking to implement an event driven microservices architecture in my application but I am struggling with the concept of event choreography and UI interaction.
My issue is that I have a membership signup process where a user will enter in a bunch of details into my UI. This will be submitted to a membership service which will process this and then publish an event. It would seem natural for this event to be consumed by a payment service as the next step in the business process is to take payment. The payment service cannot actually process this event fully until it has payment information from the user which need to be entered in the UI.
In the UI, it would be natural that once the user has entered their signup details then UI logic would know to display a payment form and once this is complete to submit the details to the payment service. I am now duplicating the business process in both the front and the back end which feels wrong and the payment service has now been notified twice about this payment.
Does anyone have any advice on the best flow for this scenario. I feel as if I have a piece missing in my understanding here, but I have struggled to find any articles / discussions which deal with this.