Why this project works
E-commerce is business-logic heavy: catalog, filters, cart state, authentication, orders, inventory, discounts, payment, and admin operations all have to agree.
Case study / payment integration
Shopora is built to show complex commerce logic, with the payment path as the main proof point: create a pending order, open hosted Stripe Checkout in test mode, verify the returned session, mark the order paid, update inventory, clean up the cart, and make the result visible to both customer and admin.
Portfolio fit
E-commerce is business-logic heavy: catalog, filters, cart state, authentication, orders, inventory, discounts, payment, and admin operations all have to agree.
The case study highlights the customer checkout path and the operator workflow after payment instead of treating Stripe as a one-click redirect.
The payment integration proves external API work, server-owned session creation, sensitive payment boundaries, post-payment verification, and operational order review.
Problem
Payment integration is where a commerce demo becomes credible. A storefront can look finished while still hiding the hard questions: when is the order created, who owns the session, how is payment verified, and what happens to the cart after success?
Shopora highlights those details directly. The UI, API, database, and admin console are all shaped around proving the payment lifecycle rather than only presenting a product grid.
Payment flow
Customer reviews cart totals and proceeds to checkout.
Shipping and discounts are saved before payment begins.
Server creates a test-mode hosted Checkout session.
Order page confirms the Stripe session and paid state.
Receipt shows Stripe verified; admin can continue fulfillment.
Architecture
Decisions
The app creates a pending order first, then asks the server for a Stripe Checkout session that opens in a new browser tab.
Why: Payment-sensitive card entry stays inside Stripe while the demo still proves a real integration boundary.
Checkout moves from cart to pending order, Stripe session, paid confirmation, stock decrement, cart cleanup, and receipt state.
Why: A credible payment demo must show what happens before and after Stripe, not only the redirect.
The checkout screen includes the Stripe test debit card, supporting details, and a click-to-copy control beside the card number.
Why: Reviewers should be able to complete the payment path without leaving the product to search Stripe docs.
Paid orders show Stripe verification on the receipt and remain inspectable in the admin order console.
Why: Payment integration should be auditable from both the customer receipt and the operator workflow.
API surface
POST /payment/stripe-checkout creates a hosted Checkout session for an existing order.
POST /payment/stripe-confirm verifies session ownership and paid status before updating the order.
POST /orders creates pending orders; GET /orders and /orders/{id} expose payment state.
Paid order quantities are removed from the cart after successful Stripe confirmation.
Admin orders expose payment status and fulfillment updates for operational review.
OpenAPI + Scalar document the payment contract and request/response schemas.
Build phases
Persist cart items into a pending order before any payment session is created.
Server creates a hosted Checkout session from the order total, customer email, and line items.
Checkout opens Stripe in a new tab and shows a copyable test debit card for demo speed.
Return URL confirms the Stripe session, marks the order paid, decrements stock, and removes paid items from cart.
Admin console shows order status, customer context, totals, and fulfillment progression.
Start from cart and checkout, complete Stripe test payment, inspect the customer receipt, then open the admin console and review the paid order from the operator side.