Send an Invoice via SMS

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

CodeResponseReason
200SuccessThe invoice was successfully sent via SMS.
400Bad RequestInvalid or missing invoice ID or phone details.
401UnauthorizedAuthentication failed.
404Not FoundAn invoice with the specified ID does not exist.
500Internal Server ErrorUnexpected 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.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!