PHPackages                             spart/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. spart/sdk

ActiveLibrary[Payment Processing](/categories/payments)

spart/sdk
=========

Official PHP SDK for the Spart payment-splitting platform.

0.1.0(1mo ago)00MITPHPPHP &gt;=8.1

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/SpartPay/spart-php-sdk)[ Packagist](https://packagist.org/packages/spart/sdk)[ RSS](/packages/spart-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Spart PHP SDK
=============

[](#spart-php-sdk)

Official PHP SDK for the [Spart](https://api.spartpay.com) payment-splitting platform.

> ## ⚠️ Verification Status
>
> [](#️-verification-status)
>
> **Create Intent** is fully wire-validated against the live server: request/response shape (`POST /api/intents`, header `x-spart-merchant-api-key`, `Result` 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 `SignatureVerifier` and the server's `WebhookSignatureBuilder` agree on HMAC-SHA256 over `"{t}.{body}"` with header `t=,v1=`. This is exercised by the `SignatureVerifierTest` self-sign loop in the E2E suite.
>
> **Webhook envelope DTOs** (`IntentEnvelopeData`, `OrderEnvelopeData`, `PaymentEnvelopeData`, `TestEnvelopeData`) and the `EventType` enum 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
------------

[](#installation)

Install via Composer:

```
composer require spart/sdk
```

> **Note** — this package is distributed on [Packagist](https://packagist.org/packages/spart/sdk) from an automated, read-only mirror ([`SpartPay/spart-php-sdk`](https://github.com/SpartPay/spart-php-sdk)) of the `php/` directory in the [`SpartPay/spart-sdks`](https://github.com/SpartPay/spart-sdks) monorepo. Please open issues and pull requests against the **monorepo**, not the mirror.

**PHP version requirement:** PHP 8.1 or higher.

Usage
-----

[](#usage)

### Create a Client

[](#create-a-client)

```
