Documentation Index
Fetch the complete documentation index at: https://tonic-ai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
CreditNexus integrates with DigiSigner for professional digital signature workflows. This guide covers account setup, API configuration, and webhook setup. Code Reference:app/services/signature_service.py
Prerequisites
- DigiSigner Account: Sign up at https://www.digisigner.com/
- API Access: Enable API access in your account settings
- Public URL: Your application must be accessible via HTTPS for webhooks
Step 1: Get DigiSigner API Key
- Log in to DigiSigner: https://www.digisigner.com/
- Navigate to Account Settings → API Settings
- Generate or copy your API key
- Save the API key securely (you’ll need it for Step 3)
Step 2: Configure Webhook URLs
DigiSigner sends webhook notifications when documents are signed. Configure callback URLs:- In DigiSigner Account Settings → API Settings
- Set “Signature Request Completed” Callback URL:
- Set “Document Signed” Callback URL:
Step 3: Configure Environment Variables
Copy.env.example to .env and configure:
.env file:
DIGISIGNER_API_KEY or DIGISIGNER_WEBHOOK_SECRET to version control! Always use .env (which should be in .gitignore) and never commit it.
Step 4: Local Development Setup
For local development, use a tunneling service to expose your local server. Ensure your local server is running on port 8000 before starting the tunnel.Option 1: localtunnel (Recommended for quick testing)
- Copy the URL provided (e.g.,
https://icy-chairs-warn.loca.lt) - In DigiSigner Account Settings → API Settings, set both callback URLs to:
https://icy-chairs-warn.loca.lt/api/signatures/webhook- “Signature Request Completed” Callback URL
- “Document Signed” Callback URL
- The tunnel URL changes each time you restart localtunnel
- Update DigiSigner webhook URLs whenever the tunnel URL changes
- Keep the localtunnel process running while testing
Option 2: ngrok
- Copy the HTTPS URL shown in ngrok (e.g.,
https://abc123.ngrok.io) - In DigiSigner Account Settings → API Settings, set both callback URLs to:
https://abc123.ngrok.io/api/signatures/webhook- “Signature Request Completed” Callback URL
- “Document Signed” Callback URL
- ngrok free tier URLs change on each restart
- ngrok paid plans offer stable URLs
- Keep the ngrok process running while testing
Webhook Endpoint
DigiSigner webhook endpoint. Handles bothDOCUMENT_SIGNED and SIGNATURE_REQUEST_COMPLETED events.
Response Format: DigiSigner requires a specific response:
- Status Code:
200 - Response Body:
DIGISIGNER_EVENT_ACCEPTED
app/api/routes.py (signature webhook endpoint)
Event Types
DOCUMENT_SIGNED Event
Triggered when an individual signer signs a document:SIGNATURE_REQUEST_COMPLETED Event
Triggered when all signers have completed signing all documents:Webhook Retry Behavior
If DigiSigner doesn’t receive the expected response, it will retry at increasing intervals:- 5 minutes
- 20 minutes
- 65 minutes
- 200 minutes
- 605 minutes
- 1820 minutes (30.3 hours)
Security Considerations
Webhook Signature Verification
For production, implement webhook signature verification:- Get webhook secret from DigiSigner account settings
- Add to
.env:DIGISIGNER_WEBHOOK_SECRET=your_secret - Implement HMAC verification in webhook handler (if not already implemented)
HTTPS Requirement
Always use HTTPS for webhook URLs in production. DigiSigner requires HTTPS for production webhooks.Troubleshooting
Webhook Not Received
- Check URL Accessibility: Ensure webhook URL is publicly accessible
- Check Logs: Review application logs for webhook errors
- Verify DigiSigner Settings: Confirm callback URLs are correctly configured
- Check Firewall: Ensure server allows incoming POST requests
Webhook Received But Not Processed
- Check Event Type: Verify
event_typefield matches expected values - Check Signature Lookup: Ensure
signature_request_idordocument_idmatches database records - Review Logs: Check for specific error messages
Response Format Issues
If DigiSigner reports errors:- Verify response is exactly
DIGISIGNER_EVENT_ACCEPTED(no extra whitespace) - Ensure status code is
200 - Check Content-Type header (should be
text/plainortext/html)
API Usage
Create Signature Request
app/services/signature_service.py
Additional Resources
Last Updated: 2026-01-14
Code Reference:
app/services/signature_service.py, app/api/routes.py