Create an Invoice

Creates an invoice for customers with advanced features like hosted payment pages, split funding, and customizable payment options

Creates an invoice for a customer, detailing items, taxes, memos, and more. Invoices can be sent immediately or saved as a draft for future editing and sending. Invoices generated through this endpoint can also integrate with the Stax Pay Hosted Invoice Page.

Key Features

Customer Management

Generates invoices tied to specific customers with detailed item listings, taxes, and custom memos.

Flexible Sending

Send immediately via email or save as drafts for future editing and sending.

Hosted Payment Pages

Integrates with Stax Pay Hosted Invoice Page for seamless customer payments.

Split Funding

Advanced feature to distribute payments across multiple bank accounts.

Usage Guide

Immediate Sending

  • Set send_now=true to send the invoice immediately
  • If omitted or set to false, the invoice will save as a draft

Draft Management

  • Draft invoices can be updated or sent later using the PUT /invoice/{id}/send endpoint
  • Perfect for preparing invoices in advance

API Response Reference

Response Codes
CodeResponseReason
201CreatedInvoice successfully created.
400Bad RequestInvalid invoice parameters or funding configuration.
401UnauthorizedAuthentication failed.
422Unprocessable EntitySplit funding amounts do not match the invoice total.
500Internal Server ErrorUnexpected server error.

Important Considerations

Configuration & Limitations

Customization Options

  • Configure hosted invoice pages in Stax Pay settings or during invoice creation via API
  • Custom fields support various payment scenarios and customer interactions

Data Restrictions

  • meta.lineitems.* is restricted to the ID, Quantity, Price, Item name, and Description
  • Ensure all required fields are properly formatted before submission

Best Practices

  • Test split funding configurations thoroughly before production use
  • Consider customer experience when designing hosted invoice pages
  • Use draft mode for complex invoices that require review
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!