An introduction to the Stripe APIs: A Developer's Guide to Every API Surface

Stripe's API spans 500+ endpoints across Payments, Billing, Connect, Radar, Issuing, Treasury, and Tax. This guide breaks down each API surface, when to use it, and how Apideck's upcoming Stripe Billing connector fits into the accounting integration picture.

GJGJ

GJ

10 min read
An introduction to the Stripe APIs: A Developer's Guide to Every API Surface

Stripe processed $1.9 trillion in total payment volume in 2025. More than 300,000 businesses use Stripe Billing alone, managing close to 200 million active subscriptions. When your platform needs to connect to where money actually flows, Stripe is usually the first integration your customers request.

But Stripe's API surface is large. Over 500 endpoints across two namespaces (v1 and v2), covering one-time card charges, multi-party marketplace payouts, subscription billing, fraud detection, card issuing, treasury services, and tax compliance. Picking the right API for your use case saves you weeks. This guide covers each major surface, when to reach for it, and how the pieces connect.

The Core Payments API

Most Stripe integrations start here. The central object is the PaymentIntent, which represents a single attempt to collect money from a customer. You create one with an amount and currency, attach a payment method, confirm it, and Stripe handles card network routing, 3D Secure authentication, retry logic, and settlement.

curl https://api.stripe.com/v1/payment_intents \
  -u sk_test_your_key: \
  -d amount=2000 \
  -d currency=usd \
  -d payment_method=pm_card_visa \
  -d confirm=true

The Payments API supports over 100 payment methods across 135+ currencies: cards, bank debits (ACH, SEPA), wallets (Apple Pay, Google Pay), and buy-now-pay-later options like Klarna and Affirm. For most SaaS platforms and e-commerce businesses, this is the only API you need to accept money.

Related endpoints include SetupIntents (saving payment methods without charging) and Refunds. There is also the older Charges API, which still works but lacks support for SCA requirements in Europe and newer payment methods. If you are starting a new integration, use PaymentIntents. Stripe has been steering developers toward this model since 2019, and their llms.txt instructions section now explicitly tells AI coding assistants to do the same.

Stripe Billing: Subscriptions and Invoices

Stripe Billing is the revenue engine for SaaS companies. It manages the full lifecycle of recurring payments: creating subscriptions, generating invoices, handling prorations on plan changes, managing trials, and collecting failed payments automatically.

The core objects are Product, Price, Subscription, and Invoice. A Product describes what you sell. A Price attaches a billing interval and amount to that product. A Subscription ties a customer to one or more prices and tells Stripe when to bill them. Invoices are generated automatically at each billing cycle.

The complexity Billing handles would take months to build yourself. When a customer on a $100/month plan upgrades to $200/month halfway through a billing cycle, Stripe calculates the prorated amount, generates the right invoice line items, and charges the difference. Subscription schedules let you model phased pricing, free trials that convert to paid plans, and multi-interval billing where different line items renew on different cadences.

Usage-based billing is another major capability. Stripe Billing supports metered pricing where you report usage throughout a billing period and Stripe calculates the total at invoice time. This model is common among AI and infrastructure companies that charge per API call, per token, or per compute hour. Anthropic, OpenAI, Cursor, and Midjourney all run on Stripe Billing.

At Stripe Sessions 2025, the company announced Scripts and Workflows: two extensibility primitives that turn Billing into a programmable revenue engine. Scripts let you inject custom business logic into specific API objects. Workflows let you orchestrate multi-step flows across Stripe products using conditional logic. These signal that Stripe views Billing as a platform in its own right.

For teams that need to sync Stripe Billing data with accounting platforms (QuickBooks, Xero, NetSuite, Sage), Apideck is building a dedicated Stripe Billing connector. This will pull subscription, invoice, and payment data from Stripe through Apideck's Unified Accounting API alongside 20+ other accounting platforms, using a single integration.

Connect: Platforms and Marketplaces

Connect is Stripe's API for multi-party money movement. If your platform collects payments from customers and splits the proceeds among sellers, service providers, or other third parties, Connect handles funds flow, onboarding, compliance, and payouts.

