imdhemy/appstore-iap
Verify Apple App Store receipts and handle in-app purchases with imdhemy/appstore-iap. It validates receipts, parses App Store server notifications, and integrates with Laravel, letting you confirm purchases and subscriptions server-side without writing Apple's verification logic yourself.
Architecture fit
imdhemy/appstore-iap is a Composer-installable, framework-agnostic PHP library that models Apple In-App Purchase domain objects (receipts, transactions, server notifications) and abstracts calls to Apple's verification endpoints. That is a clean fit for a Laravel codebase: it can be consumed inside a service class or job without dictating application structure.ReceiptValidator / NotificationHandler interface so the vendor is swappable.Integration feasibility
composer require plus a thin service provider binding the client into the container is a day or two of work. Verify whether a first-party Laravel service provider/config publish exists; if not, we write ~50 lines of glue.originalTransactionId as the stable subscription identity, renewals, grace periods, billing retry, refunds/revocations, family sharing, and sandbox-vs-production environment handling (Apple returns status 21007 when a sandbox receipt hits the production endpoint)..p8 private key), sandbox toggle, and HTTP timeouts/retries. Secrets belong in the secret manager, never in .env committed or logs.Technical risk
verifyReceipt endpoint to the App Store Server API and Server Notifications V2 (JWS-signed payloads requiring certificate-chain verification). Confirm exactly which surfaces this version covers — legacy receipt validation only, or also Server API and V2 notifications. If it lags Apple, we either contribute upstream or maintain a fork, which changes the cost model materially.Key questions
verifyReceipt?21007/21008 environment fallback, or must our adapter orchestrate it?Stack fit
composer.json platform requirements first.Migration path
Compatibility
guzzlehttp/guzzle major, and illuminate/support version range. Guzzle major conflicts are the most common blocker in mature Laravel apps.environment field for routing decisions.Sequencing
Entitlement/Subscription models.Maintenance
Support
Scaling
Failure modes
21007/21008: environment mismatch — route to the correct endpoint, do not treat as invalid.Ramp-up
originalTransactionId vs transactionId, environment semantics, and notification types. Pair the integration with a written entitlement state machine so behavior is reviewable without reading library internals.How can I help you explore Laravel packages today?