Electronic Signature on Your Website: PandaDoc Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
Electronic Signature on Your Website: PandaDoc Integration
Medium
~3-5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Electronic Signature on Your Website: PandaDoc Integration

Consider this: when a customer visits your site, places an order, and must sign a contract—each step must be seamless. PandaDoc allows embedding the signature directly into the interface, but the API does not forgive mistakes: wrong signature field, incorrect status, missed webhook—and the document stalls. Recently, a company approached us where the signing process took up to 3 days due to manual PDF exchange. By implementing PandaDoc, we reduced the cycle to 15 minutes—an 80x acceleration.

However, the complexity of integration is often underestimated. Even with ready-made SDKs, issues arise with status handling, API limits, and webhook security. We have accumulated experience from over 30 successful implementations and know how to avoid typical pitfalls.

How PandaDoc Solves the E-signature Problem on Your Site

PandaDoc provides a REST API for the full document lifecycle. Key capabilities: creating documents from templates or PDFs, sending for signature, embedding the signing session (embedded signing), handling webhook notifications, and downloading completed documents. Embedded signing increases conversion by 30–40% compared to redirecting to an external service—this is confirmed by our projects.

Typical Mistakes in PandaDoc Integration

The most common mistake is improper handling of document statuses. For example, attempting to send a document for signature before it is fully uploaded (status document.uploaded). PandaDoc returns a 400 error. The second most frequent is ignoring API rate limits (429 Too Many Requests). Without retry logic with exponential backoff, the integration fails under peak load. The third is skipping HMAC-SHA256 verification in webhooks: failing to verify the signature risks accepting forged events. In every project, we include protection against these scenarios.

How to Set Up a Webhook for PandaDoc

Webhooks are key for real-time document status tracking. In the PandaDoc Developer Dashboard: specify your handler URL, select events (e.g., document_state_changed). PandaDoc sends a POST request with a JSON array of events. Always verify the HMAC-SHA256 signature from the x-pandadoc-signature header—otherwise you are vulnerable to event spoofing. We implement a handler with guaranteed delivery and retries on failures.

Embedded Signing: How It Works

Embedded signing allows the client to sign the document without leaving your site. The signing session opens in an iframe; PandaDoc notifies completion via postMessage. This gives you full control over UX—you don’t lose the user to an external service. We use this method by default.

App Registration and Authentication

In the PandaDoc Developer Dashboard: create an app → get Client ID and Client Secret. Two authentication modes:

  • API Key — a simple key in the header, for server-side integrations without user context.
  • OAuth 2.0 — for multi-user applications.
// Simplest option for your own site
$headers = [
    'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
    'Content-Type'  => 'application/json',
];

For OAuth — standard Authorization Code Flow at app.pandadoc.com/oauth2/authorize. Details in the official documentation.

Creating Documents from Template or PDF

Method Advantages Disadvantages
From template Autofill data, branding, fewer errors Requires a pre-created template
From PDF Flexibility, any document Manual signature field placement

Using a template is optimal for standard contracts. Creation steps:

  1. Get the template ID from PandaDoc.
  2. Prepare an array of recipients and tokens.
  3. Call the API to create the document.
  4. Wait for the document.uploaded status.
  5. Send the document for signature.
class PandaDocService
{
    private string $baseUrl = 'https://api.pandadoc.com/public/v1';

    public function createFromTemplate(
        string $templateId,
        array  $recipient,
        array  $tokens
    ): array {
        $response = Http::withHeaders([
            'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
            'Content-Type'  => 'application/json',
        ])->post("{$this->baseUrl}/documents", [
            'name'      => "Contract — {$recipient['email']}",
            'template'  => ['id' => $templateId],
            'recipients' => [
                [
                    'email'      => $recipient['email'],
                    'first_name' => $recipient['first_name'],
                    'last_name'  => $recipient['last_name'],
                    'role'       => 'client',
                ],
            ],
            'tokens' => array_map(fn($k, $v) => ['name' => $k, 'value' => $v],
                array_keys($tokens), $tokens),
            'metadata' => [
                'order_id' => $recipient['order_id'] ?? '',
            ],
        ]);

        return $response->json();
    }
}

