# Invoices

An invoice represents a billed amount a merchant sends to a customer for payment.
A normal collection is an amount received immediately at the point of sale.
A direct transaction captures a customer's card or bank details right away.
An invoice works differently.
It lets the merchant establish the amount owed first.
The customer can then act on it separately.
The customer reviews an itemized total.
Then the customer pays by card or ACH, on their own schedule.
The Invoices endpoints support creating, editing, publishing, and collecting payment on an invoice.
A draft invoice can be updated or deleted, but a published invoice cannot be deleted.
Once published, an invoice can be submitted for card or ACH payment, canceled, or marked as paid.
Additional endpoints send email or SMS notifications, calculate totals, and download a PDF copy.
For more information about invoices, see Invoices.
The following invoice endpoints are available.
| Endpoint | Description |
|  --- | --- |
| GET /pay-int-api/invoices | Lists invoices for the current merchant, filtered by the specified query parameters. |
| POST /pay-int-api/invoices | Creates a new invoice in Draft status. |
| GET /pay-int-api/invoices/{invoiceId} | Retrieves a single invoice's details. |
| PUT /pay-int-api/invoices/{invoiceId} | Updates a specified invoice. |
| DELETE /pay-int-api/invoices/{invoiceId} | Deletes an invoice; published invoices cannot be deleted. |
| POST /pay-int-api/invoices/publish | Publishes an invoice, sending it to the customer. |
| POST /pay-int-api/invoices/{invoiceId}/submit | Submits an invoice for card payment processing. |
| POST /pay-int-api/invoices/{invoiceId}/ach/submit | Submits an invoice for ACH payment processing. |
| PUT /pay-int-api/invoices/{invoiceId}/cancel | Cancels a published, unpaid invoice. |
| PUT /pay-int-api/invoices/{invoiceId}/mark-as-paid | Marks a published, unpaid invoice as paid. |
| GET /pay-int-api/invoices/{invoiceId}/calculations | Retrieves the calculated totals for an invoice. |
| GET /pay-int-api/invoices/{invoiceId}/download-pdf | Downloads a PDF copy of the invoice. |
| POST /pay-int-api/invoices/{invoiceId}/send-email-notification | Sends the invoice to the customer by email. |
| POST /pay-int-api/invoices/{invoiceId}/send-published-sms-notification | Sends the invoice to the customer by SMS. |

 - [GET /pay-int-api/invoices](https://developer.flute.com/api-reference/invoices/flute-v1-get-pay-int-api-invoices.md): GET {{baseURL}}/pay-int-api/invoices This endpoint retrieves a paginated list of invoices belonging to the current merchant. Results can be filtered by date range, status, or a search string. Filterab
 - [POST /pay-int-api/invoices](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices.md): POST {{baseURL}}/pay-int-api/invoices This endpoint creates a new invoice for the merchant. A newly created invoice is saved in `Draft` status. A draft invoice isn't visible to the customer yet. It ca
 - [GET /pay-int-api/invoices/{invoiceId}](https://developer.flute.com/api-reference/invoices/flute-v1-get-pay-int-api-invoices-invoiceid.md): GET {{baseURL}}/pay-int-api/invoices/{{invoiceId}} This endpoint retrieves an invoice by ID. The following is an example request. ```http GET /pay-int-api/invoices/{{invoiceId}} HTTP/1.1 Authorizatio
 - [PUT /pay-int-api/invoices/{invoiceId}](https://developer.flute.com/api-reference/invoices/flute-v1-put-pay-int-api-invoices-invoiceid.md): PUT {{baseURL}}/pay-int-api/invoices/{{invoiceId}} This endpoint updates a specified invoice. Care must be taken to complete all the fields with the existing information. See Also: To list invoices,
 - [DELETE /pay-int-api/invoices/{invoiceId}](https://developer.flute.com/api-reference/invoices/flute-v1-delete-pay-int-api-invoices-invoiceid.md): DELETE {{baseURL}}/pay-int-api/invoices/{{invoiceId}} This endpoint deletes an invoice. Deleting an invoice permanently removes it from the merchant's records. Only a Draft invoice can be deleted. Onc
 - [POST /pay-int-api/invoices/{id}/submit](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices-invoiceid-submit.md): POST {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/submit This endpoint submits an invoice for only card payments processing. Submitting an invoice charges a card directly against its total, without
 - [POST /pay-int-api/invoices/{invoiceId}/ach/submit](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices-invoiceid-ach-submit.md): POST {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/ach/submit This endpoint submits an ACH invoice for processing. Submitting an invoice for ACH charges a bank account directly against its total, wit
 - [GET /pay-int-api/invoices/{invoiceId}/calculations](https://developer.flute.com/api-reference/invoices/flute-v1-get-pay-int-api-invoices-invoiceid-calculations.md): GET {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/calculations This endpoint retrieves the calculated totals for the specified invoice. It returns the breakdown behind the invoice's final amount, not
 - [POST /pay-int-api/invoices/publish](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices-publish.md): POST {{baseURL}}/pay-int-api/invoices/publish This endpoint publishes an invoice. See Also: To create an invoice, see POST /pay-int-api/invoices. To retrieve an invoice by ID, see GET /pay-int-api/inv
 - [PUT /pay-int-api/invoices/{invoiceId}/cancel](https://developer.flute.com/api-reference/invoices/flute-v1-put-pay-int-api-invoices-invoiceid-cancel.md): PUT {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/cancel This endpoint cancels an invoice. Only invoices in published (Due, Past Due) status and not paid can be canceled. Care must be taken to compl
 - [PUT /pay-int-api/invoices/{invoiceId}/mark-as-paid](https://developer.flute.com/api-reference/invoices/flute-v1-put-pay-int-api-invoices-invoiceid-mark-as-paid.md): PUT {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/mark-as-paid This endpoint marks an invoice as paid. Only invoices in published (Due, Past Due) status and not paid can be marked as paid. Care must
 - [POST /pay-int-api/invoices/{invoiceId}/send-published-sms-notification](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices-invoiceid-send-published-sms-notification.md): POST {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/send-published-sms-notification This endpoint sends an invoice notification by SMS. See Also: To retrieve an invoice by ID, see GET /pay-int-api/inv
 - [POST /pay-int-api/invoices/{invoiceId}/send-email-notification](https://developer.flute.com/api-reference/invoices/flute-v1-post-pay-int-api-invoices-invoiceid-send-email-notification.md): POST {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/send-email-notification This endpoint sends an invoice notification by email. See Also: To retrieve an invoice by ID, see GET /pay-int-api/invoices/
 - [GET /pay-int-api/invoices/{invoiceId}/download-pdf](https://developer.flute.com/api-reference/invoices/flute-v1-get-pay-int-api-invoices-invoiceid-download-pdf.md): GET {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/download-pdf This endpoint downloads the specified invoice as a PDF document. Available only for published invoices. See Also: To retrieve an invoice
