Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sdk Laravel Package

openpay/sdk

Openpay PHP SDK offers a Composer-installable client for adding Openpay payments to PHP apps, including Laravel. Manage customers, cards, charges, subscriptions, payouts, and webhooks through secure API calls, with straightforward objects and sandbox support.

View on GitHub
Deep Wiki
Context7

Openpay PHP bindings

Frequently asked questions about Sdk
How do I install openpay/sdk in a Laravel application?
Install it with Composer using composer require openpay/sdk; the package is framework-agnostic and historically ships no auto-discovered service provider or facade, so registration is manual. Put your merchant ID, private key, and country in config/services.php backed by .env entries, then bind a client or adapter as a singleton in a service provider. Wrap the SDK behind your own PaymentGateway interface so only one class in your codebase references Openpay namespaces directly.
Does openpay/sdk support Laravel 10 or Laravel 11?
The package is a plain PHP client with historically no Laravel version constraints in composer.json, so it is not tied to any Laravel release. What actually matters is its PHP version constraint versus your runtime: Laravel 10 and 11 require PHP 8.1+, so confirm the 1.4.0 tag declares PHP 8.x support before upgrading. An outdated PHP requirement, not the framework version, is the usual blocker.
Is openpay/sdk a Laravel package with a service provider and facade?
No. Historically it provides no service provider, facade, publishable config, contract binding, or Laravel-specific tooling; it is a static factory API such as Openpay::getInstance($merchantId, $privateKey, $country) returning resource objects. Verify the 1.4.0 release in case that shape changed. If it is still static, treat any direct Openpay call inside a controller, job, or model as a design defect and isolate it in a single adapter class.
How do I create a charge with the Openpay PHP SDK?
Construct the client with your merchant ID, private key, and country, then use the returned charge resource to create a charge with amount, currency, description, and a card token, stored card, or customer reference. The SDK performs the REST call and returns an object you map into your own domain model. Generate an idempotency key yourself and apply your own timeout and retry policy, since the SDK does not provide one for you.
How can I test Openpay payments without charging real cards?
Use sandbox credentials — Openpay issues separate sandbox merchant IDs and private keys — and keep them in a dedicated .env that never reaches production or version control. Switch environments through configuration rather than code changes. Assert against your own adapter's behaviour instead of live API responses so tests stay deterministic and fast.
How do I mock openpay/sdk in Laravel tests?
Mocking the SDK directly is awkward because the historical entry point is a static factory with global state. Define your own PaymentGateway interface, implement it in one Openpay adapter, and bind it in the container so tests can substitute a fake. This also keeps gateway types out of controllers, jobs, and models. If 1.4.0 introduced instance-based clients, constructor injection makes substitution cleaner still.
Is openpay/sdk abandoned or still maintained?
Version 1.4.0 was published after a silence dating back to June 2020, which is a positive signal but not yet a maintained cadence. Before adopting, diff the last tag you trusted against 1.4.0, confirm the maintainer identity and publishing token were not compromised, and check that the package name, namespace, and license are unchanged. Two or three consecutive releases over a couple of quarters would justify lowering the risk rating.
Does openpay/sdk support PSR-18, Guzzle middleware, or automatic retries?
Historically the SDK ships its own curl-based HTTP layer rather than a PSR-18 or PSR-7 client, so it bypasses Laravel's Http facade, the retry helper, HTTP events, and your Guzzle middleware for tracing, logging, or circuit breaking. That leaves timeout, retry, and backoff policy as yours to build around the adapter. Re-check 1.4.0, because adopting PSR-18 would be the single most valuable change the release could contain.
How do I handle Openpay webhooks in Laravel?
Expose a route outside the auth middleware, verify the webhook signature and payload before trusting anything in it, then dispatch a queued job and return 200 quickly. Make processing idempotent by storing event IDs so retried deliveries cannot duplicate state changes. Map Openpay event and error codes into your own domain events at the adapter boundary rather than leaking gateway codes into application code.
Can openpay/sdk handle multiple merchants or countries in one application?
The client is constructed from a merchant ID, private key, and country triple, and the historical static factory holds that configuration globally, which does not suit multi-tenant applications. Decide early whether you need a per-tenant factory that resolves credentials from your tenant model instead of binding a single singleton. Keep credential resolution, PAN-redacted request and response logging, and error-code to exception mapping inside that adapter.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager