@@ -34,6 +34,35 @@ C4Context
3434 UpdateLayoutConfig($c4ShapeInRow="2", $c4BoundaryInRow="1")
3535----
3636
37+ == C4Container – REST Payment Integration
38+
39+ [source, mermaid]
40+ ----
41+ C4Container
42+ title Container Diagram – REST Payment Integration
43+
44+ Person(customer, "🧑 Customer", "End user placing orders via web or mobile")
45+
46+ System_Ext(payment_provider, "💳 Payment Provider", "External system for processing payments (e.g., Stripe)")
47+
48+ Container_Boundary(app, "Company Backend System") {
49+ Container(client_app, "Client App", "React / Web", "Allows customers to place orders and initiate payments")
50+ Container(backend, "Java Backend", "Java + Spring Boot", "Handles checkout and payment logic")
51+ Container(order_service, "Order Service", "Spring Boot", "Manages order state and processing")
52+ ContainerDb(database, "Order Database", "PostgreSQL", "Stores order and payment info")
53+ }
54+
55+ Rel(customer, client_app, "Uses", "HTTPS")
56+ Rel(client_app, backend, "Sends order/payment", "HTTPS/REST")
57+ Rel(backend, payment_provider, "Sends payment request", "HTTPS/REST")
58+ Rel_Back(payment_provider, backend, "Sends webhook confirmation", "HTTPS")
59+
60+ Rel(backend, order_service, "Marks order as paid", "HTTP/JSON")
61+ Rel(order_service, database, "Reads/Writes", "JDBC/SQL")
62+
63+ UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
64+ ----
65+
3766== Sequence Diagram: REST-Based Payment (with Eventual HTTP Request)
3867
3968[source, mermaid]
0 commit comments