Invoices

Use the Invoices API to list and create invoices in the Finexio platform. Invoices that are created using this API will automatically be converted into payments and submitted for processing.

The invoice creation API supports creating multiple invoices in the platform using a single call.

A sample request to create a single invoice would look like this:

[{
    "amount_cents": 10000,
    "discount_amount_cents": 0,
    "invoice_date": "2021-11-22",
    "invoice_due_date": "2021-11-23",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "1d71f923-edb3-48a1-aec8-444d75f11f89",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82"
}]

A sample request to create two invoices would look like this:

[{
    "amount_cents": 10000,
    "discount_amount_cents": 0,
    "invoice_date": "2021-11-22",
    "invoice_due_date": "2021-11-23",
    "invoice_number": "12345",
    "note": "April's Annual Tire Order",
    "originating_counterparty_id": "1d71f923-edb3-48a1-aec8-444d75f11f89",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82"
},
{
    "amount_cents": 15000,
    "discount_amount_cents": 0,
    "invoice_date": "2021-10-22",
    "invoice_due_date": "2021-11-23",
    "invoice_number": "23456",
    "note": "June's Annual Tire Order",
    "originating_counterparty_id": "1d71f923-edb3-48a1-aec8-444d75f11f89",
    "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82"
}]

If successful, the creation action would return a response that looks like the following. Note that additional information has been added to the invoice information that relates to the invoice processing.

[
    {
        "id": "inv_e3c3283bd77b44b1a26361dc0562efdb",
        "url": "https://stage.api.finexio.com/v1/invoices/inv_e3c3283bd77b44b1a26361dc0562efdb/",
        "created": "2021-12-04T04:25:35.067989",
        "updated": "2021-12-04T04:25:35.067997",
        "amount_cents": 10000,
        "currency": "USD",
        "discount_amount_cents": 0,
        "invoice_date": "2021-11-22",
        "invoice_due_date": "2021-11-23",
        "invoice_number": "123458",
        "line_items": [],
        "note": "April's Annual Tire Order",
        "originating_counterparty_id": "1d71f923-edb3-48a1-aec8-444d75f11f89",
        "receiving_counterparty_id": "b1d5a7e8-62fa-4e38-93bf-6be23bdefa82",
        "metadata": {},
        "status": "pending",
        "status_detail": {},
        "installments": [
            {
                "id": "inst_4a3c1db8bd6643018bfbbb7cd2f5ef7b",
                "created": "2021-12-04T04:25:35.071880",
                "amount_cents": 10000,
                "due_date": "2021-11-23",
                "payment_id": null
            }
        ],
        "payment_id": null
    }
]

Please take note of the “id” field in the invoice objects in the response. This is the unique id number for the invoice as stored in the Finexio platform.