Menu

Technical Overview

ApiCharge combines modern technologies into a robust system for API monetization

🔀

Reverse Proxy Core

ApiCharge is built as a high-performance reverse proxy that sits between clients and your backend services, handling authentication, rate limiting, and proxying with minimal overhead.

  • Optimised AOT platform binaries
  • YARP 2.2 as the initial reverse proxy engine
  • Extensive route configuration flexibility
  • Quality of service and payment parameters in proxy route configs
💸

Stellar Payment Integration

ApiCharge integrates with Stellar's high-performance payment rail and Soroban contract system to provide secure, low-cost micropayments with minimal transaction fees.

  • Stellar's proven distributed payment network
  • Highly efficient transaction processing
  • Very low fees
  • Fast finality (2-5 seconds)
🔐

Cryptographic Security

Every component of the ApiCharge protocol leverages cryptographic signatures and verification to ensure maximum security and integrity.

  • ED25519 cryptographic signatures
  • Dual-signed access tokens
  • Tamper-proof rate limiting
  • Non-custodial wallet architecture

ApiCharge Architecture

ApiCharge Architecture Diagram

ApiCharge's architecture combines a high-performance reverse proxy with secure payment processing, creating an efficient system for API monetization.

ApiCharge Subscription Protocol

The core of ApiCharge is the ApiCharge Subscription Protocol, a unique approach to API monetization that combines the flexibility of micropayments with the predictability of subscriptions, offering unprecedented pricing control over network guaranteed qualities of service.

an ApiCharge Subscriptions is a time-bound, quality-of-service guaranteed access grant to a specific API route. Unlike traditional micropayments that charge per API call, ApiCharge Subscriptions provide access for a specific duration (minutes to months) with defined usage parameters.

The protocol flow consists of the following steps:

  1. Client requests a signed Quote containing available services and their pricing
  2. Client selects a Route Quote and requests a Purchase Instruction
  3. Client authorizes payment via Stellar Soroban blockchain
  4. Server issues a GrantedAccessToken representing the purchased ApiCharge Subscription
  5. Client creates AccessTokens from the GrantedAccessToken to access services
  6. ApiCharge validates tokens and enforces purchased quality-of-service parameters

This approach solves the fundamental problems of API monetization by batching multiple service invocations into a single payment while maintaining the flexibility of pay-as-you-use models.

{ "routeId": "premium-data", "issueUnixTimestamp": 1714318290, "validityEndUnixTimestamp": 1714321890, "serverFundsRecipient": "GA3RQ7FWMT6INHS2R4KEKWENPYQOPLRNPYDAJFFRY5AUSD2GP6VG3OPY", "microUnitPrice": 3000, "currency": "Stellar", "pricingStrategy": { "$type": "Basic", "duration": 300, "microUnitPrice": 3000 }, "rateLimiterStrategies": [ { "$type": "StreamRateDownload", "bytesPerSecond": 500000, "windowDurationInSeconds": 300 }, { "$type": "CallCount", "count": 20 } ] }

Example of a Route Quote structure defining service parameters

Rate Limiter Strategies

ApiCharge includes a sophisticated rate limiting system that enforces the quality-of-service guarantees specified in ApiCharge Subscriptions. These rate limiters not only define service tiers but also serve as security controls against resource exhaustion attacks.

🔢

Call Count

Limits the number of API calls per ApiCharge Subscription, ideal for metering access to valuable endpoints.

📊

Data Limits

Controls the total data transferred (upload or download) during the ApiCharge Subscription period.

🌊

Stream Rate

Regulates bandwidth (bytes per second) for streaming connections, perfect for media delivery or real-time data.

💳

Credit System

Implements a flexible credit-based system with dynamic consumption rates determined by the service provider.

These strategies can be combined to create sophisticated service tiers and pricing models tailored to specific use cases. The rate limiting is implemented in the ApiCharge middleware pipeline using custom stream wrappers that enforce limits across all supported protocols.

Our roadmap includes additional rate limiter strategies and pricing models to accommodate even more specialized use cases, such as time-of-day pricing, geographical pricing, and more sophisticated metering options for AI workloads and other emerging technologies.

Deployment Technologies

ApiCharge is designed for flexible deployment across a wide range of environments. The system can be deployed in several configurations:

  • Docker Container - All-in-one image containing ApiCharge and Stellar Soroban for simple deployment
  • Standalone Executable - Cross-platform binaries for Windows, Linux, macOS, and other operating systems
  • Clustered Deployment - Horizontal scaling with load balancer hints and Redis-based distributed rate limiting
  • Wrapped Services - Pre-packaged solutions combining ApiCharge with popular services like AI models, databases, and content management systems

The deployment process is simplified through comprehensive JSON configuration with hot-reload capability, allowing you to adjust service parameters without downtime.

Our product roadmap includes enhancements to deployment technologies, such as:

  • Infrastructure-as-Code templates for major cloud providers
  • Additional reverse proxy engines beyond YARP, including NGinx integration
  • Kubernetes operators for automated scaling and management
  • Expanded service wrapped image catalog for easy monetization of popular open-source systems

"ApiCharge's containerized deployment model allows it to integrate with virtually any existing infrastructure, whether you're running a traditional datacenter, cloud services, or edge computing environments."

StreamCharge: Consumer Applications

StreamCharge extends ApiCharge technology to end-users through native applications that handle payment and content consumption. These applications provide a seamless user experience while leveraging the power of the ApiCharge protocol behind the scenes.

StreamCharge applications include:

  • Mobile Apps - Native applications for iOS and Android for consuming paid content
  • Smart TV Apps - Media streaming applications for platforms like Samsung Tizen
  • Desktop Applications - Cross-platform .NET MAUI applications for Windows, macOS, and Linux

These applications are built using .NET with extensive cross-platform support. They include embedded non-custodial Stellar wallets that handle payment processing while shielding users from the complexity of the underlying payment technology.

The StreamCharge experience is designed to be frictionless, with users paying only for what they consume. Access is granted instantly upon payment, and charges stop automatically when content is no longer being accessed.

"While ApiCharge provides the infrastructure for service providers, StreamCharge represents the consumer-facing component of our ecosystem, bringing pay-as-you-use content consumption to mainstream audiences."

Autonomous Contract Technology

At the heart of ApiCharge is an autonomous, self-enforcing digital contract system that ensures all parties adhere to the agreed-upon terms without requiring mutual trust. This specialized contract mechanism acts as an independent third party that:

  • Verifies Quotes - Independently verifies that the service offering is legitimate and authorized
  • Processes Payments - Handles fund transfers directly without intermediaries
  • Creates Audit Trails - Maintains tamper-proof records of all transactions
  • Enforces Rules - Ensures neither party can circumvent the agreed terms

This approach creates a trust layer that eliminates the need for either the client or server to rely on the other's good faith. The autonomous nature of this contract makes it ideal for micropayment systems where traditional dispute resolution would be impractical due to the small transaction sizes.

By leveraging Stellar's low transaction fees and fast finality, ApiCharge makes micropayments economically viable at scales that were previously impossible with traditional payment processors.

Ready to Implement ApiCharge?

Get early access to ApiCharge and transform how you monetize your APIs and digital services.

Request Early Access