Menu

ApiCharge Glossary

This glossary defines the key terms and concepts used throughout the ApiCharge documentation and system.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

A

Access Token

A cryptographically signed credential that grants access to a specific API route with defined quality of service parameters for a specific duration. Access tokens are issued after a successful purchase and are presented with each request to the protected service.

ApiCharge

A reverse proxy with built-in micropayments technology that enables API monetization through ApiCharge Subscriptions. ApiCharge sits between clients and backend services, handling quotes, payment verification, and rate limiting.

ApiChargeExceptionFactory

A centralized error handling component in ApiCharge that creates standardized error responses with localized messages based on error codes.

ApiChargeConfigProvider

A service that manages and provides access to ApiCharge configuration settings throughout the application.

B

Bandwidth Throttling

The process of controlling the data transfer rate for streaming connections using StreamRate rate limiters to enforce quality of service parameters.

Backend Service

The actual API or service that ApiCharge proxies requests to after validating access tokens and enforcing rate limits.

C

Call Count

A rate limiter type that restricts the total number of API calls a client can make during an ApiCharge Subscription. Each request counts as one call against this limit.

Clustered Deployment

A deployment configuration where multiple ApiCharge instances work together to provide scalability and high availability. Requires Redis for distributed state management.

Client

The application or system that consumes APIs through ApiCharge. Clients request quotes, purchase ApiCharge Subscriptions, and use access tokens to access services.

Credit

A flexible rate limiter type that implements a credit-based consumption model for APIs with variable resource costs per call.

D

Data Limit

A rate limiter type that restricts the total amount of data (in bytes) that can be transferred during an ApiCharge Subscription, with separate limits for upload and download.

DataLimitDownload

A specific type of rate limiter that controls the total amount of data that can be downloaded from the API during an ApiCharge Subscription.

DataLimitUpload

A specific type of rate limiter that controls the total amount of data that can be uploaded to the API during an ApiCharge Subscription.

Docker Container

A lightweight, standalone, executable software package that includes everything needed to run ApiCharge, including code, runtime, system tools, libraries, and settings.

Duration

The time period for which an ApiCharge Subscription grants access to a service, specified in seconds. After this period expires, the access token is no longer valid.

E

ED25519

The cryptographic signature algorithm used by ApiCharge and Stellar to securely sign and verify quotes, tokens, and transactions.

Environment Variable

A dynamic-named value that can affect the way running processes behave. ApiCharge uses environment variables for sensitive configuration like signing keys.

G

GlobalSettings

The configuration section in ApiCharge that defines core service parameters such as network type, contract IDs, and clock skew tolerances.

gRPC

A high-performance, open-source universal RPC framework that ApiCharge can proxy and monetize, alongside standard HTTP APIs.

H

HTTP Status Code

A standard response code issued by a server in response to a client's request. ApiCharge uses status codes like 401 (Unauthorized), 402 (Payment Required), and 429 (Too Many Requests) to indicate different error conditions.

K

Kestrel

The cross-platform web server built into ASP.NET Core that ApiCharge uses to listen for incoming requests. Configured in the Kestrel section of appsettings.json.

KeyPair

A pair of cryptographic keys (public and private) used for signing and verifying data in the ApiCharge protocol. Based on Stellar's ED25519 implementation.

L

Load Balancing

The process of distributing network traffic across multiple servers to ensure reliability and availability. ApiCharge supports various load balancing policies for clustered deployments.

M

Middleware

Software components that process HTTP requests and responses in the ASP.NET Core pipeline. ApiCharge uses middleware for rate limiting, token validation, and other protocol functions.

Micropayment

A financial transaction involving a small sum of money, typically too small for traditional payment methods. ApiCharge enables micropayments as low as 0.25 cents through Stellar blockchain integration.

N

ApiCharge Subscription

A time-bound grant of access to a specific API route with clearly defined quality of service parameters. The core monetization concept in ApiCharge, combining the flexibility of micropayments with the predictability of subscriptions, offering unprecedented pricing control.

NanosubscriptionRateLimiter

The component in ApiCharge that enforces rate limiting policies according to the parameters defined in an ApiCharge Subscription.

NanosubscriptionRateLimitingMiddleware

The ASP.NET Core middleware that validates access tokens and applies rate limiting to incoming requests based on the ApiCharge Subscription parameters.

NetworkUsage

