A Unified Booking and Payment Pipeline for Fragmented Sales Channels
This project required engineering a centralized system that brings reservations, customer information, payment processing, and booking status into one reliable operational workflow. Built for the Moroccan tourism sector, it demonstrates how to safely handle online payments without double-charging customers or losing reservation data.

Fragmented sales channels
The Moroccan tourism experience is heavily fragmented. Travelers researching Morocco bounce between hotel sites, tour operators, and restaurant listings, often booking nowhere in particular because nothing connects the pieces into one journey.
For a business, managing availability across different types of services (a room night vs. a restaurant table vs. a multi-day tour) usually means maintaining three separate, disconnected software systems.
The risk of lost payments and overbooking
The core business problem wasn't just building a website; it was preventing operational failure. When payment gateways and booking systems are not properly integrated, businesses face two massive risks:
1. Double processing: If a payment callback arrives twice (which happens frequently due to network latency), poorly built software will double-charge the client or create two bookings for the same room.
2. Inconsistent data: A traveler might pay, but the booking fails to register in the database, leading to angry customers showing up for reservations that don't exist in the system.
Before
- Different reservation flows for every service type.
- Payment callbacks vulnerable to duplicate processing without idempotency.
- High risk of manual reconciliation errors between bank statements and bookings.
After
- Polymorphic booking lifecycle shared across service types.
- HMAC-SHA512 validation and idempotent reconciliation design.
- Guaranteed alignment between actual payments and confirmed system reservations.
Secure, idempotent payment integration
I architected a system where payment runs in three highly controlled phases. First, the backend securely signs a payload and hands the traveler off to CMI's hosted checkout (Morocco's interbank card gateway), so card data never touches the platform's servers.
When CMI posts a confirmation back, the system verifies the signature, matches the exact amount, and processes the transaction through a strict idempotency guard. This means if a duplicate callback arrives, it is silently absorbed instead of double-processed. The booking state is only changed when the financial transaction is cryptographically verified.
What changed for the business
The polymorphic data model ensures availability is locked the moment a transaction begins.
Full integration with CMI without exposing the business to credit card liability.
One single system managing hotels, tours, and restaurants without compromising their unique operational rules.
Decoupled and scalable
This project was built with a decoupled architecture. A Laravel API handles complex domain modeling, strict FormRequest validation, and Policy-based authorization. A React SPA provides a fluid, app-like experience for the customer.
The booking model is polymorphic—one database table serves hotels, tours, and restaurants alike. This means adding a new service type (like car rentals) doesn't require building a completely new booking system from scratch.
Inside the platform
Screenshots demonstrating the unified discovery and booking workflow.





Complete Ownership
- Shared product and technical design with one partner.
- Laravel REST API and polymorphic domain modelling.
- React/TypeScript product interface for unified search.
- Payment, security, and observability architecture.
- Idempotent webhook reconciliation for Moroccan payment gateways.
Are your sales channels disconnected?
If you are managing payments and bookings across multiple tools, a custom unified platform can eliminate costly manual errors.