Overview
SMS verification enables contract parties to confirm their agreements and provide digital signatures using simple text messages. This approach works on any mobile phone, requiring no smartphone or internet access.Universal Access
Works on any phone - no smartphone or data required
Simple Commands
Reply with YES/NO commands to confirm or reject contracts
Auto-Generated
System sends contract summaries automatically after voice processing
Secure Codes
Cryptographic verification codes ensure authenticity
How It Works
SMS Message Format
Contract confirmation messages follow a standard format:Message Components
- Contract ID: Unique identifier for tracking
- Product Description: What’s being exchanged
- Value: Total contract amount
- Reply Instructions: Clear confirmation commands
Sending Contract SMS
Send contract notification to parties:Response Format
Sending Simple SMS
For general notifications or custom messages:Bulk SMS
Send the same message to multiple recipients:Webhook Handler
VoicePact automatically processes incoming SMS replies:Processing Logic
The webhook handler at sms.py:294:- Receives incoming SMS
- Parses the message text
- Extracts action (YES/NO) and contract ID
- Records the signature
- Updates contract status
- Notifies other parties
SMS Service Status
Check SMS service availability:Response Format
Message Templates
VoicePact provides built-in message templates:Contract Summary
Phone Number Formatting
The system automatically formats phone numbers:Delivery Reports
Track SMS delivery status through the webhook:Status Values
- Success: Message delivered
- Sent: Message sent to carrier
- Buffered: Queued for delivery
- Rejected: Invalid number or blocked
- Failed: Delivery failed
Error Handling
Cost Optimization
Message Length
Message Length
Keep messages under 160 characters to avoid multiple SMS charges:
- Use short contract IDs
- Abbreviate when possible
- Remove unnecessary words
Bulk Sending
Bulk Sending
Use bulk SMS endpoint for multiple recipients:
- Single API call
- Better throughput
- Reduced overhead
Delivery Reports
Delivery Reports
Enable delivery reports only when needed:
- Track critical confirmations
- Monitor failed deliveries
- Retry failed messages
Security Considerations
SMS Confirmation Codes
The system generates cryptographic verification codes:Signature Recording
Each SMS confirmation creates a digital signature record:- Timestamp: When the confirmation was received
- Phone Number: Who confirmed
- IP Address: Source of webhook (if available)
- Signature Hash: Cryptographic proof
- Signature Data: Original message content
Best Practices
- Clear Instructions: Always include reply format in messages
- Unique IDs: Use contract IDs in confirmation commands
- Confirmation Messages: Send acknowledgment after receiving confirmation
- Retry Logic: Implement exponential backoff for failed sends
- Rate Limiting: Respect carrier rate limits
- Local Numbers: Use local sender IDs when available
Testing
Test SMS integration without sending real messages:Integration with Africa’s Talking
VoicePact uses Africa’s Talking SMS API:Next Steps
Digital Signatures
Understand cryptographic signatures
USSD Integration
Alternative confirmation via USSD
Voice Contracts
Create contracts from voice calls
Mobile Money
Process payments