Skip to content

Payment & Financial Systems Architecture

Overview

This document details the comprehensive payment and financial management system for the Wedissimo wedding marketplace. The system handles the complete financial lifecycle from initial deposits through vendor payouts, including cancellation policies, dispute resolution, and escrow management.

Current System Analysis

Existing Payment Structure (From Terms & Conditions)

Deposit Requirements:

  • Standard Deposit: 22.5% of total booking value
  • Service Fees: 3% of deposit and 3% of remaining balance (non-refundable in any circumstances)
  • Payment Structure:
    • Deposit collected at booking (22.5%)
    • Remaining balance due before wedding

Current Commission Structure:

  • Split Payment Model: 8.75% on first payment, 10% thirty days before wedding
  • Alternative Model: 18.5% commission paid upfront
  • Final Payment: One week before wedding date
  • Vendor Payout: 5 days after wedding completion

Cancellation & Refund Policy Architecture

Current Policy Framework

The existing Wedissimo platform maintains specific cancellation policies that must be preserved and enhanced:

Cancellation Windows & Refund Rules

Cancellation TimingRefund PolicyBusiness Logic
Within 30 days of bookingFull deposit refund (less 3% service fee)Exception: No refund if wedding is within 30 days
After 30 days of bookingNo deposit or service fee refundCouple not obligated to pay remaining balance
Within 30 days of weddingNo refund of any paymentsMust pay remaining balance

Vendor Cancellation Protection

Vendor-Initiated Cancellations:

  • Wedissimo offers replacement supplier of similar quality
  • If no replacement found: full refund plus additional amount equal to total booking fee as goodwill gesture
  • Vendor penalties applied based on timing and circumstances
  • Platform handles vendor replacement sourcing and coordination
  • Complete audit trail required for all vendor cancellations

Force Majeure Considerations:

  • No refunds for cancellations due to force majeure events
  • Includes: extreme weather, war, terrorism, riots, strikes, epidemics/pandemics, acts of God
  • Government actions and restrictions also covered under force majeure
  • Documentation required for all force majeure claims
  • Case-by-case review process for exceptional circumstances

Enhanced Cancellation System Requirements

Automated Policy Engine

Core Functionality:

  • Automated refund calculation based on 22.5% deposit policy with 3% non-refundable service fees
  • Dynamic policy application based on booking date, wedding date, and cancellation timing
  • Integration with Stripe Connect for seamless refund processing
  • Preservation of existing cancellation timeline rules and restrictions

Vendor Replacement Workflow:

  • Automated vendor matching for cancelled bookings
  • Integration with vendor availability and service matching systems
  • Escalation process for manual replacement coordination
  • Goodwill payment processing for failed replacement scenarios

Force Majeure Management:

  • Documentation collection and review system
  • Admin approval workflow for emergency circumstances
  • Flexible policy override capabilities with audit trails
  • Integration with external event monitoring for automatic policy triggers

Technical Implementation Scope

System Components:

php
// Core Cancellation Engine
CancellationPolicyEngine::calculateRefund($booking, $cancellationDate)
VendorReplacementService::findReplacements($booking, $requirements)
ForceMajeureProcessor::evaluateClaim($booking, $documentation)
RefundProcessor::processAutomaticRefund($booking, $amount)

Data Migration Requirements:

  • Historical cancellation data from WooCommerce order status
  • Existing refund transaction records and processing history
  • Vendor-specific cancellation terms and custom policy agreements
  • Current dispute resolution records and outcomes
  • Force majeure claims and documentation

Payment Engine Architecture

Core Payment Flow

The wedding marketplace payment lifecycle follows these stages:

1. Booking Creation & Deposit Collection

Booking Initiation
├── Service selection and customization
├── Wedding date confirmation
├── Deposit calculation (22.5% standard)
├── Service fee calculation (3% of deposit and remaining balance)
├── Payment method collection
└── Initial payment processing via Stripe Connect

