Read from the package's own PHP files at the commit 303a336c694c: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.
ApiclassYousign's public API v3 - "Youtrust Public API v3" since the company's new name; the hosts and headers keep Yousign's: a bearer API key, JSON, a multipart upload for documents.
5 methods · 1 property · 5 constants
YousignGatewayFactoryclassYousign - Youtrust since its new name: simple, advanced and qualified electronic signatures, by e-mail or in the application's page.
14 options · 1 method
AbstractActionclassAn action on Yousign's API v3.
1 method
CancelActionclassPOST /signature_requests/{id}/cancel: reason "other", the application's words as the note.
2 methods
CreateActionclassA signature request in four calls: the request (POST /signature_requests), each document (POST .../documents, multipart), each signer with their fields (POST .../signers) - a draft, sent by Send (activate).
2 methods
DownloadActionclassThe signed documents (GET .../documents/download?version=completed: a PDF, a ZIP when several) and the audit trail (GET .../audit_trails/download?merge=true).
2 methods
FetchActionclassGET /signature_requests/{id}: its status and its signers'.
2 methods
NotifyActionclassA webhook's call: X-Yousign-Signature-256 checked, event_name read.
2 methods
RemindActionclassPOST /signature_requests/{id}/signers/{signerId}/send_reminder, for each signer asked who has not signed.
2 methods
SendActionclassPOST /signature_requests/{id}/activate: ongoing; embedded, each signer's signature_link comes back.
2 methods
SigningUrlActionclassA signer's signature_link, as GET .../signers lists it - given for an envelope sent embedded (delivery_mode none), once activated.
2 methods
Omnisign\Yousign
Api class
final class Api Api.php:19
Yousign's public API v3 - "Youtrust Public API v3" since the company's new name; the hosts and headers keep Yousign's: a bearer API key, JSON, a multipart upload for documents.
const PROVIDER = 'yousign'const URL = 'https://api.yousign.app/v3'const SANDBOX_URL = 'https://api-sandbox.yousign.app/v3'const STATUSES = ['draft' => Status::DRAFT, 'ongoing' => Status::SENT, 'approval' => Status::SENT, 'paused' => Status::SENT, 'done' => Status::COMPLETED, 'declined' => Status…A signature request's status, as the family's.
const SIGNER_STATUSES = ['initiated' => SignerStatus::WAITING, 'notified' => SignerStatus::NOTIFIED, 'verified' => SignerStatus::OPENED, 'processing' => SignerStatus::OPENED, 'conse…A signer's status, as the family's.
public readonly string $url
Api::__construct()
public function __construct(readonly HttpClientInterface $http, readonly string $apiKey, public readonly string $url = self::URL, readonly ?string $webhookSecret = null)Api::json()
public function json(string $method, string $path, array $json = []): arrayApi::upload()
public function upload(string $path, string $content, string $filename, string $type, bool $signable): array- Returns
the document uploaded
Api::download()
public function download(string $path, array $query = []): AnswerA file: a PDF, or a ZIP when several.
Api::verify()
public function verify(string $body, ?string $signature): arrayA webhook's call, its X-Yousign-Signature-256 checked: "sha256=" and the HMAC-SHA-256 of the raw body under the subscription's secret.
YousignGatewayFactory class
final class YousignGatewayFactory extends GatewayFactory YousignGatewayFactory.php:30
Yousign - Youtrust since its new name: simple, advanced and qualified electronic signatures, by e-mail or in the application's page.
options: api_key: '%env(YOUSIGN_API_KEY)%' # required sandbox: false # true: api-sandbox.yousign.app - signatures without legal value webhook_secret: '%env(default::YOUSIGN_WEBHOOK_SECRET)%' # the subscription's secret: notify() checks X-Yousign-Signature-256 with it url: ~ # another API root
Options
| Option | Default | |
|---|---|---|
sandbox | false | |
webhook_secret | null | |
url | null | |
omnisign.capabilities | new Capabilities([Level::SIMPLE, Level::ADVANCED, Level::QUALIFIED], embedded: true, ordered: true, identityCheck: true, thirdParty: true) | |
omnisign.api | fn(Config $c) => new Api($this->http ?? HttpClient::create(), (string) $c['api_key'], rtrim((string) ($c->get('url') ?: ($c->bool('sandbox') ? Api::SANDBOX_U… | |
omnisign.action.create | new CreateAction() | |
omnisign.action.send | new SendAction() | |
omnisign.action.fetch | new FetchAction() | |
omnisign.action.remind | new RemindAction() | |
omnisign.action.cancel | new CancelAction() | |
omnisign.action.download | new DownloadAction() | |
omnisign.action.signing_url | new SigningUrlAction() | |
omnisign.action.notify | static fn(Config $c) => $c->get('webhook_secret') ? new NotifyAction() : null | |
api_key | required |
YousignGatewayFactory::__construct()
public function __construct(readonly ?HttpClientInterface $http = null)Omnisign\Yousign\Action
AbstractAction class
abstract class AbstractAction implements ActionInterface, ApiAwareInterface AbstractAction.php:14
An action on Yousign's API v3.
AbstractAction::__construct()
public function __construct()CancelAction class
final class CancelAction extends AbstractAction CancelAction.php:9
POST /signature_requests/{id}/cancel: reason "other", the application's words as the note.
CancelAction::supports()
public function supports(Request $request): boolCancelAction::execute()
public function execute(Request $request): voidCreateAction class
final class CreateAction extends AbstractAction CreateAction.php:20
A signature request in four calls: the request (POST /signature_requests), each document (POST .../documents, multipart), each signer with their fields (POST .../signers) - a draft, sent by Send (activate).
CreateAction::supports()
public function supports(Request $request): boolCreateAction::execute()
public function execute(Request $request): voidDownloadAction class
final class DownloadAction extends AbstractAction DownloadAction.php:14
The signed documents (GET .../documents/download?version=completed: a PDF, a ZIP when several) and the audit trail (GET .../audit_trails/download?merge=true).
DownloadAction::supports()
public function supports(Request $request): boolDownloadAction::execute()
public function execute(Request $request): voidFetchAction class
final class FetchAction extends AbstractAction FetchAction.php:9
GET /signature_requests/{id}: its status and its signers'.
FetchAction::supports()
public function supports(Request $request): boolFetchAction::execute()
public function execute(Request $request): voidNotifyAction class
final class NotifyAction extends AbstractAction NotifyAction.php:11
A webhook's call: X-Yousign-Signature-256 checked, event_name read.
NotifyAction::supports()
public function supports(Request $request): boolNotifyAction::execute()
public function execute(Request $request): voidRemindAction class
final class RemindAction extends AbstractAction RemindAction.php:10
POST /signature_requests/{id}/signers/{signerId}/send_reminder, for each signer asked who has not signed.
RemindAction::supports()
public function supports(Request $request): boolRemindAction::execute()
public function execute(Request $request): voidSendAction class
final class SendAction extends AbstractAction SendAction.php:9
POST /signature_requests/{id}/activate: ongoing; embedded, each signer's signature_link comes back.
SendAction::supports()
public function supports(Request $request): boolSendAction::execute()
public function execute(Request $request): voidSigningUrlAction class
final class SigningUrlAction extends AbstractAction SigningUrlAction.php:15
A signer's signature_link, as GET .../signers lists it - given for an envelope sent embedded (delivery_mode none), once activated.
SigningUrlAction::supports()
public function supports(Request $request): boolSigningUrlAction::execute()
public function execute(Request $request): void