Create Invoices

Generate single or mulitple invoices on the Finexio platform

You should now have the two buyers and one supplier we initially created at account set up, along with any additional suppliers you successfully created with the 'Create Counterparty' endpoint. Now it is time to create your invoice(s).

You can create one invoice or multiple (up to 500) invoices per batch using Batch Create Invoices.

First we will create one invoice using buyer, FinexioTest1, with an id of 0b575520-d4fc-47a5-a27a-7b2c062e075f and supplier, Tire Supply, with id of b1d5a7e8-62fa-4e38-93bf-6be23bdefa82.

The date of your invoice is March 24, 2023, and the due date is March 25, 2023. The invoice amount is $100, and we will notate it as "April's Annual Tire Order.”

A single invoice in a batch request will be similar to below:

[
  {
    "amount_cents": 10000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "payment_id": null,
    "reconciliation_id": "Check No. 1144",
    "account_number": "564545454"
  }
]

A successful response for the single invoice sample above will look similar to:

[
  {
    "id": "inv_e3c3283bd77b44b1a26361dc0562efdb",
    "amount_cents": 10000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "metadata": {},
    "payment_id": null,
    "reconciliation_id": "Check No. 1144",
    "created": "2021-12-04T04:25:35.067989",
    "updated": "2021-12-04T04:25:35.067997",
    "account_number": "564545454"
  }
]

👍

Keep track of Invoice IDs

The "id" column on return JSON objects returned in the array represents the unique identifier you need to keep track of and reference when you want to get status updates or make future changes to invoices.

If you do not have an ID handy, you can review List Counterparties or the List Counterparties endpoint to get a list of counterparties and their corresponding IDs.

Multiple invoices can be created simultaneously by passing an array of invoices:

🚧

Multiple invoices are passed as Arrays

Please note that this endpoint requires invoices to be passed as an array. If you are sending 1 invoice, this will be an array containing a single object. You can send multiple invoice objects in the array to create multiple invoices in a single batch.

📘

Maximum Invoices per batch

You can create a maximum of 500 invoices per batch.

You can also create multiple invoices per batch. In the below example, we are creating 2 invoices, $100 and $200.

An example of passing multiple invoices would look like this:

[
  {
    "amount_cents": 10000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "payment_id": null,
    "reconciliation_id": "Check No. 1144",
    "account_number": "564545454"
  },
  {
    "amount_cents": 20000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12346",
    "note": "April's Annual Brake Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "payment_id": null,
    "reconciliation_id": "Check No. 1145",
    "account_number": "68484854"
  }
]

Your response will contain an ID for each invoice created in the batch. You can use these IDs to retrieve the invoice(s) and obtain payment information.

[
 {
    "id": "inv_ucqrciuy357w7oha23k0",
    "amount_cents": 10000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "payment_id": null,
    "reconciliation_id": "Check No. 1145",
    "created": "2023-03-24T21:08:42.974067",
    "updated": "2023-03-24T21:08:42.974073",
    "account_number": "68484854"
 },
 {
    "id": "inv_ghytuenxw5jwco3aary8",
    "amount_cents": 20000,
    "currency": "USD",
    "discount_amount_cents": 0,
    "invoice_date": "2023-03-24",
    "invoice_due_date": "2023-03-25",
    "invoice_number": "12346",
    "note": "April's Annual Brake Order",
    "originating_counterparty_id": "0b575520-d4fc-47a5-a27a-7b2c062e075f",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
    "payment_id": null,
    "reconciliation_id": "Check No. 1145",
    "created": "2023-03-24T21:08:43.017807",
    "updated": "2023-03-24T21:08:43.017814",
    "account_number": "68484854"
  }
]