// the find
stripe/stripe-php
PHP library for the Stripe API.
The official Stripe PHP client library, maintained by Stripe engineering. It wraps the entire Stripe REST API and handles auth, retries, pagination, and webhook verification. If you're integrating Stripe payments into a PHP application, this is what you reach for.
Automatic retry with idempotency keys is built in — you call `setMaxNetworkRetries(2)` and the library handles the rest safely. The service-based API introduced in 7.33 (`$stripe->customers->create(...)`) is clean and discoverable, a significant improvement over the static class pattern. The webhook signature verification via `SignatureVerificationException` prevents replay attacks without you having to implement HMAC checks yourself. Per-request API key and Stripe-Account header overrides make Connect integrations (marketplaces, platforms) straightforward without juggling multiple client instances.
The library is entirely code-generated from Stripe's OpenAPI spec, which means the PHP type hints are shallow — most parameters are `array` with no structure, so your IDE can't tell you what fields are valid without reading docs. External contributions are currently on hiatus, so if you find a bug you're filing an issue and waiting. The legacy static API (`\Stripe\Customer::create()`) still works and documentation examples mix old and new patterns, which confuses people who copy-paste from Stack Overflow. PHP 7.2 is still technically supported despite being EOL since 2020, which means the library can't adopt modern PHP features like enums or named arguments that would make the API surface significantly cleaner.