Create an invoice
Create an invoice and email it to the customer, or schedule it with scheduledSendDate.
Authorizations
User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.
Headers
Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.
1 - 255The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.
^le_[a-zA-Z0-9]+$Body
Customer id with the le_cus_ prefix.
On or after issueDate.
The IANA timezone the invoice's dates are in.
1"America/New_York"
1 - 200 elementsThe account payments settle into, with the sa_group_ prefix. Required when the legal entity has more than one account that can receive payments.
A virtual account to settle into instead of the account's primary one, with the subaccount_ prefix.
Uppercase letters, digits, dashes and underscores. Defaults to the next number in your invoice settings.
1 - 50^[A-Z0-9_-]+$"INV-1042"
Email the invoice at 9:00 on this day in timezone instead of now. The invoice stays scheduled until then.
Taken off the line items' subtotal before tax.
- Percentage
- Fixed
Tax as a percent of the subtotal after the discount. 8.5 means 8.5%.
0 <= x <= 100A note printed on the invoice.
1 - 500Also copied on the invoice and its reminders.
10How the customer can pay, each type at most once. bank_transfer is always offered, so omit this to offer only that.
4Response
The created invoice.
A request for payment you send a customer. Slash emails it, hosts a payment page at payUrl, matches incoming deposits to it and keeps its status and amounts up to date. All amounts are in USD.
Invoice id with the inv_ prefix.
"inv_2rj4l7hmrrrcv"
Unique per legal entity.
"INV-1042"
See Invoice lifecycle.
scheduled, unpaid, partially_paid, paid, void Whether the invoice is unpaid or partially_paid and its due date has passed in its timezone.
The account payments settle into, with the sa_group_ prefix.
"sa_group_2rj4l7hmrrrcv"
The IANA timezone the invoice's dates are in.
"America/New_York"
Also copied on the invoice and its reminders.
The customer's details as they were when the invoice was created.
Oldest first.
The hosted page where the customer views and pays the invoice.
The invoice's PDF, with the st_ prefix. Download it with GET /v2/documents/{documentId}. Each edit issues a new PDF.
"st_2rj4l7hmrrrcv"
Customer id with the le_cus_ prefix.
"le_cus_2rj4l7hmrrrcv"
The virtual account payments settle into, with the subaccount_ prefix. Absent when they settle into the account's primary virtual account.
The recurring series that issued the invoice, with the inv_series_ prefix.
When a scheduled invoice will be emailed, at 9:00 in its timezone.
Taken off the line items' subtotal before tax.
- Percentage
- Fixed
Tax as a percent of the subtotal after the discount. 8.5 means 8.5%.
8.5
A note printed on the invoice.
When the next automatic reminder is due to go out.
When the invoice became paid.
When the invoice was voided.