Getting Started Fresh
Start building with Stripe. This section covers environment setup, the API fundamentals, testing your integration, and everything you need before going live.
In this section
| Page | What you'll learn |
|---|---|
| Development Setup | Install the Stripe CLI and server-side SDK |
| API Tour | How Stripe API objects fit together |
| Testing | Simulate payments in sandbox mode |
| Go-Live Checklist | Everything to verify before accepting real payments |
| SDKs | Official libraries for every platform |
| Dashboard | Navigate and use the Stripe Dashboard |
| Security | PCI compliance and TLS requirements |
Quick orientation
Stripe's API is organized around REST. The API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Key concepts before you build:
- Every Stripe resource is an object — PaymentIntent, Customer, Subscription, Invoice, etc.
- Objects track state over time (e.g., a PaymentIntent moves from
requires_payment_methodtosucceeded) - Your server communicates with Stripe using your secret API key — never expose it on the client
- Your frontend uses the publishable key and Stripe.js to collect payment details securely
- Webhooks let Stripe notify your server when asynchronous events complete
Authentication
All API requests use your secret key in an HTTP Basic Auth header:
bash
curl https://api.stripe.com/v1/charges \
-u sk_test_YOUR_KEY:Note the trailing colon — the password field is intentionally empty.
Base URL
All API calls go to:
https://api.stripe.com/v1/Request and response format
Requests use application/x-www-form-urlencoded encoding. Responses are always JSON.
bash
curl https://api.stripe.com/v1/customers \
-u sk_test_YOUR_KEY: \
-d email="customer@example.com" \
-d name="Mike Smith"Response:
json
{
"id": "cus_ABC123",
"object": "customer",
"email": "customer@example.com",
"name": "Mike Smith",
"created": 1700000000
}