adyen/php-api-library
Official Adyen PHP API library for server-side integration with Adyen payments, subscriptions, payouts, and management APIs. Includes a typed client, request/response models, and helpers for configuring credentials, handling webhooks, and building secure payment flows in PHP applications.
Architecture fit
ServiceProvider, facade, config file, or publishable migration — the entire Laravel wiring is ours to build. That is normal for Adyen (unlike Stripe/Mollie ecosystem packages) and is the single biggest driver of effort.Adyen\Client is a stateful configuration object (API key, environment, merchant account, logger, timeout, and — as of v30.1.0 — Terminal API region), and Adyen\Service\* instances are constructed from it. This maps cleanly to a singleton Adyen\Client resolved from config('services.adyen.*') plus thin service wrappers.Client::setRegion() adds another piece of client-level state that affects outbound endpoint selection, and Client::retrieveCloudEndpoint() is now deprecated. For a singleton-bound client this is manageable, but it confirms the client must be treated as configuration, not as a per-request object with request-scoped settings applied to it.Adyen\HttpClient\ClientInterface remains the key extension point. It lets us inject a Guzzle-backed or instrumented client instead of the bundled cURL client — this is where we get middleware, tracing, and connection reuse that Laravel's Http facade would normally provide.Http::fake(), Http::retry(), and Http::macro() are unavailable. Testability must be designed in via the adapter layer, not inherited.Integration feasibility
composer require; requires PHP 8.x with ext-curl and ext-json. No framework coupling, so no version conflict with Laravel 10/11/12.adyen-sdk-automation repo. v30.1.0 is a textbook example: seven of the ten PRs are AdyenAutomationBot code-generation commits touching payments, paymentsapp, transaction webhooks, transfer webhooks, management webhooks, and a brand-new foreign exchange service. Upgrades arrive as very large, mostly mechanical diffs, and we cannot patch generated code (any local edit is lost on regeneration).Adyen\Service\ForeignExchange\RatesApi::calculate(), new models (NetworkReason, TransferDataTracing, TransferEventTracingData, UKFpsTracingData, USAchTracingData, SubMerchantData), and new enum values. None of this is required for an online Checkout integration, but it does mean the package's surface is broader than the average Laravel payment integration and the changelog is not a proxy for "what changed in my code path."adviceAuthorised and adviceRefused status values from Transfer Webhooks models and adds reversalReceived to Modification, TransferData, and TransferEvent. For a payments-only integration this is inert; for anything touching transfers/payouts it is a behaviour change in generated model constants.Technical risk
adyen-php-api-library) and the Composer package (adyen/php-api-library) still differ, and Adyen has shipped more than one PHP library generation. v30.1.0 confirms an active, semver-ish 30.x line with minor-version additive releases — that is the line to pin. Confirm it is the supported one and that security fixes land here.Adyen\Model\* directly will break. Mitigate by confining all Adyen types behind our own DTOs/adapter.Client::retrieveCloudEndpoint() is deprecated in v30.1.0. If Terminal API is in scope, schedule the migration to setRegion() before the next major; if Terminal API is out of scope, note it and move on. Either way, this is the pattern to expect: client-level methods get replaced across minor/major boundaries.squizlabs/php_codesniffer 4.0.1 → 4.0.2, CVE-2026-67434). That particular CVE does not affect our runtime — it is a vendor dev dependency — but it shows Renovate is active and that dev-tooling changes ride along in release notes. Read the PR list, not just the headline features.Key questions
setRegion() and interacts with that answer.Stack fit
Adyen\Client in a dedicated AdyenServiceProvider, sourced from config/adyen.php (.env-backed: API key, environment, merchant account, HMAC key, client key, timeout, logging toggle, and — if Terminal API is in scope — region).PaymentGateway interface with an AdyenGateway implementation. All application code depends on the interface and our own request/response DTOs; the Adyen SDK appears in exactly one namespace. This is the main hedge against generated-code churn (v30.1.0 alone touched six generated service families) and against a future provider change.HttpClient\ClientInterface wrapping Guzzle to get: shared connection pool, structured logging with payload redaction, tracing headers, and test doubles.Adyen\Client into queued jobs by serializing it — re-resolve from the container inside handle().setRegion() (or any other client setter) to application code. Resolve region from config at boot and fail fast on an unsupported value rather than letting AdyenException surface mid-request.Migration path
checkout->payments()) to map to typed generated services, and config setters to map to our config file. Amounts are minor units everywhere — centralize that conversion in one value object before migration, not during.30.x: v30.1.0 is additive for online Checkout. The upgrade itself is a composer bump plus a full payment-path regression; the real work is verifying no generated type you import changed shape. Contract tests around the adapter are what make this a half-day task instead of a sprint.Compatibility
Adyen\Client carries mutable state, and v30.1.0 added more (region). Ensure per-request state (idempotency key, merchant account override, logger context) is set per call, not on the shared singleton, and flush anything request-scoped in a middleware. setRegion() in particular should be set once at boot, never per request.ClientInterface.30.1.0) in composer.json with a documented bump procedure. Given the generated-code volume, ^30.1 is too loose.Sequencing
pspReference, async processing, idempotent state machine.setRegion() + deprecated retrieveCloudEndpoint() migration), transfers, or Foreign Exchange only if in scope.Maintenance
adyen-sdk-automation repository and the changelog to get early warning on template changes — that's where behaviour shifts originate. Filter the changelog by the product surface you actually use; most of any given release is irrelevant to a Checkout-only integration.retrieveCloudEndpoint() is the first entry; expect more client-level method replacements over time.Support
Scaling
Failure modes
/payments/details, and show the user a pending state.adviceAuthorised/adviceRefused in v30.1.0) and a switch/match in domain code silently falls through. Guard with typed handles and explicit default branches, and never reference Adyen\Model\* constants outside the adapter.AdyenException at the wrong time. Assert config on boot.Ramp-up
How can I help you explore Laravel packages today?