Overview
CreditNexus integrates with DigiSigner for professional digital signature workflows. The system supports multi-document signing, webhook notifications, and legal validity for all signed documents. Code Reference:app/services/signature_service.py, app/api/routes.py (signature endpoints)Setup Guide:
docs/guides/digisigner-setup.mdx
Key Features
Multi-Document Signing
- Batch Signing: Sign multiple documents in one request
- Signer Management: Add multiple signers with roles
- Signing Order: Define signing order for sequential workflows
- Status Tracking: Track signature status for each signer
app/services/signature_service.py (request_signature)
DigiSigner Integration
- API Integration: Full DigiSigner API integration
- Document Upload: Automatic document upload to DigiSigner
- Signature Requests: Create and manage signature requests
- Webhook Support: Real-time signature status updates
app/services/signature_service.py
Webhook Notifications
- Document Signed: Notification when individual signer signs
- Request Completed: Notification when all signers complete
- Status Updates: Real-time status updates via webhooks
- Automatic Processing: Automatic document download and storage
app/api/routes.py (digisigner_webhook endpoint)
Workflow
1. Request Signatures
- Select Document: Choose document(s) to sign
- Add Signers: Add signer email addresses and names
- Configure Request: Set subject, message, expiration
- Submit Request: Create signature request via DigiSigner
- Track Status: Monitor signature request status
2. Signer Actions
- Receive Email: Signer receives email from DigiSigner
- Review Document: Signer reviews document in DigiSigner
- Sign Document: Signer signs document
- Webhook Notification: System receives webhook notification
- Status Update: Signature status updated in database
3. Completion
- All Signatures: All signers have completed signing
- Webhook Notification: System receives completion webhook
- Download Signed Document: Download signed document from DigiSigner
- Store Document: Store signed document in system
- Update Status: Update document signature status
API Endpoints
Request Document Signature
Request signatures for a document. Request Body:app/api/routes.py (request_document_signature)
Get Document Signatures
Get all signature requests for a document. Response: List of signature requests with statusDownload Signed Document
Download the signed document. Response: File download (PDF)DigiSigner Webhook
DigiSigner webhook endpoint for signature status updates. Events Handled:DOCUMENT_SIGNED: Individual signer signedSIGNATURE_REQUEST_COMPLETED: All signers completed
DIGISIGNER_EVENT_ACCEPTED
Code Reference: app/api/routes.py (digisigner_webhook)
Configuration
Environment Variables
DigiSigner API key
DigiSigner API base URL. Default:
https://api.digisigner.com/v1Webhook secret for signature verification (optional but recommended)
Signature Status
Status Values
pending: Signature request created, awaiting signersin_progress: Some signers have signed, others pendingcompleted: All signers have completed signingdeclined: One or more signers declined to signexpired: Signature request expired
app/db/models.py (DocumentSignature model)
Database Models
DocumentSignature
Location:app/db/models.py
Fields:
signature_request_id: DigiSigner request IDdigisigner_document_id: DigiSigner document IDsignature_status: Current statussigners: Array of signer informationsigned_document_url: URL to signed documentsigned_document_path: Local path to signed documentcompleted_at: Completion timestamp
app/db/models.py (lines 910-944)
Webhook Events
DOCUMENT_SIGNED Event
SIGNATURE_REQUEST_COMPLETED Event
app/api/routes.py (digisigner_webhook handler)
Best Practices
- Signer Verification: Verify signer email addresses before sending
- Clear Communication: Use clear subject and message text
- Expiration Management: Set appropriate expiration dates
- Status Monitoring: Monitor signature status regularly
- Document Storage: Store signed documents securely
Troubleshooting
Webhook Not Received
- Verify webhook URL is publicly accessible
- Check DigiSigner webhook configuration
- Review application logs for errors
- Verify webhook secret (if configured)
Signature Request Fails
- Verify document file exists and is accessible
- Check DigiSigner API key is valid
- Verify signer email addresses are valid
- Review DigiSigner API error messages
Signed Document Not Downloaded
- Check webhook processing logs
- Verify signed_document_url is accessible
- Check file storage permissions
- Review document download endpoint
Additional Resources
Last Updated: 2026-01-14
Code Reference:
app/services/signature_service.py, app/api/routes.py, app/db/models.py