The API introduces connected accounts. Each seller or provider on your platform gets a Stripe account, and Connect manages the relationship between your platform account and theirs. Three charge models are available: direct charges (the connected account is the merchant of record), destination charges (you collect payment and route funds to a connected account), and separate charges and transfers (you collect payment and transfer funds manually).

Connect also handles KYC verification, tax form generation (1099s in the US), and payout scheduling. Platforms like Shopify, DoorDash, Lyft, and Airbnb run on Connect. The API supports payouts to bank accounts in 118+ countries, instant payouts for eligible accounts, and cross-border payments in local currencies.

If you are building a vertical SaaS platform or marketplace, Connect is likely the most complex Stripe integration you will encounter. The onboarding flows alone require careful planning around what information to collect, when to verify it, and how to handle incomplete applications or failed identity checks.

Stripe Connect API

Radar: Fraud Prevention

Radar is Stripe's machine learning fraud detection system. It runs on every payment processed through Stripe and assigns a risk score based on signals from the broader Stripe network. During Black Friday/Cyber Monday 2024, Radar blocked 20.9 million fraudulent transactions worth $917 million.

For most businesses, Radar works out of the box. You can also write custom rules using Stripe's rule language to block or review payments based on transaction amount, country of origin, velocity patterns, or metadata values. Radar for Fraud Teams adds manual review queues and more granular controls.

Risk scores are exposed through the Charge and PaymentIntent objects. You can feed Radar scores into your own fraud models via the API, which is useful if you run a multi-processor setup or have an in-house fraud team.

Issuing and Treasury

Stripe Issuing lets you create, manage, and distribute virtual and physical payment cards programmatically. The typical use case is corporate expense cards, fleet cards, or rewards cards embedded in your platform. You create a cardholder, issue a card, set spending controls, and receive real-time authorization webhooks when the card is used.

Treasury provides banking-as-a-service infrastructure: FDIC-insured financial accounts, ACH and wire transfers, and the ability to hold, send, and receive funds. Together, Issuing and Treasury let platforms offer embedded financial products (branded debit cards, business checking accounts inside your SaaS product) without becoming a bank.

Both APIs require additional onboarding with Stripe and typically involve partnerships with underlying bank partners like Evolve Bank or Cross River Bank.

Tax, Sigma, and Data Pipeline

Stripe Tax automates sales tax, VAT, and GST calculation and collection across 102 countries. Since Sessions 2025, it also handles registration and filing, making it a full-cycle tax compliance product. The API integrates with Checkout, Billing, and Invoicing, so you can enable tax collection by adding a single parameter to existing API calls.

Sigma provides a SQL interface for querying your Stripe data directly inside the Dashboard. Data Pipeline exports your Stripe data to external data warehouses (Snowflake, Redshift, BigQuery) on a scheduled basis. Both are useful for finance teams building custom reports, reconciliation workflows, or data models that combine Stripe data with other business data.

Stripe Is Investing Heavily in Agent Experience

Stripe is one of the few API companies that has recognized a shift in who (or what) consumes its APIs. A growing share of Stripe integration code is now written by AI coding assistants, and Stripe is actively building infrastructure to make those interactions better. The company calls this agent experience, or AX, a discipline parallel to developer experience but optimized for autonomous consumers.

The investments span multiple layers. Stripe hosts an official MCP server at mcp.stripe.com, giving AI agents direct, OAuth-secured access to Stripe's API. The @stripe/agent-toolkit provides function-calling integrations for LangChain, OpenAI's Agent SDK, CrewAI, and Vercel's AI SDK in both Python and TypeScript. Stripe also publishes OpenAPI specifications covering both v1 and v2 namespaces in a single file, which helps code generation tools and agent frameworks understand the full API surface.