2. Payment Scheduling & Management

Payment Schedule Creation
├── Remaining balance calculation
├── Installment scheduling based on wedding date
├── Automated reminder system setup
├── Payment window determination
└── Commission allocation planning

3. Installment Processing

Scheduled Payment Processing
├── Automated payment collection
├── Failed payment handling and retry logic
├── Commission deduction and allocation
├── Vendor notification and updates
└── Payment confirmation to all parties

4. Final Payment & Wedding Preparation

Pre-Wedding Payment Completion
├── Final payment collection (one week before)
├── Total amount reconciliation
├── Vendor confirmation and preparation
├── Escrow fund preparation for post-wedding release
└── Final booking confirmation

5. Post-Wedding Vendor Payout

Vendor Payout Processing
├── 5-day post-wedding hold period
├── Dispute window monitoring
├── Commission deduction
├── Vendor Stripe Connect transfer
└── Payment completion and record closure

Payment Rules Engine

Configurable Business Rules

Payment Window Logic:

php
class PaymentWindowRules
{
    public function determinePaymentOptions($weddingDate, $bookingDate)
    {
        $daysUntilWedding = $weddingDate->diffInDays($bookingDate);

        if ($daysUntilWedding > 60) {
            return ['full_payment', 'three_part_payment'];
        } elseif ($daysUntilWedding >= 30) {
            return ['full_payment', 'two_part_payment'];
        } else {
            return ['full_payment_required'];
        }
    }
}

Commission Calculation:

php
class CommissionCalculator
{
    public function calculateCommission($amount, $paymentType, $timing)
    {
        if ($paymentType === 'split_payment') {
            return $timing === 'first' ? $amount * 0.0875 : $amount * 0.10;
        } else {
            return $amount * 0.185; // Upfront commission
        }
    }
}

Payment Processing Integration

Stripe Connect Implementation

Marketplace Architecture:

  • Platform maintains master Stripe account for commission collection
  • Vendors connect individual Stripe accounts for direct payouts
  • Automatic split payment processing with commission deduction
  • Escrow account management for payment holding and dispute protection

Transaction Flow:

Customer Payment
├── Charged to platform Stripe account
├── Commission deducted immediately
├── Remaining funds held in escrow
├── Automated release after completion + hold period
└── Direct transfer to vendor Stripe Connect account

Payment Security & Compliance

Security Measures:

  • PCI DSS compliance through Stripe infrastructure
  • Secure tokenization for stored payment methods
  • Fraud detection and prevention integration
  • Two-factor authentication for high-value transactions

Audit Trail:

  • Complete transaction logging for all payment events
  • Immutable record keeping for compliance requirements
  • Real-time financial reporting and reconciliation
  • Automated anomaly detection and alerting

Escrow Management System

Escrow Account Architecture

Fund Holding & Release Conditions

Escrow Management:

php
class EscrowManager
{
    public function holdPayment($booking, $amount)
    {
        // Hold payment in platform escrow account
        // Set release conditions based on wedding date + hold period
        // Configure dispute protection mechanisms
    }

    public function releasePayment($booking)
    {
        // Verify completion conditions
        // Check for active disputes
        // Process vendor payout with commission deduction
        // Update financial records
    }
}

Release Conditions:

  • Wedding date completion verified
  • 5-day post-wedding hold period elapsed
  • No active disputes or claims pending
  • Vendor account verification and compliance

Dispute Protection Mechanisms

Automatic Holds:

  • Payment release suspended during active disputes
  • Extended hold periods for high-risk bookings
  • Manual override capabilities for admin intervention
  • Escalation processes for complex dispute resolution

Resolution Integration:

  • Partial refund processing for dispute settlements
  • Vendor penalty deduction from held funds
  • Goodwill payment processing from platform reserves
  • Complete audit trail for all dispute-related transactions

Dispute Management System

Dispute Workflow Architecture

Dispute Status States

