Download the PHP package qredex/php without Composer
On this page you can find all versions of the php package qredex/php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package php
Short Description Canonical PHP server SDK for the Qredex Integrations API.
License Apache-2.0
Homepage https://github.com/Qredex/qredex-php
Informations about the package php
Qredex PHP SDK
Canonical PHP server SDK for the Qredex Integrations API.
This package is for machine-to-machine integrations only. It is designed to make the canonical backend flow easy and safe:
create link -> issue IIT -> lock PIT -> record paid order -> record refund
It does not include Merchant API endpoints, browser/runtime logic, Shopify embedded flows, or webhook receivers.
Installation
Ota Workflow
Use Ota for repo work, validation, and release prep:
Support Matrix
| Area | Supported |
|---|---|
| PHP runtime | 8.2+ |
| Composer | 2.x |
| Default CI | composer validate --strict, composer test, composer analyse |
| Live tests | Manual-only composer test:live or GitHub workflow_dispatch |
| Release flow | ota run version:bump --version major|minor|patch or an explicit semver, then tag-based publish |
Requirements
- PHP 8.2 or newer
- Composer 2
- Machine-to-machine Qredex Integrations API credentials
Quick Start
Initialization
Preferred typed initialization:
Required environment variables:
QREDEX_CLIENT_IDQREDEX_CLIENT_SECRET
Optional environment variables:
QREDEX_SCOPEQREDEX_ENVIRONMENTQREDEX_BASE_URLQREDEX_TIMEOUT_MS
Programmatic configuration should prefer QredexScope values over raw scope strings.
Qredex::bootstrap() remains available as the convenience path for environment-only initialization, while QredexConfig::fromEnvironment() is the recommended typed option for any customization.
Stability
- The canonical typed write flow is the primary stable public surface.
- Legacy array payloads remain supported for backward compatibility only and should not be treated as the primary public contract.
- The public surface is intentionally limited to Integrations API resource operations and automatic client-credentials auth.
Public API
Stable canonical write surface:
Operational read surface:
Errors
The SDK separates local validation, API validation, and protocol/response failures:
Qredex\Error\RequestValidationErrorQredex\Error\ApiValidationErrorQredex\Error\ResponseDecodingErrorQredex\Error\AuthenticationErrorQredex\Error\AuthorizationErrorQredex\Error\NotFoundErrorQredex\Error\ConflictErrorQredex\Error\RateLimitErrorQredex\Error\ApiErrorQredex\Error\NetworkErrorQredex\Error\ConfigurationError
Operational Defaults
- OAuth tokens are issued automatically and cached until close to expiry.
- Writes are never retried automatically.
- Read retries are opt-in and honor
Retry-Afterwhen provided. - Client-side correlation ids can be emitted and optionally attached to outgoing headers.
- The SDK does not log client secrets, bearer tokens, IITs, or PITs by default.
Releases
- Releases are semantic-version Git tags such as
v0.2.0. - GitHub Actions validates tagged releases, creates a GitHub Release, and can optionally notify Packagist through
PACKAGIST_WEBHOOK_URL. - Composer consumers should install tagged releases from Packagist or the GitHub repository source configured in Composer.
Docs
- Integration Guide
- API Reference
- Errors
- Contributing
- Security
- Changelog
Examples
- canonical-flow.php
- create-creator.php
- create-link.php
- issue-iit.php
- lock-pit.php
- record-paid-order.php
- record-refund.php
- list-orders.php
- get-order-details.php
Testing
composer testruns unit and mocked transport tests onlycomposer test:liveruns the opt-in live integration suite- Live tests exercise the canonical integrations flow against a real API and are intentionally excluded from default CI and release checks.
Live tests are skipped unless QREDEX_LIVE_ENABLED=1 and the required QREDEX_LIVE_* variables are set.
Start from .env.live.example when wiring live test credentials.
Release Notes
- Releasing
Qredex Contact
- Website: https://qredex.com
- X: https://x.com/qredex
- Email: [email protected]