T
Talyana Sign · Connect

Put e-signatures inside your portal.

If your business runs on its own website or client portal, you can send documents for signature from it — under your brand, with your workflow — in an afternoon. One file, three steps. If you can install a WordPress plugin, you (or whoever built your site) can do this.

No framework, no Composer Works on shared hosting Signed, sealed PDFs back automatically

1Get your two credentials

Sign in to your Talyana Sign console as an admin, open Admin → API & webhooks, and copy two values:

CredentialLooks likeWhat it does
API keysk_…Lets your portal talk to Talyana Sign. Treat it like a password.
Webhook secretwhsec_…Proves that "this envelope was signed" messages really came from Talyana Sign.
Keep them server-side. Put both values in a config file on your server (outside your public web folder if you can). Never put them in JavaScript, a mobile app, or an email — anyone holding the API key can send documents as your organization.

2Drop in the connector file

Download the ready-made connector — a single PHP file with no dependencies — and save it into your project as TalyanaSignClient.php:

Download TalyanaSignClient.php

Then test the connection from any page or script on your server:

<?php
require 'TalyanaSignClient.php';

$ts = new TalyanaSignClient(
    'https://YOUR-TALYANA-SIGN-URL',  // where your console lives
    'sk_your-api-key',
    'whsec_your-webhook-secret'
);

$pong = $ts->ping();
echo "Connected to {$pong['org']} ({$pong['plan']} plan)";

If that prints your organization's name, you're connected. If it errors, the message says exactly why (wrong key, wrong URL, suspended account).

3Send your first document

$env = $ts->createAndSend([
    'title'   => 'Service Agreement — Acme Co',
    'documentBase64' => base64_encode(file_get_contents('agreement.pdf')),
    'signers' => [ TalyanaSignClient::signer('Jane Doe', 'jane@acme.com') ],
    'fields'  => [ TalyanaSignClient::anchorField(0, 'signature', '/sign-here/') ],
    'senderEmail' => 'you@yourfirm.com',   // which seat this envelope belongs to
    'webhookUrl'  => 'https://yourportal.com/talyana-webhook.php',
    'metadata'    => ['orderId' => 42],    // anything you want echoed back
]);
// Jane gets an email. $env['id'] is your handle for status checks.

Where does the signature go? The easiest way: put a short marker like /sign-here/ in your document template — in white text (or 1-point type) so it's invisible on paper — and use anchorField(). Talyana Sign finds the marker and places the signature box right there, on any document, no coordinates needed. Use anchorField(0, 'initials', '/init/', true) to place initials on every page carrying the marker.

Word documents? If conversion is enabled on your server, $ts->convertWordToPdf($bytes) turns a .docx into a PDF. Show the PDF to your user for a quick review first — signers should see exactly what gets sealed.

4Hear back when it's signed

Create one small file on your portal — the webhookUrl you passed above. Talyana Sign calls it the moment an envelope completes (or is declined or voided), and the connector verifies it's authentic:

<?php // talyana-webhook.php
require 'TalyanaSignClient.php';
$ts = new TalyanaSignClient('https://YOUR-TALYANA-SIGN-URL', 'sk_…', 'whsec_…');

try {
    $event = $ts->verifyWebhook(getallheaders(), file_get_contents('php://input'));
} catch (TalyanaSignException $e) {
    http_response_code(400); exit;  // forged or malformed — ignore
}

if ($event['type'] === 'envelope.completed') {
    $orderId = $event['metadata']['orderId'] ?? null;   // your own reference, echoed back
    $pdf = $ts->downloadDocument($event['envelopeId']); // the sealed, certificate-backed PDF
    file_put_contents("signed-order-$orderId.pdf", $pdf);
    // …mark the order signed in your database…
}
http_response_code(200); echo 'ok';

Prefer polling? $ts->getEnvelope($id) returns the live status any time — webhooks are just faster and free.

5Give each teammate their own view (optional)

Pass senderEmail on every envelope you create, using the address that person has on their Talyana Sign seat. Each envelope then belongs to that user: they see and track it in their own console, and other users don't — unless they share, or an admin looks. Sharing and permission profiles are managed in the console under Admin → Shared Access and Admin → Profiles; your integration code doesn't change at all.

Going deeper

The connector covers the everyday surface. The full API — templates, multiple documents per envelope, page omission, coordinate placement, branding, the works — is documented in the API reference.