Download the PHP package codearachnid/check-commerce-php-sdk without Composer
On this page you can find all versions of the php package codearachnid/check-commerce-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codearachnid/check-commerce-php-sdk
More information about codearachnid/check-commerce-php-sdk
Files in codearachnid/check-commerce-php-sdk
Package check-commerce-php-sdk
Short Description PHP SDK for the Check Commerce (OBP Link) API — ACH, RTP, paper check and IAT payments, consumers, subscriptions, hosted payment pages and merchant boarding.
License MIT
Informations about the package check-commerce-php-sdk
Check Commerce PHP SDK
A modern PHP SDK for the Check Commerce (OBP Link) API — ACH, RTP, paper check and IAT payments, stored consumers, recurring subscriptions, hosted payment pages, batch processing and merchant boarding.
- Typed end to end — native enums for payment types, transaction statuses and schedules; immutable response objects with real properties.
- Zero-friction auth — bearer tokens are acquired, cached and refreshed automatically; pluggable token storage for sharing tokens across processes.
- Safe retries — exponential backoff with jitter for rate limits, server errors and network failures, applied only where a retry cannot double-charge.
- Rich errors — every API failure maps to a typed exception carrying the error code, detail, correlation id and per-field validation errors.
- Framework agnostic — ships with Guzzle, accepts any PSR-18 client; no framework required.
- Forward compatible — new API fields and enum values never break the SDK; everything stays reachable through the raw payload.
Requirements
- PHP 8.1+
Installation
Guzzle is installed as the default HTTP client; any other PSR-18 client can be injected instead.
Quick start
Or configure entirely from the environment:
The environment defaults to production; every option is documented on Configuration::fromArray():
Authentication
You never call the authentication endpoint yourself. The first API call requests a bearer token, caches it, refreshes it shortly before expiry, and transparently re-authenticates once if the API rejects a token mid-flight.
By default tokens live in memory for the current process. For long-running or multi-process apps, supply a shared store:
Transactions
Consumers
Store consumer bank details once, then reference them by id in transactions and subscriptions:
List endpoints return one page plus lazy access to the rest — autoPagingIterator() streams every record and fetches pages on demand:
Subscriptions
Hosted payment pages
Batches
Merchant boarding
Error handling
Every SDK exception implements CheckCommerce\Exception\CheckCommerceException; API errors map to a typed hierarchy:
| Exception | When |
|---|---|
ValidationException |
400/422 — invalid request, has per-field errors |
AuthenticationException |
401 — bad API key, merchant number, or token |
AuthorizationException |
403 — missing scope or disabled feature |
NotFoundException |
404 — resource does not exist |
RateLimitException |
429 — too many requests (getRetryAfter()) |
ServerException |
5xx — API-side failure |
ApiException |
any other error status (base class of the above) |
TransportException |
network failure, no API response received |
InvalidArgumentException |
misuse detected before a request is sent |
Pass your own correlation id to trace a request end to end:
Retries
Failed requests are retried with exponential backoff and jitter, up to max_retries (default 2):
- 429 responses are retried for every method (the request was rejected, not processed) and honor
Retry-After. - 5xx responses and network failures are retried for
GETrequests only — a write that may have reached the API is never blindly resent.
Set 'max_retries' => 0 to disable retries entirely.
Forward compatibility
Typed properties cover the documented API. Anything the API adds later remains reachable — response objects expose the full payload:
Unknown enum values parse to null instead of throwing; the raw value stays available (e.g. TransactionResult::$statusRaw).
Custom HTTP client
By default the SDK builds a Guzzle client from the configured timeout and connect_timeout. Inject any PSR-18 client and PSR-17 factories instead — useful for proxies, middleware, or tests:
The test suite ships a FakeHttpClient pattern you can copy for your own integration tests — no HTTP mocking library required.
Laravel
This package is intentionally framework-free. For Laravel applications, use the companion package codearachnid/check-commerce-laravel-sdk — it wraps this SDK with a service provider, publishable config mapping the CHECK_COMMERCE_* environment variables, a CheckCommerce facade, a cache-backed token store shared across workers, and a testing fake for feature tests:
Contributing
See CONTRIBUTING.md. Run the suite with:
License
Released under the MIT License.
All versions of check-commerce-php-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.8
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0