Shopora

Case study / payment integration

E-commerce platform with payment integration, anchored by Stripe Checkout.

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.

20
Products
6
Categories
27
API routes
3
Apps
01

Portfolio fit

E-commerce Platform with Payment Integration

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.

Project focus

The case study highlights the customer checkout path and the operator workflow after payment instead of treating Stripe as a one-click redirect.

What makes it special

The payment integration proves external API work, server-owned session creation, sensitive payment boundaries, post-payment verification, and operational order review.

Key features
Product catalog with categories and filters
Shopping cart with checkout handoff
User authentication and order history
Order management from pending to delivered
Stripe payment gateway integration
Inventory decrement after payment
Admin dashboard for products and orders
Discount codes and order tracking
02

Problem

Most demos stop at the checkout button.

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.

03

Payment flow

The integration has five visible states.

1

Cart

Customer reviews cart totals and proceeds to checkout.

2

Pending order

Shipping and discounts are saved before payment begins.

3

Stripe Checkout

Server creates a test-mode hosted Checkout session.

4

Return + verify

Order page confirms the Stripe session and paid state.

5

Receipt + ops

Receipt shows Stripe verified; admin can continue fulfillment.

04

Architecture

Stripe sits behind the server contract.

Shopora payment architecture: website and dashboard call the Hono oRPC API, which owns Stripe and MongoDB stateStorefrontCart + checkoutDashboardOrder reviewAPIHono + oRPCStripeHosted CheckoutMongoDBOrders + cart
05

Decisions

Four payment choices worth reviewing.

Decision 01

Use hosted Stripe Checkout, not custom card fields.

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.

Decision 02

Treat payment as an order lifecycle, not a button.

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.

Decision 03

Make test payments obvious for reviewers.

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.

Decision 04

Keep payment proof visible after checkout.

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.

06

API surface

The payment contract is documented.

Stripe start

POST /payment/stripe-checkout creates a hosted Checkout session for an existing order.

Stripe confirm

POST /payment/stripe-confirm verifies session ownership and paid status before updating the order.

Orders

POST /orders creates pending orders; GET /orders and /orders/{id} expose payment state.

Cart

Paid order quantities are removed from the cart after successful Stripe confirmation.

Admin

Admin orders expose payment status and fulfillment updates for operational review.

Docs

OpenAPI + Scalar document the payment contract and request/response schemas.

Open Scalar API reference
07

Build phases

What shipped for payments.

Phase 01

Order model

Persist cart items into a pending order before any payment session is created.

Phase 02

Stripe session

Server creates a hosted Checkout session from the order total, customer email, and line items.

Phase 03

Payment UX

Checkout opens Stripe in a new tab and shows a copyable test debit card for demo speed.

Phase 04

Confirmation

Return URL confirms the Stripe session, marks the order paid, decrements stock, and removes paid items from cart.

Phase 05

Operations

Admin console shows order status, customer context, totals, and fulfillment progression.

Review it like a real product.

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.