yousign/yousign-api-client
A PHP client for the YouSign electronic signature API that simplifies creating, sending, and managing signature requests, documents, and workflows from Laravel or plain PHP applications with a clean, fluent interface.
Architecture fit. This is a thin, vendor-maintained HTTP wrapper over Yousign's REST e-signature API — not a Laravel package and not a domain library. It carries no service provider, config publishing, facade, or Eloquent integration. That is the right shape for our use: it belongs behind an application-owned interface (SignatureProvider), never called directly from controllers or models. Treating it as an anti-corruption layer keeps the e-signature provider swappable at the code level even though the signed artifacts and audit trail are not portable in practice.
Integration feasibility. Standard Composer install with PSR-4 autoloading; the only real coupling surface is its Guzzle/HTTP transport dependency and its PHP version constraint. Both must be checked against the Laravel version we standardize on before committing — a Guzzle major-version conflict is the most common reason an otherwise trivial SDK install becomes a multi-day dependency-resolution exercise. Authentication is API-key/bearer-token based, so the integration work is mostly secret management and HTTP plumbing, not protocol work.
Technical risk.
.env line.Key questions.
composer.json declare?Stack fit. Drop-in at the library level, hand-built at the framework level. We own the Laravel wiring: a config file backed by environment/vault, a singleton binding for the client, a SignatureProvider interface, and a single adapter class implementing it. Controllers and jobs depend on the interface only. Webhook receipt is a dedicated route with signature verification and an idempotent event handler — Yousign's callbacks are the only sane way to model a multi-day signing lifecycle, and polling should not be the primary mechanism.
Migration path. If we already have a hand-rolled cURL integration, introduce the interface first, prove it against the existing implementation, then swap in the SDK adapter behind a feature flag — no big-bang cutover. If this is greenfield, adopt the interface on day one; the incremental cost is one class and it buys us a testing seam that does not require hitting Yousign's sandbox in CI.
Compatibility. Pin the SDK to an exact minor version and lock it. Verify the PHP constraint against our Laravel baseline, and verify the Guzzle constraint against anything else in the dependency graph that speaks HTTP (AWS SDK, Socialite, mail transports). Confirm the license is compatible with our distribution model before it lands in a shipped product.
Sequencing.
Maintenance. Low ongoing code maintenance, non-trivial ongoing watch maintenance. We need an owner who tracks Yousign's API changelog and the SDK's release cadence, because vendor API deprecations arrive with deadlines. Dependabot or Renovate on the pinned version, plus a calendar reminder to review quarterly.
Support. Support runs through Yousign, not GitHub. Establish the vendor escalation contact and contractual SLA before launch, and confirm language of support (the vendor is France-based; French-language support is likely, English availability should be verified). Internally, document the runbook for "a signature is stuck" — the answer will be in Yousign's dashboard, not our logs.
Scaling. Throughput is bounded by the vendor's rate limits, not by our infrastructure. Design for asynchronous: enqueue signature-request creation, never block a user request on it. Apply retry with exponential backoff and jitter on 429/5xx, and a circuit breaker so a Yousign outage degrades the signing feature rather than the whole application. Watch payload sizes for document uploads — stream large files rather than loading them into memory.
Failure modes.
Ramp-up. A mid-level PHP developer familiar with Guzzle and Laravel's container can be productive in a day; the SDK surface is small. The real ramp-up is domain knowledge: eIDAS signature levels, what constitutes admissible evidence, and the signing lifecycle. Budget for that separately, and pair the implementation with whoever owns legal/compliance sign-off — they will ask questions the SDK documentation does not answer.
Overall recommendation: viable, with conditions. Approve a one-day spike to resolve the API-version and maintenance-status questions before committing. The library itself is low-risk; the provider relationship and the evidence-retention model are where the actual decisions live.
How can I help you explore Laravel packages today?