Stripe APIs
Learn about Stripe APIs.
Stripe provides a unified set of REST APIs, comprised of two namespaces, for accepting payments, managing billing and subscriptions, sending payouts, and building financial workflows. You can authenticate requests, shape responses, localize data, test integrations, and handle errors consistently across Stripe products.
Overview
Compare the API v1 and v2 namespaces
Learn about Stripe API v2, its response model, and how it compares to API v1.
Manage null API v2 responses
Request dependent values in a single response.
Rate limits
Understand throttling and throughput behavior.
Authentication and security
API keys
Authenticate requests with secret and restricted keys.
Manage secret API keys
Best practices for creating, rotating, and securing keys.
Specify request context
Pass account and idempotency context with requests.
Domains and IP addresses
Allowlist domains and IP ranges used by Stripe.
Make requests
Expand responses
Return nested objects in a single request.
Pagination
Iterate through large lists of resources.
Search objects
Look up objects in your Stripe data.
Testing and data
Metadata
Attach custom key-value pairs to objects.
Use cases
Common patterns for modeling data with metadata.
Automated testing
Test your application’s behavior and ability to handle errors.
Error handling
Error handling
Interpret errors and display them to users.
Advanced error handling
Work with low-level error details.
Error codes
Browse common error types and parameters.
