- When user hits checkout cart button, Flutter app calls payment-checkout service to get stripe session passing the list of products for payment
- payment-checkout service calls stripe api to create new session and returns session data to Flutter app
- Flutter app calls stripe session url link and displays the stripe checkout page via webview widget
- stripe processes payment (e.g. credit card payment) and calls webhook endpoint configured in your account
- payment-webhook endpoint will publish the checkout.session.completed event received from stripe to PubSub
- PubSub message will trigger payment workflow that will call payment-cart service to update cart status and publish event to notification PubSub topic which can be used to send email, sms notification to user. This can also be extended to track delivery.
- payment-cart service updates cart status in postgreSQL DB.
Displayed in flutter app via webview widget