Traffic Flow
Documentation about the general concepts and flow of traffic throughout the applications.
Payment flow
Payment intent creation (server-to-server)
- Product backend communicates with billing backend, which creates a
PaymentIntententry in database. - Billing backend creates the
payment_intent_idand sends back thecheckout_token. - Product redirects to the checkout URL
User checkout (frontend)
- The User is redirected to Billing frontend (Next.js), where the token is validated, checkout page loads payment intent details from database.
- Billing backend creates payment provider specific intent, frontend redirects user to the provider payment page
Payment confirmation
- Payment provider to Billing backend (webhook): verifying the status of the transaction. Billing backend updates the status based on that.
- Billing backend sends request to the given product, with the status of the transaction.