PHP SDK
One class, four methods — issue, consult, cancel, reissue — typed with PHP 8.1 enums and named arguments.
The official PHP SDK (composer require stackin-io/stackin-php-sdk) wraps the REST API one-to-one: one Invoice class with issue(), consult(), and cancel() — nothing else to instantiate. Each line item is a typed Stackin\Br\Product, with Brazil-specific tax fields (ncm/cfop/cest...) only required where the authorizer actually needs them.
It authenticates the same way as the raw API — a single API key — so switching between SDK and direct HTTP calls later doesn't change how your account or environment is set up.
Requires PHP 8.1+ to use DocumentType as a real backed enum (NFE/NFSE) instead of a free-form string — a typo becomes an import-time error, not a 422 from the API. Construction and every method call use named arguments (new Invoice(apiKey: '...'), new Product(description: '...', amount: 112.44, ncm: '...', cfop: '...')) so field order never matters.
Errors surface as three distinct exception types instead of one generic failure: Stackin\Errors\ApiError carries the authorizer's own status code and detail, Stackin\Errors\ConnectionFailedError covers network/DNS/timeout failures before a response ever comes back, and Stackin\Errors\InvoiceError catches client-side validation problems — empty items, or a missing ncm/cfop on an NFE item — before a request is even sent.
The SDK is built against the same .code_quality/ configuration (phpcs/PSR-12, PHPStan level 6) and CI shape as every other official stackin SDK, and the same universal API contract, so a PHP integration reads the same as the Python or Go one once you know one of them.
See the SDKs section of the API reference for install commands, or the code on GitHub.