Skip to content
Meet Penni Cart. All the work around ecommerce, beautifully connected.Learn more
Practical ecommerce guides

Add ecommerce to a React website

Keep your React frontend and connect products, cart and checkout through Penni Cart’s explicit browser integration.

WEBFLOW · ONE CLICK
♡ 248Install App ↗
CUSTOM CODE · COPY & PASTE
Claude
Connect my website to Penni Cart.
Add a cart and custom checkout.
Run ↗
✓
Just like that. Connected.Your website is ready for commerce.
✦
Illustrative product preview. Sample store data.
01

Configure your store

Create the products, payment setup and website connection before wiring the frontend.

02

Add the explicit integration

Place the stylesheets and runtime in your framework’s document/application shell using the supported HTML or script mechanism. Adapt syntax for JSX.

CODE EXAMPLE
<link rel="stylesheet" id="pc-cloak" href="https://embed.pennicart.io/v1/cloak.css">
<link rel="stylesheet" href="https://embed.pennicart.io/v1/sdk.css">
<script src="https://embed.pennicart.io/v1/runtime.js" data-store="YOUR_STORE_ID" async></script>
03

Verify route behavior

Use the current documentation for lifecycle handling. Check direct visits and client-side navigation without duplicate scripts.

Separate the website from commerce configuration

Your React app controls the presentation and navigation. Penni Cart supplies the connected commerce runtime and store configuration. Start with a single complete purchase flow rather than trying to replace your entire application at once. This is an embedded-commerce integration, not a claim that every component or router behavior is automatically handled.

Use the explicit runtime setup

The plain HTML loader uses document.write, so it is not the correct choice for framework-managed rendering. Use the explicit cloak stylesheet, SDK stylesheet and async runtime script shown below. Include the configuration once in your application shell and keep YOUR_STORE_ID consistent with the store you are testing.

Treat navigation as part of the integration

Client-side route changes can introduce new product elements without a full document reload. Follow the current integration documentation for runtime lifecycle behavior instead of repeatedly injecting scripts. Test entering a product page directly, navigating to it from another route and returning after checkout. Avoid guessing initialization APIs or duplicating the runtime.

Keep payment and secret handling safe

The runtime runs in the browser. Your store identifier belongs in the install configuration; payment-provider secret keys do not. Never place server credentials in a public environment variable or bundled client component.

Use the supported provider payment interface rather than collecting card numbers in your own inputs. Validate a payment failure, a successful order and a route transition on your deployed staging site.

A LITTLE MORE CLARITY

Questions, answered.

Can I paste the blocking loader into a React component?

Use the explicit integration for framework-rendered applications. The plain loader relies on document.write during HTML parsing.

Is this a React ecommerce template?

No. It is a guide to connecting your existing frontend to Penni Cart. Your application retains responsibility for its rendering and navigation.

Helpful references

Penni Cart documentationReact documentation
GET STARTED

From your first idea
to their next order.

Connect your website. Add your products. Make it yours.

Start your free trial
Hugo Coffee
Northmark
The Wellness Den
Wild Oak Wellness
Webflow Jobs
Olliebooks
Drag to explore