Skip to content

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

PageWhat you'll learn
Development SetupInstall the Stripe CLI and server-side SDK
API TourHow Stripe API objects fit together
TestingSimulate payments in sandbox mode
Go-Live ChecklistEverything to verify before accepting real payments
SDKsOfficial libraries for every platform
DashboardNavigate and use the Stripe Dashboard
SecurityPCI 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_method to succeeded)
  • 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
}

Stripe API Reference - Self-contained docs reference, refreshed 2026-05-18