How money moves
Follow a payment from PaymentIntent to Charge, balance transaction, balance, and payout, including declines, refunds, and disputes.
Authentication
Choose a Stripe key type, send it safely, scope it down, and rotate it without breaking production.
Idempotent requests
Send an idempotency key so a retried POST returns the original result instead of creating a duplicate charge.
Errors and retries
Read the Stripe error envelope, separate retryable failures from permanent ones, and retry with backoff and an idempotency key.
Pagination
Walk a Stripe list endpoint with cursor pagination, filter server-side, and avoid the page-shift bugs that break offset-based clients.
Expansion and metadata
Replace an object ID with the full nested object using expand, and attach your own identifiers with metadata.
Versioning
Pin a Stripe API version per account or per request, test an upgrade safely, and keep response parsing forward compatible.
Test mode
Exercise every payment path with Stripe test mode, the card numbers that trigger each outcome, and a checklist before you switch to live keys.