Invoice Sending & Delivery
Send invoices via email, SMS, and generate shareable payment links.
Overview
Multiple ways to deliver invoices to customers:
- 📧 Email - Professional email with PDF attachment
- 📱 SMS - Text message with payment link
- 🔗 Payment link - Shareable URL for any channel
- 📄 PDF download - Direct PDF generation
- 📲 QR code - Scannable payment code
Send Invoice via Email
Endpoint
POST /api/v1/invoices/:invoiceId/send
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_abc123/send \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id" \
-H "Content-Type: application/json" \
-d '{
"sendVia": ["email"],
"email": "customer@example.com",
"subject": "Invoice from ACME Corp",
"message": "Thank you for your business!",
"attachPdf": true
}'
Response:
{
"success": true,
"data": {
"invoiceId": "inv_abc123",
"sentVia": ["email"],
"sentTo": "customer@example.com",
"sentAt": "2026-01-28T12:00:00Z",
"deliveryStatus": "sent"
}
}
Send via SMS
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_abc123/send \
-d '{
"sendVia": ["sms"],
"phone": "+1234567890",
"message": "New invoice for $500. Pay here: {{paymentLink}}"
}'
SMS format:
ACME Corp: New invoice for $500.00 due Feb 15.
Pay now: https://pay.auxvault.com/inv_abc123
Send via Both Email + SMS
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_abc123/send \
-d '{
"sendVia": ["email", "sms"],
"email": "customer@example.com",
"phone": "+1234567890"
}'
Get Payment Link
Generate shareable payment link:
Endpoint
GET /api/v1/invoices/:invoiceId/payment-link
curl https://dev.auxcore.net/api/v1/invoices/inv_abc123/payment-link \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
Response:
{
"success": true,
"data": {
"invoiceId": "inv_abc123",
"paymentLink": "https://pay.auxvault.com/inv_abc123",
"qrCodeUrl": "https://api.auxvault.com/qr/inv_abc123.png",
"expiresAt": null
}
}
Share link via:
- SMS
- Social media
- Website
- QR code
Generate QR Code
Endpoint
GET /api/v1/invoices/:invoiceId/qr-code
curl https://dev.auxcore.net/api/v1/invoices/inv_abc123/qr-code \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id" \
-o invoice-qr.png
Options:
curl "https://dev.auxcore.net/api/v1/invoices/inv_abc123/qr-code?size=400&format=svg"
| Parameter | Options | Default |
|---|---|---|
size |
200-1000 | 300 |
format |
png, svg, pdf | png |
color |
Hex code | #000000 |
backgroundColor |
Hex code | #ffffff |
Download PDF
Endpoint
GET /api/v1/invoices/:invoiceId/pdf
curl https://dev.auxcore.net/api/v1/invoices/inv_abc123/pdf \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id" \
-o invoice.pdf
Delivery Status Tracking
Track invoice delivery:
Get Delivery Status
curl https://dev.auxcore.net/api/v1/invoices/inv_abc123/delivery-status \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
Response:
{
"success": true,
"data": {
"invoiceId": "inv_abc123",
"deliveries": [
{
"method": "email",
"sentTo": "customer@example.com",
"sentAt": "2026-01-28T12:00:00Z",
"status": "delivered",
"openedAt": "2026-01-28T12:15:00Z",
"clickedAt": "2026-01-28T12:16:00Z"
},
{
"method": "sms",
"sentTo": "+1234567890",
"sentAt": "2026-01-28T12:00:00Z",
"status": "delivered"
}
]
}
}
Delivery Statuses
| Status | Description |
|---|---|
queued |
Pending delivery |
sent |
Sent to provider |
delivered |
Successfully delivered |
opened |
Email opened (email only) |
clicked |
Payment link clicked |
bounced |
Email bounced |
failed |
Delivery failed |
Email Customization
Custom Subject Line
{
"subject": "Invoice #{{invoiceNumber}} from {{merchantName}}",
"variables": {
"invoiceNumber": "INV-12345",
"merchantName": "ACME Corp"
}
}
Custom Message
{
"message": "Hi {{customerName}},\n\nPlease find your invoice attached.\n\nThank you!\n{{merchantName}}"
}
CC & BCC
{
"email": "customer@example.com",
"cc": ["accounting@example.com"],
"bcc": ["records@mycompany.com"]
}
Reply-To
{
"email": "customer@example.com",
"replyTo": "billing@mycompany.com"
}
SMS Customization
Custom Message
{
"message": "Hi {{customerName}}! New invoice for ${{amount}}. Pay here: {{paymentLink}}"
}
Character limits:
- Standard SMS: 160 characters
- Extended SMS: 1,600 characters (multiple messages)
Tips:
- Keep it short and clear
- Include amount and due date
- Always include payment link
- Use merchant name
Scheduled Sending
Send invoice at specific time:
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_abc123/send \
-d '{
"sendVia": ["email"],
"email": "customer@example.com",
"scheduledAt": "2026-01-30T09:00:00Z"
}'
Use cases:
- Send during business hours
- Respect customer timezone
- Batch sending
- Delayed delivery
Resend Invoice
Resend previously sent invoice:
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_abc123/resend \
-d '{
"sendVia": ["email"],
"message": "Reminder: Invoice due in 3 days"
}'
Automatic tracking:
- Counts resend attempts
- Tracks delivery history
- Prevents spam (rate limiting)
Webhooks
invoice.sent
{
"type": "invoice.sent",
"data": {
"invoiceId": "inv_abc123",
"sentVia": ["email", "sms"],
"sentAt": "2026-01-28T12:00:00Z"
}
}
invoice.delivered
{
"type": "invoice.delivered",
"data": {
"invoiceId": "inv_abc123",
"method": "email",
"deliveredAt": "2026-01-28T12:01:00Z"
}
}
invoice.opened
{
"type": "invoice.opened",
"data": {
"invoiceId": "inv_abc123",
"openedAt": "2026-01-28T12:15:00Z",
"ipAddress": "192.168.1.1"
}
}
invoice.payment_link_clicked
{
"type": "invoice.payment_link_clicked",
"data": {
"invoiceId": "inv_abc123",
"clickedAt": "2026-01-28T12:16:00Z"
}
}
Best Practices
✅ DO:
- Personalize messages - Use customer name
- Include details - Amount, due date, invoice number
- Test delivery - Send test invoices first
- Track engagement - Monitor opens and clicks
- Provide multiple options - Email + SMS increases delivery
- Respect timezone - Send during business hours
- Make payment easy - Clear payment link/button
❌ DON'T:
- Don't spam - Limit resends to 2-3 max
- Don't send too late - Give adequate payment time
- Don't forget attachments - Include PDF for email
- Don't use generic messages - Personalize
- Don't skip testing - Test email rendering
- Don't ignore bounces - Update bad email addresses
Testing
Test Email Delivery
curl -X POST https://dev.auxcore.net/api/v1/invoices/inv_test_123/send \
-d '{
"sendVia": ["email"],
"email": "test@example.com",
"testMode": true
}'
Test mode:
- No actual delivery
- Returns what would be sent
- Validates all fields
- Checks template rendering
Troubleshooting
Email Not Delivered
Check:
- Email address valid?
- Not in spam folder?
- Email provider blocking?
- Attachments too large?
Solutions:
- Verify email address
- Check delivery status
- Add to safe senders list
- Reduce PDF size
SMS Not Delivered
Check:
- Phone number format (+1234567890)
- Country code included?
- Phone active?
Solutions:
- Verify phone format
- Check SMS credits
- Try different provider
Next Steps
Need help? Contact support@auxvault.com