php
enum DisputeStatus
{
    case OPENED;              // Initial dispute creation
    case VENDOR_RESPONSE;     // Vendor provides response/evidence
    case CUSTOMER_ESCALATION; // Customer escalates to admin review
    case ADMIN_REVIEW;        // Administrative investigation
    case RESOLVED;            // Resolution determined and applied
    case CLOSED;              // Final dispute closure
}

Dispute Types & Categories

Service-Related Disputes:

  • Service Not Provided: Complete service failure with full refund consideration
  • Partial Service: Incomplete delivery with proportional refund calculation
  • Quality Issues: Service quality below expectations requiring evidence review
  • Vendor No-Show: Vendor fails to appear with automatic refund processing

Booking-Related Disputes:

  • Customer Cancellation: Policy-based refund calculation and processing
  • Vendor Cancellation: Replacement vendor sourcing or full refund with goodwill
  • Force Majeure: Emergency circumstances requiring case-by-case evaluation

Resolution Processing

Automated Resolution Options:

php
class DisputeResolver
{
    public function processResolution($dispute, $resolution)
    {
        switch ($resolution->type) {
            case 'full_refund':
                return $this->processFullRefund($dispute->booking);
            case 'partial_refund':
                return $this->processPartialRefund($dispute->booking, $resolution->amount);
            case 'vendor_penalty':
                return $this->applyVendorPenalty($dispute->vendor, $resolution->penalty);
            case 'no_action':
                return $this->closeDispute($dispute, $resolution->reason);
        }
    }
}

Evidence Management

Documentation Collection

  • File upload system for photos, videos, and documents
  • Automated timestamp and metadata collection
  • Secure storage with access control and audit trails
  • Integration with external service verification systems

Review Process

  • Structured evidence evaluation workflow
  • Admin dashboard for case management and review
  • Automated evidence analysis and recommendation system
  • Integration with vendor performance tracking for pattern detection

Financial Reporting & Analytics

Real-Time Financial Dashboard

Key Metrics Tracking

  • Revenue Metrics: Daily, weekly, monthly revenue tracking
  • Commission Analytics: Platform commission collection and optimization
  • Vendor Performance: Payout volumes, completion rates, dispute ratios
  • Customer Behavior: Payment patterns, cancellation rates, rebooking analysis

Risk Management Analytics

  • Vendor Risk Scoring: Performance-based risk assessment
  • Booking Risk Analysis: High-risk booking identification and management
  • Financial Anomaly Detection: Unusual transaction pattern identification
  • Predictive Analytics: Revenue forecasting and trend analysis

Compliance & Audit Features

Financial Compliance

  • Tax Reporting: Automated 1099 generation for vendor payments
  • Regulatory Compliance: Financial services regulation adherence
  • Audit Trail Maintenance: Immutable transaction record keeping
  • Data Protection: Financial data encryption and secure handling

Reconciliation Systems

  • Daily Reconciliation: Automated transaction matching and verification
  • Commission Reconciliation: Platform fee calculation and verification
  • Dispute Impact Tracking: Financial impact analysis of dispute resolutions
  • Vendor Payout Verification: Payment accuracy and timing verification

Technical Implementation Specifications

Database Schema Design

Core Financial Tables

sql
-- Bookings and payments
bookings (id, user_id, vendor_id, wedding_date, total_amount, deposit_amount, status)
payments (id, booking_id, amount, type, status, stripe_payment_id, processed_at)
payment_schedules (id, booking_id, due_date, amount, type, status)

-- Escrow and commissions
escrow_accounts (id, booking_id, held_amount, release_date, status)
commissions (id, payment_id, rate, amount, collected_at)
vendor_payouts (id, vendor_id, amount, stripe_transfer_id, processed_at)

-- Disputes and cancellations
disputes (id, booking_id, type, status, created_at, resolved_at)
cancellations (id, booking_id, reason, refund_amount, processed_at)
refunds (id, booking_id, amount, stripe_refund_id, processed_at)

