- How do I install docusign/esign-client in a Laravel project?
- Install it with Composer by running composer require docusign/esign-client. The SDK requires PHP 7.4+, cURL, JSON, MBString, and adhocore/jwt ^1.1, and it loads through Composer's autoloader. Laravel does not auto-discover anything from this package, so you will typically register your own service provider and config file for DocuSign credentials.
- Is docusign/esign-client a Laravel-native package, and are there Laravel wrappers?
- No, it is the official DocuSign PHP SDK, a thin REST API client rather than a Laravel-native package. It does not ship facades, config publishing, migrations, queue integration, or webhook handling. Community adoption is limited, with few Laravel-specific wrappers, so plan to build a small internal adapter and service provider around it and consider a provider abstraction to avoid lock-in.
- Which PHP and Laravel versions does the DocuSign PHP SDK support?
- The SDK requires PHP 7.4 or higher and is framework-agnostic, so it can be used with modern Laravel versions that support your chosen PHP version. DocuSign is phasing out PHP versions below 8.0, and PHP 8.1+ is the safer target for new Laravel projects. Always verify the current requirements in the SDK changelog before upgrading.
- How should I authenticate to DocuSign from a Laravel backend?
- Use JWT Grant for server-to-server automation where no user context is needed, or Authorization Code Grant when acting on behalf of a specific DocuSign user. You will need a DocuSign developer account, integration key, account and user IDs, a private key, and a completed consent flow. Store the private key and tokens using Laravel's encrypted configuration or cache rather than in source control.
- How do I implement embedded signing with docusign/esign-client in Laravel?
- Create and send an envelope through the SDK, then call the recipient view endpoint server-side to generate a signing URL. Redirect the signer to that URL or open it in an iframe according to your UX. Keep these calls inside a DocuSignService or similar adapter instead of calling the SDK directly from controllers.
- How do I handle DocuSign Connect webhooks in a Laravel application?
- The SDK does not provide webhook handling, so add a Laravel route and controller for DocuSign Connect callbacks. Verify the HMAC signature, validate the payload, and dispatch a queued job to update envelope or recipient status idempotently. Use events and listeners to keep status synchronization decoupled from the HTTP request.
- Should I call the DocuSign SDK directly from Laravel controllers?
- Avoid it. Wrap the SDK behind an internal interface such as ESignatureProvider or DocuSignService with methods like sendEnvelope, createRecipientView, and getEnvelopeStatus. This keeps controllers thin, makes testing easier, and reduces lock-in if you later change providers. Use queues for envelope sends and retries.
- Where should I store DocuSign private keys and OAuth tokens in Laravel?
- Store private keys and client secrets in environment variables or a secrets manager, never in version control. Use Laravel's encrypted config and cache for OAuth access and refresh tokens, and restrict access to the integration key and account credentials. Rotate credentials and audit access as part of production hardening.
- How stable is docusign/esign-client for production and how often does it introduce breaking changes?
- The SDK is vendor-supported but ships frequently to track DocuSign eSignature API v2.1, and changelogs show major-version breaking changes such as v8.0.0 model and endpoint updates. Its JWT dependency has also changed over time, from firebase/php-jwt to adhocore/jwt with a planned move back. Pin versions, isolate the SDK behind an interface, and test upgrades in the DocuSign sandbox before deploying.
- How do I test a DocuSign integration in Laravel?
- Start with a DocuSign developer sandbox account and the official Quickstart or Launcher examples to validate OAuth and envelope flows. Because the SDK uses its own HTTP client, unit-test your internal adapter or interface with mocks rather than mocking the SDK directly. Create a sandbox test envelope suite and verify webhook handling, retries, and upgrade paths before production.