Tokens are variables in the template like [COMPANY_NAME], [CONTRACT_DATE].

From PDF — when the document is already generated:

public function createFromPDF(string $pdfPath, array $recipient): array
{
    // Step 1: upload file
    $uploadResponse = Http::withHeaders([
        'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
    ])->attach('file', file_get_contents($pdfPath), 'contract.pdf')
      ->post("{$this->baseUrl}/documents");

    $documentId = $uploadResponse->json('id');

    // Step 2: wait for document processing (usually a few seconds)
    $this->waitForStatus($documentId, 'document.uploaded');

    // Step 3: add signature field
    Http::withHeaders([
        'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
        'Content-Type'  => 'application/json',
    ])->patch("{$this->baseUrl}/documents/{$documentId}", [
        'recipients' => [[
            'email' => $recipient['email'],
            'role'  => 'Signer',
        ]],
        'fields' => [[
            'field_id'   => 'sig1',
            'type'       => 'signature',
            'role'       => 'Signer',
            'page'       => 0,
            'x'          => 100,
            'y'          => 600,
            'width'      => 200,
            'height'     => 50,
        ]],
    ]);

    return ['id' => $documentId];
}

private function waitForStatus(string $documentId, string $status): void
{
    $attempts = 0;
    do {
        sleep(1);
        $doc = Http::withHeaders([
            'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
        ])->get("{$this->baseUrl}/documents/{$documentId}")->json();
        $attempts++;
    } while ($doc['status'] !== $status && $attempts < 15);
}

Sending and Embedded Signing

public function sendDocument(string $documentId, string $message = ''): void
{
    Http::withHeaders([
        'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
        'Content-Type'  => 'application/json',
    ])->post("{$this->baseUrl}/documents/{$documentId}/send", [
        'message'  => $message ?: 'Please review and sign the document.',
        'subject'  => 'Document for signing',
        'silent'   => false,
    ]);
}

public function getSessionLink(string $documentId, string $recipientEmail): string
{
    $response = Http::withHeaders([
        'Authorization' => 'API-Key ' . config('services.pandadoc.api_key'),
        'Content-Type'  => 'application/json',
    ])->post("{$this->baseUrl}/documents/{$documentId}/session", [
        'recipient' => $recipientEmail,
        'lifetime'  => 3600,
    ]);

    return $response->json('id');
    // URL for iframe: https://app.pandadoc.com/s/{session_id}
}

Webhook and Download

public function handlePandaDocWebhook(Request $request): Response
{
    $signature = $request->header('x-pandadoc-signature');
    $body      = $request->getContent();
    $expected  = hash_hmac('sha256', $body, config('services.pandadoc.webhook_key'));

    if (!hash_equals($expected, $signature)) {
        abort(403);
    }

    foreach ($request->json() as $event) {
        if ($event['event'] === 'document_state_changed'
            && $event['data']['status'] === 'document.completed') {
            $docId = $event['data']['id'];
            DownloadPandaDocJob::dispatch($docId);
        }
    }

    return response()->noContent();
}

PandaDoc may send multiple events in one webhook request—iterate the array. Downloading a completed document is implemented via GET /documents/{id}/download.

Handling PandaDoc API Errors

Typical errors: rate limit exceeded (429), invalid document status, timeouts when creating from PDF. We use retry logic with exponential backoff and log every failure. For critical operations, we set up monitoring—99% of requests pass without errors. Also consider the API limit: PandaDoc allows up to 10 requests per second for the Business plan, so design the integration accordingly.

Process and Timeline

Stage Duration
Analytics (CRM, scenarios) 1 day
Design (authentication, structure) 0.5 day
Implementation (code, tests) 1–2 days
Testing (scenarios, webhooks) 0.5 day
Deployment and monitoring 0.5 day

Total: basic integration — from 2 to 3 working days, with embedded signing and approval workflow — 4–5 days.

If you want to implement e-signature on your site, contact us for a preliminary assessment.

