Sends the invoice to the customer's phone number and other CC phone numbers.
Sends an existing invoice to a customer's phone number via SMS. This endpoint enables businesses to notify customers about pending charges or remind them to make payments through a text message containing a payment link.
Key Features
- Sends an invoice link directly to the customer's primary phone number.
- Allows inclusion of additional recipients using CC phone numbers.
- Can be called immediately after creating or updating an invoice.
- Updates the invoice's status to SENT and records the timestamp in the
sent_at
field.
Usage Notes
Invoice Requirements
The invoice must exist and be linked to a valid id
.
The invoice must not be marked as deleted (deleted_at
must be null).
CC Phone Numbers
Use the ccPhones
field in the request body to send the invoice link to additional phone numbers.
Example:
{
"ccPhones": ["+15555555555", "+14444444444"]
}
Resending Invoices
Invoices can be sent multiple times as reminders. Each resend updates the sent_at
timestamp.
SMS Content
The text message includes the hosted invoice link for customers to view and pay their invoices.
Response Structure
Code | Response | Reason |
---|---|---|
200 | Success | The invoice was successfully sent via SMS. |
400 | Bad Request | Invalid or missing invoice ID or phone details. |
401 | Unauthorized | Authentication failed. |
404 | Not Found | An invoice with the specified ID does not exist. |
500 | Internal Server Error | Unexpected server error. |
Important Considerations
- Phone Number Format: Ensure all phone numbers, including CC numbers, follow international formats (e.g.,
[+15555555555](dialpad://%2B15555555555 "Call with Dialpad")
). - Draft Invoices: Only finalized invoices can be sent. Draft invoices (
status=DRAFT
) are not eligible. - Customer Access: The SMS will contain a link to the hosted invoice page for payment. Verify hosted invoice settings in Stax Pay.
- Audit Trail: Each send request is logged, and the
sent_at
field is updated to track when the invoice was sent.