Skip to Content
CardQL Documentation

CardQL Documentation

Welcome to the CardQL documentation! CardQL is a unified payments platform built on Cloudflare Workers with GraphQL API, multi-database architecture, and advanced analytics capabilities.

🚀 Getting Started

New to CardQL? Start here to set up your development environment and create your first payment.

Get Started →

🏗️ Architecture

Learn about CardQL’s multi-database architecture, worker split, and system design.

View Architecture →

📊 Analytics

Explore the Analytics Engine integration and real-time analytics capabilities.

Analytics Docs →

📚 API Reference

Complete GraphQL API reference with examples and TypeScript types.

API Reference →

What is CardQL?

CardQL is a payments platform monorepo built on Cloudflare Workers with:

  • GraphQL API for unified payment operations
  • Multi-database architecture (DataQL + D1 Analytics)
  • Advanced analytics with Cloudflare Analytics Engine
  • Three-worker architecture for separation of concerns
  • Real-time ETL pipeline for analytics
  • Automated business intelligence

Key Features

🎯 Unified GraphQL API

Single GraphQL endpoint orchestrating all payment operations, analytics, and platform management.

🗄️ Two-Database Strategy

  • cardql_payments_db: Payment processing, customers, merchants, gateway operations
  • cardql_saas_db: Platform management, accounts, users, billing, subscriptions

⚡ Analytics Engine

  • Fire-and-forget writes (~1-5ms)
  • Unlimited cardinality
  • SQL query support
  • Real-time dashboards

🔧 Developer Experience

  • TypeScript-first with full type safety
  • Auto-generated GraphQL types
  • Comprehensive testing utilities
  • Local development with Wrangler

Platform Components

CardQL Platform ├── cardql-worker (port 8787) # Main unified GraphQL API ├── cardql-core (port 8788) # Payment database operations ├── cardql-saas (port 8789) # Platform/SaaS operations ├── Analytics Engine # Time-series analytics ├── D1 Databases # Relational data storage └── KV Caching Layer # Performance optimization

Next Steps

Ready to build with CardQL? Here’s what to do next:

  1. Installation - Set up your development environment
  2. Quick Start - Create your first payment
  3. Architecture Overview - Understand the system design
  4. GraphQL API - Explore the API capabilities

Community & Support


Built with Nextra  | Deployed on Cloudflare Pages 

Last updated on