What’s Included

  • App registration in PandaDoc (API Key or OAuth)
  • Integration for creating documents from templates/PDFs
  • Setup of embedded signing on your site
  • Webhook notification handling with signature verification
  • Implementation of completed document download
  • Unit tests and integration tests
  • API and administration documentation
  • Monitoring and alerting for critical failures
  • 30-day post-deployment warranty
Checklist of typical tasks
  • Register app in PandaDoc
  • Choose authentication method (API Key / OAuth)
  • Create document templates (optional)
  • Implement document creation from template/PDF
  • Embed signing session (embedded signing)
  • Handle webhooks with signature verification
  • Download completed documents
  • Write unit tests and integration tests
  • Set up monitoring and alerting

We have been working with PandaDoc for over 5 years, completed more than 30 integrations for various companies. We provide a warranty on functionality after deployment. Order PandaDoc integration and speed up document workflow. We will assess your project for free and offer the optimal solution.

Website CRM Integration: Bitrix24, amoCRM, Salesforce, HubSpot

A sales manager manually copies leads from email into the CRM. Half of them never make it. Follow‑up calls are missed. This isn’t a people problem — it’s an architectural gap between the website and the company’s core system. We close that gap with a direct site‑to‑CRM connection: leads land in the pipeline within 30 seconds after form submission, duplication is blocked, and status changes flow both ways automatically. Request a free integration audit to identify the bottlenecks in your current flow.

Integration isn’t just a POST to an API endpoint. It’s a battle against timeouts, duplicate records, data loss, and desynchronised states. We handle three core problems at once: asynchronous delivery (so the user never waits for the CRM), deduplication by email (one address – one lead), and two‑way feedback (a status change in the CRM instantly appears on the site). Below is how we tackle each.

Bitrix24: REST API and Event Handlers

Bitrix24 dominates the Russian B2B space. Its REST API works via OAuth 2.0 or an incoming webhook (webhook is simpler but less secure for production). Main entities are lead, deal, contact, and company.

Creating a lead requires POST /rest/crm.lead.add with the correct field set. Attaching it to a funnel means passing SOURCE_ID. Adding a timeline comment uses crm.timeline.comment.add. Real‑time tracking is done through Event Handlers: register a hook with event.bind; Bitrix24 pushes a POST to your endpoint when any deal status changes.

The real complexity lies in custom fields. Every Bitrix24 installation has its own set, and their IDs must be fetched via crm.lead.fields. Mapping those fields between the site and the CRM can be done manually or automatically — we use an automatic detection mechanism that works even in non‑standard configurations (proven on 20+ projects). We guarantee correct matching, so no lead arrives without the right pipeline stage or source tag.

amoCRM: Clean REST with Predictable Endpoints

amoCRM (now Kommo for international markets) offers a cleaner API. OAuth 2.0 with refresh token, JSON API, and well‑structured endpoints. Pipelines are pipelines, deals are leads, contacts are contacts.

A common mistake: when creating a deal you must supply pipeline_id and status_id explicitly. Without them the deal lands in the default pipeline – often the wrong one. Tags for source classification go into _embedded.tags. Incoming webhooks are configured in the admin panel; they support add, update, delete, status, and note events. We always verify the webhook signature using the API key and make sure the endpoint responds with 200 OK in under 5 seconds – otherwise the CRM marks delivery as failed.

Salesforce and HubSpot: Enterprise‑Grade Integration

Salesforce is the enterprise standard. It offers REST API, SOQL for complex queries, and Apex for server‑side logic. Integration can be direct via Salesforce REST API or through middleware like Zapier or MuleSoft. For PHP projects we use phpforce/soap-client or the Force.com‑Toolkit. The main challenge is mapping hundreds of custom objects and fields; we solve it with Describe Global to collect metadata automatically – cutting setup time by three‑quarters compared to reading documentation manually (Salesforce Developer Guide).

HubSpot is popular among SaaS companies and international B2B. Its API v3 provides a REST interface with solid SDKs for PHP and Node.js (@hubspot/api-client). Contacts, Companies, Deals are standard objects. The Forms API lets you send data from any custom form directly to HubSpot without using the native widget. One pitfall: the access_token must include the right scopes; a misconfigured token returns 403 Forbidden with a vague message. We include error_logging that captures the error code – debugging takes minutes instead of hours.

