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
Transbank Sdk

Transbank Sdk Laravel Package

transbank/transbank-sdk

Official PHP SDK for integrating Transbank payment services, including Webpay Plus, Oneclick Mall, Patpass, and full transaction flows. Provides REST/SOAP clients, configuration helpers, and ready-to-use classes for Laravel and PHP apps, simplifying payment initiation, confirmation, refunds, and sta...

View on GitHub
Deep Wiki
Context7

Código fuente Transbank SDK para PHP

Frequently asked questions about Transbank Sdk
How do I install transbank/transbank-sdk in a Laravel app?
Install it with Composer using composer require transbank/transbank-sdk. The package is framework-agnostic and requires Guzzle plus standard PHP JSON/cURL extensions, so there is no service provider to register. In Laravel, you typically bind its Options and credentials into a container singleton and inject that wrapper where you initiate payments.
Does transbank/transbank-sdk have a Laravel service provider or facade?
No. It is a thin, stateless HTTP client with no service provider, facade, or framework coupling, by design. That means it will not fight Laravel's container, but you must wire configuration and clients yourself. Treat it as a low-level transport and keep checkout flow, persistence, and reconciliation in your application.
Which Laravel and PHP versions are supported by transbank/transbank-sdk?
The SDK does not couple to a Laravel version; compatibility depends on the PHP constraint declared in its composer.json. Because it has no framework integration, it generally works on any Laravel release that satisfies that PHP requirement. Check the package's composer.json and release notes before upgrading majors.
How do I switch transbank/transbank-sdk between sandbox and production in Laravel?
The SDK supports simple sandbox/production environment switching through its configuration, typically via Options and credentials. In Laravel, keep those values in environment-specific config and bind them through container singletons rather than mutating global static state. This prevents sandbox credentials from leaking into production processes.
Is transbank/transbank-sdk safe for production payments?
It is an official first-party Transbank artifact under the permissive BSD-3-Clause license, and its hosted redirect flows keep card data off your servers, which lowers PCI scope. It does not solve payment-state ambiguity, double commits, or lost responses for you, so those need idempotency and reconciliation logic in your app. Pin the major version and budget for migrations, because Transbank has shipped breaking changes across major lines.
How can I test Webpay Plus and Oneclick in Laravel without real charges?
Configure the SDK against Transbank's sandbox environment with test credentials, and isolate that configuration in a container-bound singleton so tests can override it. Because the SDK is a transport, the cleanest tests fake your own payment service layer or HTTP boundary rather than the SDK internals. Keep sandbox and production credentials in separate env files to avoid accidental live charges.
What is MallBinInfo::queryBin in transbank-sdk 5.1.0?
MallBinInfo is a new class in 5.1.0 that exposes queryBin to retrieve card information for a card already registered under Oneclick Mall. It is a read-only lookup against stored Oneclick credentials and does not return PAN data, but it is cardholder-adjacent metadata. Treat the response as transient display or routing data, and avoid persisting it or letting it leak into logs and analytics.
Does transbank/transbank-sdk handle refunds, status queries, and webhooks?
The SDK provides classes for initiating, confirming, refunding, and querying status for supported products such as Webpay Plus, Oneclick, Patpass, and Transacción Completa. It does not provide webhook handling, persistence, checkout UI, or reconciliation, so those remain application responsibilities. Plan to build that layer yourself regardless of which SDK you choose.
How do I avoid wrong-environment charges with transbank-sdk static configuration?
The SDK's configuration is effectively static/global, so mutating it at runtime is the most common cause of wrong-environment charges in this ecosystem. Bind commerce code, API key, Options, and environment into container singletons and validate them at application boot. Never let a single process switch between sandbox and production credentials.
Is transbank/transbank-sdk maintained, and are there Laravel alternatives?
It is actively released, with 5.1.0 as an additive minor on the current major line following the June 2025 release, and it is the official first-party SDK. Low GitHub stars and Packagist dependents reflect direct installation rather than abandonment. Community Laravel wrappers exist and may add service providers or facades, but they add abstraction over a transport primitive; evaluate whether you want that trade-off.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
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