Async Stripe

Architecture & Crates

An overview of the modular crate ecosystem and feature flag system.

Unlike many API clients that bundle every possible resource into a single heavy compilation unit, async-stripe utilizes a modular workspace architecture. This approach significantly improves compile times and reduces binary bloat.

The Crate Ecosystem

The library is split into three layers:

  • Client Layer: The HTTP runtime and configuration
  • Shared Layer: Common types (IDs, Currency, Errors) used across resources
  • Resource Layer: Specific Stripe domains (Billing, Connect, Payments, etc.)

Available Crates

Crate NameDescription
async-stripeRequired. The core client entry point. Handles HTTP transport, authentication, and configuration.
async-stripe-billingSubscription logic: Invoices, Plans, Quotes, Subscriptions, Credit Notes, Billing Meters, and Portal.
async-stripe-checkoutStripe Checkout Sessions and related types.
async-stripe-connectConnect Accounts, capabilities, transfers, and external accounts.
async-stripe-coreFundamental resources: Customers, Charges, PaymentIntents, Refunds, Balance, Events.
async-stripe-fraudRadar fraud prevention: Early fraud warnings, value lists, and reviews.
async-stripe-issuingCard issuing: Authorizations, cards, cardholders, disputes, tokens, and transactions.
async-stripe-miscAdditional resources: Financial Connections, Identity, Tax, Reporting, Climate, and more.
async-stripe-paymentPayment methods: Cards, bank accounts, payment links, payment method configurations.
async-stripe-productProduct catalog: Products, prices, coupons, promotion codes, shipping rates, tax codes/rates.
async-stripe-terminalTerminal resources: Readers, locations, configurations, and connection tokens.
async-stripe-treasuryTreasury features: Financial accounts, transfers, payments, and transactions.
async-stripe-webhookUtilities for verifying and deserializing webhook events securely.

Feature Flags

To use specific resources, you must add the crate and enable the specific feature for the object you need. This granular control ensures you don't compile code for Stripe products you don't use.

[dependencies]
# The main client
async-stripe = { version = "1.0.0-alpha.8", features = ["runtime-tokio-hyper"] }

# Resource crates with specific objects enabled
stripe-core = { version = "1.0.0-alpha.8", features = ["customer", "balance"] }
stripe-billing = { version = "1.0.0-alpha.8", features = ["invoice", "subscription"] }
Have feedback? Let us know here