1. Where Traditional E-commerce Architecture Starts Creating Problems
Traditional e-commerce platforms were designed to bring essential online selling capabilities into one system. Product catalogues, customer accounts, carts, checkout, orders and payments could all be managed through a single application.
For many businesses, this remains a practical arrangement.
However, as commerce operations expand, the same architecture can become difficult to extend.
Consider a retailer that originally operated a single online store. Over time, it adds a mobile application, international shipping, multiple payment providers, customer-specific pricing, an ERP connection and a separate warehouse system.
If these capabilities are deeply connected to the original application, each new requirement can create additional dependencies.
Some common signs of this problem include:
- Changing the checkout requires modifications to unrelated application modules.
- Product and inventory information becomes inconsistent across sales channels.
- Integrating a new payment provider requires substantial custom development.
- The website and mobile application maintain separate business rules.
- A platform upgrade risks breaking existing custom functionality.
- Performance problems in one area affect the entire application.
- New features take longer to release because regression testing becomes extensive.
The issue is not that monolithic architecture is inherently bad. A modular monolith can be efficient and easier to operate than a distributed system.
The real concern is a tightly coupled application in which business capabilities cannot evolve independently.
When should a business consider changing its architecture?
A business should evaluate modernization when its existing platform repeatedly creates problems with integration, performance, checkout flexibility, maintenance or expansion into new channels.
For a smaller store with straightforward requirements, replacing a working platform may not deliver enough value.
For a growing retailer or B2B business with complex pricing, multiple systems and different customer interfaces, a more modular architecture may provide meaningful advantages.
2. Composable Commerce: Building a Platform Around Business Capabilities
Composable commerce changes how businesses approach e-commerce development.
Instead of depending on one platform to manage every operation, a business selects specialized components and connects them into a unified commerce environment.
Each component has a defined responsibility.
For example:
- A storefront manages the customer-facing shopping experience.
- A commerce engine manages products, carts, orders and commerce rules.
- A content management system manages editorial content.
- A payment provider processes transactions.
- An ERP manages financial and operational records.
- An inventory system manages stock availability.
- A CRM manages customer relationships.
- A search service supports product discovery.
The components work together through APIs, webhooks and event-based communication.
An example technology combination
| Business capability | Possible technology |
|---|---|
| Storefront | Next.js, React |
| Commerce engine | Shopify, Saleor, Medusa, commercetools |
| Content management | Strapi or another headless CMS |
| Product information | PIM or commerce catalogue |
| Payments | Stripe, Adyen or regional providers |
| CRM | HubSpot, Zoho or custom CRM |
| ERP | Existing ERP or suitable cloud ERP |
| Inventory | Dedicated inventory or warehouse system |
| Search | OpenSearch or specialist search services |
| AI capabilities | Python, FastAPI and model APIs |
These are possible choices, not a recommended fixed combination. A business should select components based on its existing infrastructure, requirements, budget, geographic markets and technical capabilities.
What makes this approach useful?
The main advantage is that a business can change selected capabilities without necessarily replacing the entire commerce platform.
For example, a retailer may redesign its storefront while retaining its existing commerce engine. Later, it might replace the search service or introduce a different payment provider.
This allows technology decisions to be made at the component level.
However, composability comes with responsibilities. The business must manage integration reliability, data ownership, vendor relationships, service availability and security across multiple systems.
A platform with too many disconnected services can become harder to operate than the monolith it replaced.
3. API-First Commerce: Connecting Every Part of the Shopping Journey
Composable commerce needs a reliable way for its components to communicate. This is where API-first architecture becomes important.
In an API-first system, business capabilities are designed to be accessed through documented interfaces.
Instead of building product, cart and checkout functionality exclusively around one website, the application exposes these capabilities for use by different channels.
Imagine a retailer selling through a website, mobile application and marketplace.
All three channels may need access to:
- Product information.
- Current prices.
- Customer-specific discounts.
- Stock availability.
- Shopping cart operations.
- Shipping options.
- Payment initiation.
- Order status.
Without a shared API layer, each channel may develop its own implementation of these business rules.
With API-first commerce, the channels can use common services while retaining different user experiences.
APIs that support modern commerce
| API | Responsibility |
|---|---|
| Product API | Products, categories, descriptions and variants |
| Pricing API | Prices, discounts and customer-specific rules |
| Inventory API | Stock availability and reservations |
| Cart API | Cart creation, updates and validation |
| Checkout API | Shipping, taxes, totals and checkout state |
| Payment API | Payment initiation, authorization and refunds |
| Order API | Order creation, status and fulfilment |
| Customer API | Customer profiles and account information |
| Search API | Product search and filtering |
| Notification API | Order updates and customer notifications |
A reliable API should define authentication, authorization, request validation, response formats, error handling and versioning.
It should also have appropriate monitoring and usage limits.
REST, GraphQL and webhooks
Different communication patterns serve different requirements.
REST APIs are commonly used for product, customer, cart, order and payment operations.
GraphQL can be useful when a frontend needs flexible access to related product or customer information without requesting multiple separate resources.
Webhooks allow one system to notify another when an event occurs. For example, a payment provider can send a notification after a transaction changes status.
Message queues and event streaming can support asynchronous operations such as inventory synchronization, bulk order processing and notifications.
The objective is not to use every API technology. It is to choose communication methods that suit the business workflow.
4. Headless Commerce and MACH: Separating the Shopping Experience from the Commerce Engine
Headless commerce separates the customer-facing frontend from the backend commerce functionality.
In a traditional storefront, the presentation layer is often closely connected to the commerce platform.
With headless commerce, the frontend can be developed independently and communicates with the backend through APIs.
For example, a business could use Next.js to develop its website while retaining a separate commerce engine for product, cart, pricing and order management.
The same backend could also support a mobile application or another digital channel.
Understanding MACH architecture
MACH is a technology architecture concept based on four principles:
- Microservices: Business capabilities can be separated into independently managed services.
- API-first: Functionality is made available through well-defined interfaces.
- Cloud-native: Applications are designed to use suitable cloud infrastructure and managed services.
- Headless: The frontend is separated from backend business functionality.
These principles can help organizations create flexible commerce platforms.
However, MACH should not become a checklist that every business must follow.
A growing e-commerce business may be better served by a modular backend, a headless frontend and a small number of well-defined integrations.
A large retailer with separate teams, complex workloads and independent release requirements may have a stronger reason to adopt microservices.
Architecture example
A simplified architecture could look like this:
<escape> Website / Mobile App / Other Channels | API Gateway / BFF | ———————————————– | | | | | Product Cart Checkout Customer Search Service Service Service Service Service | | | | | ———————————————– | Integration Layer | ———————————————– | | | | | Payment ERP Inventory CRM Shipping Provider Management | Events / Messaging | Monitoring / Analytics </escape>
A Backend for Frontend (BFF) can provide a tailored interface for a particular customer experience, such as a website or mobile application.
The integration layer handles communication with external business systems.
The architecture should also define which system owns each important data type. For example, the ERP may own financial records while the commerce engine owns confirmed online orders.
This prevents different services from independently maintaining conflicting versions of business information.
5. Checkout Is a Business-Critical Capability, Not Just a Payment Form
A modern storefront may have an attractive design, fast product pages and personalized recommendations. However, customers still need a reliable way to complete their purchases.
Checkout brings together several business operations:
- Cart validation.
- Product and inventory checks.
- Shipping address collection.
- Delivery method selection.
- Tax and discount calculation.
- Payment selection.
- Payment authentication.
- Transaction confirmation.
- Order creation.
- Customer notification.
These operations may involve multiple services and external providers.
If they are not coordinated properly, customers can experience duplicate orders, incorrect totals, payment failures or misleading order statuses.
Common checkout problems
- Customers are forced to create an account before purchasing.
- Too many fields make checkout difficult on mobile.
- Shipping charges appear too late.
- Payment methods are limited.
- Payment failures do not provide clear recovery options.
- Inventory changes during checkout.
- Payment confirmation takes too long.
- Customers are redirected to unclear or inconsistent pages.
- The system creates duplicate orders after repeated requests.
What a better checkout experience should provide
A modern checkout should be designed around the customer’s journey.
It should support guest checkout where appropriate, clearly display costs, provide suitable payment methods, validate information before submission and explain what happens when a payment fails.
It should also be accessible, responsive and consistent across supported devices.
The backend must independently validate prices, discounts, shipping rules, stock availability and payment status. Frontend calculations should never be treated as authoritative business data.
6. Payment Technology: Preparing for More Flexible Checkout Experiences
Payment expectations vary by country, customer type and industry.
A business selling internationally may need to support cards, digital wallets, regional payment methods and different authentication flows.
The checkout architecture should allow payment methods to be added or changed without rewriting the entire order management process.
6.1 Digital wallets and express payments
Depending on market availability and payment-provider support, a business may offer:
- Apple Pay.
- Google Pay.
- PayPal.
- Regional digital wallets.
- Supported bank-based payment methods.
Express checkout can reduce manual form entry for returning and eligible customers.
The business should evaluate device support, payment-provider integration, transaction costs and customer preferences before selecting payment options.
6.2 Payment tokenization
Tokenization replaces sensitive card information with a token that can be used within an authorized payment environment.
EMV payment tokenization supports controls that can restrict token usage to defined merchants, devices or payment scenarios.
For commerce businesses, tokenization can support stored payment methods and reduce the exposure of raw card details within their own systems.
The implementation should follow the payment provider’s token lifecycle, consent, authentication and storage requirements.
Reference: EMVCo – Payment Tokenisation.
6.3 EMV 3-D Secure
EMV 3-D Secure supports authentication for card-not-present transactions.
It allows information about a transaction and the customer interaction to be exchanged with the card issuer.
Depending on the risk assessment, the transaction may proceed without additional customer interaction or require an authentication challenge.
For international e-commerce businesses, 3-D Secure support can be important for payment authentication and market-specific requirements.
Reference: EMVCo – 3-D Secure.
6.4 Passkeys and biometric authentication
Passkeys use cryptographic credentials associated with supported devices and identity systems.
Customers may authenticate using a device PIN, biometric verification or another supported method.
They can improve the login experience and reduce reliance on passwords.
However, passkeys should not be treated as a universal replacement for payment authentication. The supported flow depends on the identity provider, payment provider, device and applicable payment requirements.
Reference: EMVCo – Understanding Passkeys in Payments.
6.5 Saved payment methods and recurring purchases
Customers may benefit from securely saved payment methods, subscriptions and repeat-order capabilities.
These features require appropriate customer consent, token handling, authentication and recurring-payment controls.
A merchant should not store raw card details in its application database as a shortcut to implementing saved cards.
Instead, it should use the supported tokenization and payment methods provided by its payment partner.
7. Checkout Security: Protecting the Entire Transaction
A modern checkout involves the browser, storefront, backend services, payment provider and sometimes several external integrations.
Each part must be protected.
A secure payment provider alone does not make the complete checkout secure. The merchant’s own application, APIs and payment-page scripts also matter.
7.1 PCI DSS and payment data
PCI DSS defines security requirements for environments that store, process or transmit payment card data.
PCI DSS v4.0.1 is the published version relevant to the guidance referenced here. Its requirements include secure configurations, access controls, vulnerability management, monitoring and protection of payment data.
Using a hosted payment page or tokenized payment integration may reduce the cardholder data handled directly by the merchant, but it does not automatically eliminate the merchant’s PCI DSS responsibilities.
The exact validation requirements depend on the payment integration and the business’s environment.
Businesses should confirm their applicable obligations with their acquirer, payment provider or qualified security assessor.
Reference: PCI Security Standards Council – PCI DSS.
7.2 Payment-page scripts and e-skimming
An e-skimming attack can involve malicious JavaScript being introduced into a checkout page to capture information entered by customers.
This is particularly relevant when a storefront loads scripts from analytics platforms, advertising tools, chat widgets, tag managers and other third-party services.
PCI DSS requirements 6.4.3 and 11.6.1 address payment-page script management and tamper detection.
A security process should include:
- Maintaining an inventory of scripts used on payment pages.
- Confirming that scripts are authorized.
- Checking script integrity.
- Monitoring unauthorized changes.
- Reviewing third-party dependencies.
- Applying suitable browser security policies.
- Alerting responsible teams when suspicious changes are detected.
Importantly, an embedded payment form does not automatically make the surrounding checkout page irrelevant to security requirements.
Reference: PCI SSC – Payment Page Security and Preventing E-skimming.
7.3 API security
API-first commerce creates more interfaces through which systems exchange information.
Those APIs may expose customer profiles, product prices, inventory, orders and payment-related operations.
Important security controls include:
- Strong authentication.
- Object-level authorization.
- Role and function-level permissions.
- Request validation.
- Rate limiting.
- Secure API credentials.
- Token expiry and revocation.
- API version management.
- Logging and monitoring.
- Protection against automated abuse.
The OWASP API Security Top 10 highlights risks including broken object-level authorization, broken authentication, unrestricted resource consumption, sensitive business-flow abuse and unsafe consumption of APIs.
For example, a customer should never be able to retrieve another customer’s order simply by changing an order ID in an API request.
Reference: OWASP API Security Top 10.
7.4 Payment confirmation and order integrity
One of the most important checkout design decisions is how the system confirms a successful payment.
A customer may return to a success page, but that redirect alone should not be treated as proof that the transaction was completed.
A reliable payment workflow should:
- Create a payment request on the server.
- Send the required information to the payment provider.
- Receive the provider’s response.
- Verify webhook signatures where applicable.
- Validate the transaction status.
- Process duplicate events safely.
- Confirm the order using trusted server-side logic.
- Reconcile payment and order records.
Idempotency keys help prevent repeated requests from creating duplicate payments or orders.
The system should also handle delayed webhooks, interrupted sessions, payment reversals and failed transactions.
7.5 Identity and privileged access
Commerce applications may have customers, administrators, support teams, warehouse staff, suppliers and service integrations.
They should not all have the same access.
Role-based permissions, multi-factor authentication for privileged users, least-privilege service accounts and audit logs help reduce unnecessary access to sensitive operations.
8. The Emerging Shift Towards AI-Assisted and Agentic Commerce
Shopping experiences are beginning to move beyond traditional website navigation.
Customers may increasingly use AI assistants to discover products, compare alternatives, ask questions about specifications and receive help with purchasing decisions.
In an agentic commerce model, an AI system may also be able to initiate permitted actions through supported business interfaces.
This creates new architectural requirements.
What an AI-ready commerce platform needs
A commerce system should provide accurate, structured and accessible information about:
- Product descriptions and variants.
- Current pricing.
- Availability.
- Shipping methods.
- Return and refund policies.
- Discounts and eligibility.
- Checkout capabilities.
- Order status.
It also needs secure interfaces for permitted cart, checkout and order operations.
An AI assistant should not be given unrestricted access to payment systems or customer accounts.
Sensitive actions should require appropriate customer authorization, permission checks and transaction validation.
Universal Commerce Protocol (UCP)
One development worth monitoring is Google’s Universal Commerce Protocol, announced in January 2026.
UCP is designed to provide a common way for consumer-facing experiences, businesses and payment providers to communicate across commerce activities.
Its stated scope includes product discovery, checkout and post-purchase interactions, with integration options involving APIs and other communication protocols.
However, businesses should not assume that UCP-powered checkout is universally available. Google’s merchant documentation describes availability for selected merchants and eligible experiences in specific markets, including the United States, Canada and Australia.
For businesses elsewhere, the sensible approach is to maintain structured product data, reliable APIs and secure checkout capabilities while monitoring ecosystem availability.
References:
9. Designing for Performance, Scalability and Reliability
Composable commerce should not only make the platform easier to extend. It must also support real-world workloads.
A growing store may experience sudden traffic increases during product launches, seasonal sales or promotional campaigns.
The architecture should be able to handle these situations without affecting checkout reliability.
Horizontal scaling
Horizontal scaling adds more application instances to distribute requests.
It is useful when storefront and backend services can operate across multiple instances without depending on local application state.
Database optimization
Product catalogues, orders, customer records and inventory transactions can create substantial database workloads.
Important techniques include:
- Query and index optimization.
- Connection pooling.
- Appropriate read replicas.
- Data archiving.
- Database monitoring.
- Partitioning where justified.
- Transaction management.
Caching
Frequently accessed product information and selected reference data may be cached to reduce repeated database requests.
Redis can support suitable caching and session workloads.
However, prices, inventory and checkout totals require careful freshness and validation rules. A cached value should never be trusted as the final authority for a purchase.
Asynchronous processing
Not every commerce operation needs to happen during the customer’s request.
Background processing can handle:
- Order notifications.
- Warehouse synchronization.
- Search indexing.
- Product feed updates.
- Bulk imports.
- Analytics processing.
- Customer communication.
Queues and event-driven workflows can help separate these tasks from customer-facing operations.
Monitoring and recovery
A modern commerce platform should monitor:
- API response times.
- Payment failures.
- Checkout errors.
- Webhook processing.
- Inventory synchronization.
- Service availability.
- Database performance.
- Infrastructure costs.
It should also include backup, recovery and incident-management procedures.
The aim is not simply to handle more traffic. It is to keep the buying journey dependable when individual components experience problems.
10. A Practical Technology Stack for Modern Commerce
A modern commerce platform can combine frontend frameworks, backend services, databases, payment integrations and cloud infrastructure.
The following stack is one possible approach for a custom commerce application.
| Layer | Technologies | Role |
|---|---|---|
| Frontend | Next.js, React, TypeScript | Storefront and customer experience |
| Backend | Node.js, NestJS, Python, FastAPI | Commerce logic and services |
| Commerce engine | Shopify, Saleor, Medusa, commercetools | Products, carts and orders |
| CMS | Strapi or another headless CMS | Content management |
| Database | PostgreSQL, MySQL | Structured business data |
| Cache | Redis | Selected caching and session workloads |
| Search | OpenSearch or specialist search services | Product discovery |
| Messaging | RabbitMQ, Kafka or managed queues | Background jobs and events |
| Payments | Stripe, Adyen or regional providers | Payment processing |
| Cloud | AWS, Azure, Google Cloud | Hosting and managed infrastructure |
| Containers | Docker, Kubernetes where justified | Application deployment |
| Monitoring | OpenTelemetry, Prometheus, Grafana | Service and infrastructure monitoring |
| Security | OAuth 2.0, OpenID Connect, secrets management | Identity and credential protection |
| AI | Python, FastAPI and model APIs | Search, assistants and automation |
The stack should not be selected simply because a technology is popular.
For example, a business may need only a Next.js storefront, an established commerce engine, a secure payment provider and a reliable integration layer. Adding a large microservices environment may create more operational work than business value.
11. How to Modernize an Existing E-commerce Platform Without Disrupting Sales
A complete replacement can be risky when the existing platform is already processing orders, payments and customer information.
A phased modernization approach allows businesses to introduce new capabilities while keeping essential operations running.
Phase 1: Understand the current platform
Review the storefront, backend, checkout, product catalogue, integrations, database and payment workflows.
Identify which functions are provided by the existing platform and which are custom-built.
Phase 2: Define the target architecture
Decide which capabilities should remain in the existing system and which should be separated.
For example, the business may modernize its frontend first while keeping the existing product and order management functionality.
Phase 3: Establish data ownership
Define the authoritative system for each type of business information.
| Data | Possible source of truth |
|---|---|
| Product information | PIM or commerce catalogue |
| Prices and promotions | Commerce engine or pricing service |
| Inventory | ERP or inventory system |
| Customer relationships | CRM |
| Orders | Commerce engine or order management system |
| Financial records | ERP or accounting system |
| Payment transaction status | Payment provider and verified transaction records |
This prevents different applications from creating conflicting versions of important information.
Phase 4: Introduce APIs and integrations
Create or improve APIs for products, carts, inventory, checkout and orders.
Implement secure authentication, error handling, retries and monitoring.
Phase 5: Modernize the storefront
Develop a modern customer interface using the selected frontend framework.
Preserve important URLs, structured data, metadata, redirects and analytics during the transition.
Phase 6: Improve payment and checkout
Test payment authorization, declines, authentication challenges, duplicate requests, refunds and interrupted sessions.
Verify payment and order records independently.
Phase 7: Test and roll out gradually
Start with selected users, products or channels where practical.
Monitor checkout completion, payment failures, response times and integration errors.
Phase 8: Retire old components
Remove legacy components only after the replacement functionality has been validated and business dependencies have been addressed.
Maintain rollback and recovery procedures during the transition.
12. Common Architecture and Implementation Mistakes
Composable commerce can solve genuine business problems, but poor implementation can create new ones.
Splitting everything into microservices: Not every function needs a separate service. Unnecessary service boundaries increase deployment, monitoring and communication complexity.
Choosing vendors before understanding requirements: Selecting multiple commerce products without defining business responsibilities can lead to overlapping functionality and unnecessary costs.
Ignoring data ownership: Two systems independently managing product prices or inventory can produce inconsistent customer experiences.
Treating APIs as automatically secure: An API is an interface, not a security guarantee. Authorization and validation must be designed into every operation.
Overcomplicating checkout: More payment options and features do not necessarily produce a better checkout. The experience should remain clear and predictable.
Ignoring payment-page scripts: Third-party scripts can introduce security risks even when the actual card form is hosted by a payment provider.
Migrating everything at once: A staged transition is often safer for businesses with active customers and transactions.
Adopting AI commerce without controls: AI-assisted purchasing must respect customer permissions, pricing rules, inventory validation and payment authorization.
13. How to Measure the Results of Commerce Modernization
A modernization project should be judged by business outcomes, not simply by the number of new technologies introduced.
| Metric | What it measures |
|---|---|
| Checkout completion rate | How many checkout sessions become purchases |
| Payment authorization rate | How often payment attempts are approved |
| Payment failure rate | Frequency and causes of failed payments |
| Cart abandonment rate | How often customers leave without purchasing |
| Checkout response time | Speed of critical checkout operations |
| API availability | Reliability of commerce interfaces |
| Integration failure rate | Problems in synchronization and event processing |
| Order processing time | Time taken to move an order into fulfilment |
| Deployment frequency | How often changes can be released safely |
| Infrastructure cost | Cost of operating the platform |
| Security incidents | Unauthorized access and suspicious activity |
Establish baseline measurements before modernization and compare them after each release.
This helps determine whether the architecture is genuinely improving customer experience, reliability and operating efficiency.
14. How Xenixsoft Can Help Build and Modernize Commerce Platforms
Xenixsoft works on custom web applications, commerce development, API integrations and business automation.
For businesses reviewing their existing e-commerce architecture, the first step is understanding how the current platform operates and where its limitations affect sales, integrations or maintenance.
Our development capabilities include:
- Composable commerce architecture: Planning modular commerce systems based on actual business requirements.
- Headless storefront development: Building responsive shopping experiences with Next.js, React and TypeScript.
- API-first development: Creating APIs for product catalogues, customer accounts, carts, checkout and order operations.
- Payment integration: Connecting suitable payment providers and developing reliable transaction, webhook, refund and confirmation workflows.
- Security-focused development: Implementing access controls, API validation, secure integrations and payment-page security practices.
- Enterprise integrations: Connecting commerce applications with CRM, ERP, inventory, accounting and logistics systems.
- AI commerce development: Building intelligent product assistants, search experiences and controlled workflow automation.
- Application modernization: Improving existing commerce applications incrementally where a complete rebuild is unnecessary.
Our implementation process
- Review the existing commerce platform, integrations and checkout journey.
- Identify architectural, performance and security limitations.
- Prepare a practical modernization roadmap.
- Select the right commerce components and technology stack.
- Develop the required frontend, backend APIs and integrations.
- Improve payment and checkout workflows.
- Test functionality, security, performance and transaction integrity.
- Deploy in controlled stages and monitor the results.
The goal is to build a commerce platform that can accommodate new channels, payment requirements and business processes without making every future improvement a complete redevelopment project.
15. Conclusion: Building an E-commerce Platform That Can Adapt
The future of e-commerce is not necessarily about replacing every traditional platform with a collection of microservices.
It is about giving businesses the ability to change individual capabilities without creating unnecessary dependencies across the entire system.
Composable architecture provides a way to combine specialized commerce services. API-first development makes those services accessible across websites, applications and connected business systems. Headless experiences give businesses more control over how customers interact with their products.
But flexibility must be balanced with reliable data, secure APIs, payment protection and a checkout journey that customers can trust.
Payment tokenization, appropriate authentication, payment-page monitoring and careful transaction handling are important parts of that foundation. Structured commerce information and controlled APIs can also prepare businesses for emerging AI-assisted and agentic shopping experiences.
The most useful commerce architecture is not the one with the greatest number of services. It is the one that allows a business to improve its shopping experience, protect customer transactions and introduce new capabilities without adding unnecessary complexity.