- How do I install adyen/php-api-library in a Laravel application?
- Install it with composer require adyen/php-api-library. The package requires PHP 8.x with the ext-curl and ext-json extensions enabled. Because it has no framework coupling, it installs cleanly alongside Laravel 10, 11, or 12 without version conflicts.
- Is there a Laravel service provider or config file for the Adyen PHP library?
- No. This is a vendor SDK, not a Laravel package, so there is no ServiceProvider, facade, publishable config, or migration. You build the Laravel wiring yourself, typically by binding Adyen\Client as a singleton resolved from config('services.adyen.*') and adding thin service wrappers around Adyen\Service\* classes.
- Which Laravel and PHP versions does adyen/php-api-library support?
- The library requires PHP 8.x with ext-curl and ext-json, and since it is not framework-coupled it works with Laravel 10, 11, and 12. Pin the 30.x line, which is the active semver-style release train with additive minor versions. Confirm on the repository that this is the supported generation receiving security fixes, since Adyen has shipped more than one PHP library generation.
- How should I configure Adyen\Client credentials in Laravel?
- Treat Adyen\Client as a configuration object, not a per-request service. Set the API key, environment, merchant account, logger, timeout, and Terminal API region via setRegion() in one place, then bind that configured instance as a singleton and inject it into your service wrappers. Note that retrieveCloudEndpoint() is deprecated as of v30.1.0, so prefer setRegion() for endpoint selection.
- How do I test Adyen API calls in Laravel without hitting the live API?
- The library uses its own cURL-based HTTP layer, so Laravel's Http::fake(), Http::retry(), and Http::macro() do not apply. The supported extension point is Adyen\HttpClient\ClientInterface, which lets you inject a Guzzle-backed or instrumented client for stubbing, tracing, and connection reuse. Design testability into your adapter layer rather than expecting it to be inherited.
- How do I verify Adyen webhook HMAC signatures in Laravel?
- The library provides HMAC signature verification primitives, but it does not ship an opinionated webhook flow. You own the route, CSRF exclusion in VerifyCsrfToken or the bootstrap exception list, the raw-body handling, and the verification call before any state change. Always verify against the raw request body before parsing or persisting anything.
- How do I handle Adyen webhook idempotency and duplicate notifications in Laravel?
- Idempotency support is a primitive, not a built-in flow, so you must implement the dedupe store and state machine yourself. Key processed events on a combination such as pspReference plus eventCode, persist them in a unique-indexed table or cache lock, and return a 200 quickly while queueing the actual processing. This keeps retries from Adyen from double-crediting orders.
- Can I use Adyen Drop-in or Components with a Laravel backend?
- Yes, but plan for two integration surfaces. Adyen Web (Drop-in or Components) is loaded separately from a CDN or npm and configured with a client key plus allowed origins, and this package only handles the server-side API calls. Your Laravel app issues the session or paymentMethods request that the front end consumes.
- Is adyen/php-api-library safe to upgrade between minor versions?
- Mostly, but the changelog is not a reliable proxy for what changed in your code path. Services and models are generated from Adyen's OpenAPI specs, so minor releases arrive as very large mechanical diffs that rename, add, and remove model constants and enum values, including webhook status values. Never patch generated code because local edits are lost on regeneration, and pin the minor version while reviewing diffs that touch only your integration.
- Should I use adyen/php-api-library or a Laravel-specific Adyen wrapper package?
- The official vendor SDK gives you the newest features first but leaves all Laravel wiring, configuration, and testing adapters to you. A Laravel-specific wrapper can supply the service provider, config file, and facades, at the cost of an extra dependency that may lag behind SDK releases and generated model changes. For payment-critical code where you need control over HTTP client behaviour and webhook handling, the vendor SDK plus your own thin adapter is usually the safer choice.