A record of how much network resources (calls, bytes sent/received) have been consumed by a client during an ApiCharge Subscription.

Nonce

A random number used once in cryptographic protocols to prevent replay attacks. ApiCharge includes nonces in tokens and signatures.

P

Permit

A unit of consumption tracked by rate limiters. Different rate limiter types define permits differently (e.g., one call, one byte, one credit).

Purchase Instruction

A set of data returned by the ApiCharge server that contains the necessary information for a client to complete an ApiCharge Subscriptions purchase via the Stellar blockchain.

PricingStrategy

A model that defines how services are priced in ApiCharge. The basic pricing strategy uses fixed price quotes for specific durations and quality of service parameters.

Proxied Route

A configuration in ApiCharge that defines a mapping between a client-facing URL path pattern and a backend service endpoint.

Q

Quality of Service (QoS)

The overall performance of a service, particularly the performance seen by users. In ApiCharge, quality of service is defined by rate limiters attached to ApiCharge Subscriptions.

Quote

A digitally signed offer for access to a specific route with defined quality of service parameters at a specified price. Quotes have a limited validity period and are the first step in the purchase process.

QuoteValidityDuration

The time period for which a quote remains valid after being issued. After this period, clients must request a new quote.

R

Rate Limiter

A mechanism that enforces quality of service parameters for ApiCharge Subscriptions. ApiCharge supports several rate limiter types including CallCount, DataLimit, StreamRate, and Credit.

RateLimiterPersistenceService

A background service in ApiCharge that periodically saves rate limiter state to disk or Redis to ensure persistence across restarts and in clustered environments.

Redis

An in-memory data structure store used by ApiCharge for distributed caching and rate limiter state persistence in clustered deployments.

Reverse Proxy

A server that sits between client devices and backend servers, forwarding client requests to servers and returning server responses to clients. ApiCharge is built on YARP, a .NET reverse proxy framework.

Route

A configuration that defines how incoming requests are matched and forwarded to backend services in ApiCharge. Each route has a unique identifier that is referenced in quotes and access tokens.

RouteMatch

The criteria used to determine which incoming requests match a particular route, based on path patterns, host headers, or other HTTP properties.

RouteQuote

A specific quote for access to a particular route, including the route ID, duration, price, and rate limiter parameters.

S

ScaleOut

A configuration that defines how ApiCharge instances coordinate in a clustered deployment to provide horizontal scaling.

Server-Sent Events (SSE)

A server push technology enabling a client to receive automatic updates from a server via an HTTP connection. ApiCharge supports SSE for real-time data streaming.

SignableEntity

A base class for objects that can be cryptographically signed in the ApiCharge protocol, such as quotes and access tokens.

Signature

A cryptographic proof that a message or data was created by a known sender (the signer) and has not been modified in transit. ApiCharge uses ED25519 signatures for quotes, tokens, and transactions.

Soroban

The smart contract platform built on the Stellar blockchain, used by ApiCharge for secure, low-cost micropayments.

SorobanServer

The RPC server that provides access to the Soroban smart contract platform. ApiCharge connects to this server for blockchain operations.

Stellar

An open-source, decentralized blockchain network designed to facilitate fast, low-cost cross-border transactions. ApiCharge uses Stellar for secure micropayments.

StreamRate

A rate limiter type that controls bandwidth (bytes per second) for streaming connections like WebSockets, SSE, or media streams.

MicroUnitPrice

The pricing unit used in ApiCharge, representing a small fraction (0.0000001) of the Stellar lumen (XLM) cryptocurrency. All prices in ApiCharge are specified in MicroUnitPrice for precise payment calculation.

T

ToleratedClockSkew

The maximum allowed difference between server and client clocks when validating timestamps in quotes and tokens.

Transaction

An operation on the Stellar blockchain. In ApiCharge, purchases are executed as blockchain transactions.

W

WebSocket

A communication protocol that provides full-duplex communication channels over a single TCP connection. ApiCharge supports WebSockets for bidirectional communication.

Y

YARP (Yet Another Reverse Proxy)

A .NET library for building high-performance reverse proxy servers. ApiCharge is built on top of YARP, extending it with monetization capabilities.

X

XLM (Lumen)

The native cryptocurrency of the Stellar network, used for transactions in ApiCharge. Prices are specified in MicroUnitPrice (0.0000001 XLM).