API Status Support Dashboard

Invoice Sending & Delivery

Send invoices via email, SMS, and generate shareable payment links.


Overview

Multiple ways to deliver invoices to customers:


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:


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:

Tips:


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:


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:


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:

❌ DON'T:


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:


Troubleshooting

Email Not Delivered

Check:

  1. Email address valid?
  2. Not in spam folder?
  3. Email provider blocking?
  4. Attachments too large?

Solutions:

SMS Not Delivered

Check:

  1. Phone number format (+1234567890)
  2. Country code included?
  3. Phone active?

Solutions:


Next Steps


Need help? Contact support@auxvault.com