How stripe/stripe-php works
Stripe PHP is an SDK for making Stripe API calls from PHP applications and working with the returned resources. The principal workflow is application → client/service → request construction and transport → Stripe API → response deserialization into resource objects. The library also supports webhook/event notifications and a broad set of API domains, including Checkout, billing, identity, issuing, and financial connections. The graph uses documented behavior and sampled/index evidence; unsampled domain implementations are represented at their existing directories, with uncertain links omitted.
Main entry points: BaseStripeClient.php Base Client · SessionService.php Checkout Service · StripeClient.php Stripe Client · ApiRequestor.php API Requestor
Components 19
Client and Services
- Stripe Client
lib/StripeClient.php - Base Client
lib/BaseStripeClient.php - Checkout Service
lib/Service/Checkout/SessionService.php - Service Base
lib/Service/AbstractService.php
Request Runtime
- API Requestor
lib/ApiRequestor.php - cURL Transport
lib/HttpClient/CurlClient.php - Response Conversion
lib/Util/Util.php
Stripe API Domains
- Checkout Sessions
lib/Checkout/Session.php - API Resources
lib/ApiResource.php - Billing Resources
lib/Billing - Identity Resources
lib/Identity - Issuing Resources
lib/Issuing - Financial Connections
lib/FinancialConnections
Events and Webhooks
- Notification Handler
lib/AbstractEventNotificationHandler.php - V2 Event Notification
lib/V2/Core/EventNotification.php - Webhook Payload
lib/Webhook.php - Unknown Notification
lib/Events/UnknownEventNotification.php
Other components
- PHP Application
- Stripe API
Connections 17
- PHP Application → Stripe Client: creates client
README.md - Stripe Client → Base Client: extends
lib/StripeClient.php - Stripe Client → Checkout Service: exposes service
- Checkout Service → Service Base: inherits
lib/Service/Checkout/SessionService.php - Service Base → Base Client: sends requests
lib/Service/AbstractService.php - PHP Application → Checkout Service: creates session
README.md - Checkout Service → Checkout Sessions: operates on
lib/Service/Checkout/SessionService.php - Base Client → API Requestor: issues request
lib/BaseStripeClient.php - API Requestor → Stripe API: sends API request
README.md - API Requestor → cURL Transport: uses transport
lib/ApiRequestor.php - Stripe API → Response Conversion: returns response
- Base Client → Response Conversion: deserializes response
lib/BaseStripeClient.php - Response Conversion → API Resources: constructs objects
lib/Util/Util.php - Base Client → Notification Handler: creates handler
lib/BaseStripeClient.php - Notification Handler → PHP Application: dispatches callbacks
- V2 Event Notification → Webhook Payload: parses payload
lib/V2/Core/EventNotification.php - V2 Event Notification → Unknown Notification: defaults to
lib/V2/Core/EventNotification.php