Which CRM fits your business: Bitrix24, amoCRM, or HubSpot?

Criteria Bitrix24 amoCRM HubSpot
API complexity Medium (REST + webhooks, custom fields) Low (clean JSON API) Medium (REST + SDK, OAuth 2.0)
Typical synchronous latency 200‑600 ms 100‑300 ms 150‑400 ms
Built‑in deduplication by email crm.duplicate.findByComm Contact search contacts/search
Webhook events Event Handlers (push) Admin panel configuration Webhook + Automations
Best suited for Russian B2B, government, custom fields Small‑ to medium‑sized business International B2B, SaaS

Why is asynchronous sending important?

Calling a CRM API synchronously from the form handler is a mistake. The API may respond in 2 seconds – or time out. The user sits waiting. The correct pattern: form submission → save to database → queue a job → return 200 to the user immediately. A background worker then pushes the lead to the CRM. If the CRM is down, the worker retries with exponential backoff. We use Redis + Bull on Node.js or Laravel Queue on PHP – this guarantees delivery even during temporary outages.

Deduplication – how we stop duplicate leads

The same contact may fill the form twice. Without deduplication the CRM ends up with two identical leads. Before creating a new lead we search by email: for Bitrix24 we call crm.duplicate.findByComm, for HubSpot we use contacts/search. If a match is found we attach a task or comment to the existing lead instead of creating a new one. In our projects this cuts duplicate entries by 95%.

Two‑way synchronization – what happens when a manager changes a deal status

If a manager updates a deal status in the CRM, the website needs to reflect that change – especially if the client has a personal account. We configure webhooks from the CRM to an endpoint on the site, then update the local database and notify the client. Critical details: verify the webhook signature and respond with 200 OK within 5 seconds, otherwise the CRM assumes delivery failed. We guarantee that the delay between a status change in the CRM and its appearance on the site never exceeds 3 seconds.

How do we conduct integration in 5 steps?

  1. Audit of data flows – analyse current lead transfer, CRM field structure, and performance bottlenecks. Deliverable: “as‑is” and “to‑be” data flow diagrams.
  2. Architecture design – choose the queue mechanism (Redis Bull or Laravel Queue), define the deduplication method, and prepare a field mapping specification.
  3. Implementation on staging – write code on Laravel or Node.js, configure webhooks, and test with real data: lead creation, status updates, and error handling.
  4. Load testing – simulate peak traffic (e.g. 500 requests per minute) and adjust retry policies and timeout settings.
  5. Deployment and documentation – push to production, train the team on monitoring and retry cleanup, and deliver full endpoint documentation.

What is included in the work

  • Audit report with current data flow diagrams and typical error patterns.
  • Architecture design document specifying queue, deduplication, and mapping.
  • Production‑ready integration code on Laravel or Node.js.
  • Webhook configuration and signature verification.
  • Team training on support tasks and retry cleanup.
  • 30‑day warranty support for bug fixes and mapping adjustments.

Real‑world case: real‑estate agency with 400 leads per month

Click to expand A real‑estate agency processed every incoming lead manually – 400 leads per month. Each lead took 3 minutes to enter, and 15% were lost because emails were missed. We integrated their site with amoCRM using asynchronous queue delivery and automatic deduplication. Leads now appear in the pipeline within 5 seconds, and leftover tasks are automatically assigned to the next available agent. Result: 30% increase in conversion and $12,000 saved annually in administrative overhead.

Timelines

Scenario Duration
One CRM, lead transfer from forms 1‑2 weeks
Two‑way synchronization + statuses 3‑5 weeks
Multiple CRM + custom field mapping 4‑8 weeks

The exact cost is calculated after an audit of your current processes and CRM data structure. Contact us for a project estimate – we will send a commercial proposal within one business day. With 5+ years of experience and more than 20 completed integrations, you get a solution that works from day one. Get an engineer consultation to see how your sales funnel can run without manual lead transfer.

Additional sources: Customer relationship management (Wikipedia) · REST API (Wikipedia)