Download the PHP package spart/sdk without Composer
On this page you can find all versions of the php package spart/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description Official PHP SDK for the Spart payment-splitting platform.
License MIT
Informations about the package sdk
Spart PHP SDK
Official PHP SDK for the Spart payment-splitting platform.
⚠️ Verification Status
Create Intent is fully wire-validated against the live server: request/response shape (
POST /api/intents, headerx-spart-merchant-api-key,Result<T>envelope unwrap,intentShortId/checkoutUrl), happy path, replay idempotency, the 400 validation path, and the 401 auth path are all covered by the E2E suite (see "Running E2E tests" below).Webhook signature scheme is wire-validated end-to-end: the SDK's
SignatureVerifierand the server'sWebhookSignatureBuilderagree on HMAC-SHA256 over"{t}.{body}"with headert=<unix>,v1=<lowercase-hex>. This is exercised by theSignatureVerifierTestself-sign loop in the E2E suite.Webhook envelope DTOs (
IntentEnvelopeData,OrderEnvelopeData,PaymentEnvelopeData,TestEnvelopeData) and theEventTypeenum values are still not wire-validated against real webhook deliveries. Capturing a real-delivery envelope is tracked as a follow-up issue and may surface field-name or shape adjustments before the webhook surface is considered stable.
Installation
Install via Composer:
Note — this package is distributed on Packagist from an automated, read-only mirror (
SpartPay/spart-php-sdk) of thephp/directory in theSpartPay/spart-sdksmonorepo. Please open issues and pull requests against the monorepo, not the mirror.
PHP version requirement: PHP 8.1 or higher.
Usage
Create a Client
Create an Intent
Note on line items: the server treats
lineItemsas descriptive metadata and does NOT reconcile them againsttotal. There is no per-line-item price. The canonical amount the customer is charged istotal(currency travels with it).
Verify a Webhook
Public Surface
All classes and interfaces under the Spart\Sdk namespace (except those under Spart\Sdk\Internal\*) are considered public API and follow semantic versioning.
Exception: Classes, interfaces, and functions under the Spart\Sdk\Internal\* namespace are not part of the public API contract and may change or be removed in any release. Do not depend on internal APIs.
License
MIT
All versions of sdk with dependencies
ext-curl Version *
ext-json Version *
ext-hash Version *