Financial Audit Tables

sql
-- Audit and compliance
financial_transactions (id, type, booking_id, amount, description, created_at)
audit_logs (id, table_name, record_id, action, old_values, new_values, user_id, created_at)
compliance_records (id, booking_id, type, data, verified_at)

API Endpoints

Payment Management APIs

php
// Payment processing
POST /api/bookings/{id}/payments/deposit
POST /api/bookings/{id}/payments/installment
GET /api/bookings/{id}/payment-schedule

// Cancellation and refunds
POST /api/bookings/{id}/cancel
POST /api/bookings/{id}/refund
GET /api/bookings/{id}/cancellation-policy

// Dispute management
POST /api/bookings/{id}/disputes
PUT /api/disputes/{id}/resolve
GET /api/disputes/{id}/evidence

Financial Reporting APIs

php
// Admin financial oversight
GET /api/admin/financial/dashboard
GET /api/admin/financial/transactions
GET /api/admin/financial/reconciliation

// Vendor financial management
GET /api/vendor/earnings
GET /api/vendor/payouts
GET /api/vendor/financial-summary

Integration Requirements

External Service Integration

  • Stripe Connect: Marketplace payment processing and vendor payouts
  • Banking APIs: Account verification and automated clearing house (ACH) transfers
  • Tax Services: Automated tax calculation and reporting integration
  • Fraud Detection: Third-party fraud prevention and risk assessment services

Internal System Integration

  • User Management: Authentication and authorization for financial operations
  • Booking System: Integration with booking lifecycle and status management
  • Communication System: Automated notifications for payment and financial events
  • Admin Tools: Financial oversight and management dashboard integration

Migration Strategy for Payment Systems

Data Migration Priorities

Phase 1: Historical Financial Data

  1. WooCommerce Order Migration: Complete order history with payment status
  2. Stripe Transaction History: Payment and refund transaction records
  3. Vendor Payout Records: Historical payout data and commission calculations
  4. Cancellation History: Previous cancellation and refund decisions

Phase 2: Active Financial Operations

  1. Active Booking Payments: Ongoing payment schedules and pending transactions
  2. Vendor Stripe Connect: Account connections and verification status
  3. Dispute Records: Active and resolved dispute cases with documentation
  4. Escrow Balances: Current held funds and release schedules

Testing & Validation Strategy

Financial Accuracy Testing

  • Payment Flow Testing: End-to-end payment processing validation
  • Commission Calculation: Automated commission calculation verification
  • Refund Processing: Cancellation policy application and refund accuracy
  • Dispute Resolution: Complete dispute workflow testing and validation

Security & Compliance Testing

  • Payment Security: PCI DSS compliance verification and security testing
  • Audit Trail Verification: Complete transaction logging and audit trail testing
  • Data Protection: Financial data encryption and secure handling verification
  • Regulatory Compliance: Financial services regulation compliance testing

Success Metrics & KPIs

Financial Performance Metrics

  • Payment Processing Accuracy: 100% transaction accuracy target
  • Commission Collection: Automated commission calculation and collection
  • Vendor Payout Timeliness: 100% on-time vendor payment processing
  • Refund Processing Speed: Same-day refund processing for eligible cancellations

Customer Experience Metrics

  • Payment Completion Rate: >98% successful payment processing
  • Dispute Resolution Time: <7 days average dispute resolution
  • Customer Satisfaction: >95% satisfaction with payment and refund processes
  • Vendor Payment Satisfaction: >98% vendor satisfaction with payout processes

Risk Management Metrics

  • Fraud Prevention: <0.1% fraudulent transaction rate
  • Dispute Rate: <2% of bookings result in disputes
  • Financial Reconciliation: 100% daily reconciliation accuracy
  • Compliance Adherence: 100% regulatory compliance maintenance

This comprehensive payment and financial systems architecture ensures robust, scalable, and compliant financial management for the Wedissimo wedding marketplace platform.

Wedissimo API Documentation