The most distinctive piece is Stripe's llms.txt instructions section. Buried inside docs.stripe.com/llms.txt is a set of explicit instructions telling AI coding assistants to always use the Checkout Sessions API over the legacy Charges API, to default to the latest stable SDK version, and to never recommend the legacy Card Element or Sources API. No other API company has shipped anything like this. It is Stripe programming the behavior of every AI coding assistant that fetches that file before helping a developer integrate payments.

Stripe engineer Ian McCrystal said publicly that he expects AI tools to eventually become the predominant readers of Stripe's documentation. The company is building for that future now. Every docs page is available as clean Markdown (append .md to any URL), there are three separate llms.txt files across two domains, and the agent toolkit ships with granular permission controls via Restricted API Keys.

We wrote a deeper analysis of Stripe's llms.txt approach and what it means for other API companies. If you run an API, that post is worth reading.

API Design and Versioning

Stripe's API follows a REST design with form-encoded request bodies and JSON responses. Authentication uses secret API keys passed via HTTP Basic Auth. Every object has a consistent structure: an id, an object type field, and a metadata hash for attaching your own key-value pairs.

The API uses a rolling versioning model with named releases. The current major release is Clover (2025-09-30), following Basil and Acacia. Each major release can include breaking changes. Monthly releases within a major version are additive and backwards-compatible. You pin your integration to a specific version using the Stripe-Version header or your SDK version.

The v2 namespace (/v2/) introduces improved idempotency handling, thin events (lightweight webhooks containing only essential data rather than full object snapshots), and a clearer include parameter for requesting additional fields. You can mix v1 and v2 endpoints in the same integration.

Webhooks are essential for any production Stripe integration. Stripe sends events to your configured endpoints when objects change state. For billing, you will typically listen for invoice.paid, invoice.payment_failed, customer.subscription.updated, and customer.subscription.deleted. For payments, payment_intent.succeeded and payment_intent.payment_failed are the critical ones. The v2 thin event format reduces payload size and avoids the stale-snapshot problem from earlier webhook implementations.

Where Apideck Fits: Connecting Stripe Billing to the Accounting Stack

Most businesses that use Stripe Billing also use an accounting platform. Invoices generated in Stripe need to appear in the general ledger. Subscription revenue needs to be recognized correctly. Payments need to reconcile against bank transactions.

Building a direct integration between Stripe and a single accounting platform is straightforward. Building integrations between Stripe and QuickBooks and Xero and NetSuite and Sage Intacct and FreshBooks is a different problem. Each platform has its own API, authentication scheme, data model, and rate limits. Maintaining five or six of these in parallel is a full-time job for an engineering team.

This is the problem Apideck's Unified Accounting API solves. One integration, 20+ accounting platforms, normalized data models, and managed authentication. For teams building accounting integrations, it cuts months of development work down to days.

We are adding a Stripe Billing connector to bring subscription, invoice, and payment data from Stripe into the same unified schema that already covers QuickBooks, Xero, NetSuite, Sage, and the rest of the accounting ecosystem. If your platform needs to sync billing data across providers, or your customers use Stripe Billing alongside traditional accounting software, this connector simplifies that connection.

Getting Started

If you are evaluating a Stripe integration, start by identifying which API surface you actually need. For one-time payments, the Payments API is sufficient. For recurring billing, add Stripe Billing. For marketplaces and platforms, add Connect. Layer in Radar, Tax, Issuing, or Treasury based on your specific requirements.

Stripe's developer documentation at docs.stripe.com is among the best in the industry. The API reference includes runnable examples, test mode keys, and client libraries in seven languages. Their Discord server has active Stripe engineers answering technical questions.

For teams that need Stripe Billing data flowing into their accounting stack alongside other platforms, get started with Apideck and keep an eye on the Stripe Billing connector launch.

Ready to get started?

Scale your integration strategy and deliver the integrations your customers need in record time.

Ready to get started?
Talk to an expert

Trusted by fast-moving product & engineering teams

JobNimbus
Blue Zinc
Drata
Octa
Nmbrs
Apideck Blog

Insights, guides, and updates from Apideck

Discover company news, API insights, and expert blog posts. Explore practical integration guides and tech articles to make the most of Apideck's platform.