Download the PHP package m0d1xd/tap-company-sdk without Composer
On this page you can find all versions of the php package m0d1xd/tap-company-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package tap-company-sdk
Tap Company Laravel SDK
Full-platform Laravel SDK for the Tap Payments API.
Supports Laravel 12–13 and PHP 8.2+.
Disclaimer: This package is not an official product of Tap Company / Tap Payments, and is not affiliated with, endorsed by, or maintained by their developers. It is a personal, vibe-coded Laravel SDK built independently to provide a nicer developer experience on top of the public Tap Payments API. Use at your own risk; API behavior and docs may change without notice.
Installation
Publish the config:
Configuration
You can supply any Tap setting via .env, the published config file, or Tap::configure() in code. The SDK always reads config('tap.*') — env() is only a convenience default in the config file.
Environment variables
Copy .env.example into your Laravel app .env (or merge the TAP_* keys):
Request logging
Set TAP_LOGGING_ENABLED=true to write every outgoing API call and incoming webhook to storage/logs/tap.log via the dedicated tap log channel. Outgoing entries include method, URL, status, redacted headers, and the JSON body actually sent (so PaymentSource objects log as {"id":"src_kw.knet"}). Disable bodies with TAP_LOGGING_PAYLOADS=false (headers are still recorded), or point TAP_LOGGING_CHANNEL at another Laravel channel (e.g. stack) if you prefer.
Debugging requests
Set TAP_DEBUG=true to dump each outgoing request (redacted headers and JSON body) to the console or browser before it is sent. For a single call:
Tap::dd() is code-only — there is no env flag that can halt requests in production. Secrets such as the Bearer token are always redacted.
Published config
After php artisan vendor:publish --tag=tap-config, edit config/tap.php and set values directly if you prefer not to use .env:
Programmatic configuration
Set any option at runtime from a service provider (before the Tap client is first resolved):
Authentication uses Authorization: Bearer {secret_key} against Tap’s REST API.
Object examples
Full Tap request/response JSON samples (sourced from the official reference .md pages) live in docs/examples/ — charges, authorizations, refunds, customers, tokens, cards, invoices, intents, payouts, marketplace leads/businesses/merchants/destinations, files, disputes, connect, and webhooks.
Quick start — charge
Optional idempotency:
Typed payment sources
TapCompany\LaravelSdk\Data\PaymentSource gives you autocomplete instead of raw ['id' => 'src_...'] arrays. It implements Arrayable/JsonSerializable, so an instance can be dropped straight into the source key of any charge/authorization payload:
Available named constructors: card(), all(), applePay(), googlePay(), samsungPay(), knet(), mada(), stcPay(), fawry(), benefit(), benefitPay(), qpay(), omannet(), tabbyInstallment(), token(string $id), savedCard(string $id, bool $onFile = true), encryptedCard(string $encrypted, bool $onFile = false), or of(PaymentSourceId|string $id) for anything else. The full backing list of ids lives in the TapCompany\LaravelSdk\Enums\PaymentSourceId enum.
TapCompany\LaravelSdk\Enums\ChargeStatus mirrors the status values Tap returns on a charge (CAPTURED, DECLINED, INITIATED, ...) with isSuccessful()/isTerminal() helpers:
Authorize and capture
Refunds
Customers, tokens, and cards
Also available: createEncrypted(), createApplePay(), createSamsungPay(), createNetworkToken(), cards()->verify().
Invoices and intents (POS)
Marketplace / Connect
Retailer helpers: leads()->createRetailer(), updateRetailer(), convertToRetailer().
Files, payouts, disputes
Webhooks
Enable the package route with TAP_WEBHOOK_ENABLED=true (default path /tap/webhook). Full setup — configuration, registering post.url with Tap, events, and a custom controller — is in docs/webhooks.md.
The controller validates Tap’s hashstring HMAC and dispatches:
TapCompany\LaravelSdk\Events\TapWebhookReceivedChargeUpdated/AuthorizeUpdated/RefundUpdated/InvoiceUpdated/PayoutUpdated
Manual verification:
Available resources
| Accessor | Purpose |
|---|---|
Tap::charges() |
Create, retrieve, update, list, download |
Tap::authorizations() |
Authorize, update, capture, download |
Tap::refunds() |
Refunds |
Tap::customers() |
Customer CRUD |
Tap::tokens() |
Payment tokens |
Tap::cards() |
Saved cards + verify |
Tap::invoices() |
Invoices |
Tap::intents() |
POS intents |
Tap::payouts() |
Settlements |
Tap::leads() |
Marketplace leads |
Tap::connect() |
Connect onboarding URL |
Tap::businesses() |
Marketplace businesses |
Tap::merchants() |
Sub-merchants |
Tap::destinations() |
Split destinations |
Tap::files() |
File uploads |
Tap::disputes() |
Dispute downloads |
Testing
Use Tap test cards with sk_test_* keys.
Contributing
See CONTRIBUTING.md for Conventional Commits, PR titles, and the test workflow.
Releasing / Deploy
This library is published to Packagist as m0d1xd/tap-company-sdk. Versions are cut automatically from Conventional Commits on main via release-please; each GitHub Release triggers a Packagist sync workflow.
Integrate Packagist with GitHub Actions: add PACKAGIST_USERNAME and PACKAGIST_TOKEN secrets, then follow docs/deploy.md.
License
MIT
All versions of tap-company-sdk with dependencies
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/log Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0