What it covers
A mature payments and billing API covering checkout, payment intents, subscriptions, invoicing, and platforms. The profile stays deliberately concise: use the linked official reference for endpoint schemas and current commercial terms.
Integration notes
Authenticate exactly as the provider documents, keep credentials out of client bundles, and retain upstream request identifiers when available. Pagination, retries, caching, and webhook verification should be implemented per product rather than inferred from another API.
Key endpoints
| Endpoint | Description |
|---|---|
POST /v1/customers |
Create customer |
GET /v1/customers/{id} |
Customer details |
POST /v1/payment_intents |
Create payment intent |
GET /v1/charges |
List charges |
POST /v1/refunds |
Create refund |
GET /v1/invoices |
List invoices |
POST /v1/subscriptions |
Create subscription |
GET /v1/balance |
Account balance |
Decision notes
Best suited to online payments and billing and marketplace and platform payments. Before production, verify verify webhook signatures. use idempotency keys for safely retried writes. Mutable limits, prices, and versions were checked on 2026-09-13 and should be rechecked at purchase or deployment time.
Python example: customers and charges (test mode)
import httpx
from httpx import BasicAuth
SECRET_KEY = "sk_test_your_key" # TEST key — never use live keys in code samples
BASE = "https://api.stripe.com/v1"
def create_customer(email: str, name: str | None = None) -> dict:
"""Create a customer. Stripe uses form-encoded bodies with basic auth."""
data = {"email": email}
if name:
data["name"] = name
resp = httpx.post(
f"{BASE}/customers", auth=BasicAuth(SECRET_KEY, ""), data=data, timeout=30
)
resp.raise_for_status()
return resp.json()
def list_charges(limit: int = 10) -> list[dict]:
resp = httpx.get(
f"{BASE}/charges", auth=BasicAuth(SECRET_KEY, ""), params={"limit": limit}, timeout=30
)
resp.raise_for_status()
return resp.json()["data"]
customer = create_customer("dev@example.com", "Dev Example")
print("created:", customer["id"])
Notes:
- Secret key goes in HTTP Basic auth username (password empty) — not a Bearer header
- Request bodies are
application/x-www-form-urlencoded, not JSON - Always develop against
sk_test_*keys; live keys startsk_live_* - Idempotency: send
Idempotency-Keyheader on POSTs to safely retry - Use the official
stripeSDK in production — it handles retries, pagination, and webhooks
Integration surface
- Versioning
- Account or request API version controls response behavior
- Resource groups
- Customers, PaymentIntents, Checkout, Subscriptions, Invoices, Connect
- Pagination
- Cursor pagination with starting_after or ending_before
- Errors
- Structured Stripe error object and request ID
- Webhooks
- Signed webhooks for asynchronous events
- Official SDKs
- Node.js, Python, Ruby, PHP, Java, .NET, Go