In iXpole, you have created sales and contract for your events or matches. Everything you need to have to collect your payment is present, but in iXpole, we don't create invoices. Invoices is a very specific matter of the sales process, and there are a lot of tools who handle this far better than we could do. Therefore, we have created several API endpoints, so your accounting system would be able to create those invoices for you...

In this article you will learn how to use the API to create invoices in your accounting package.

Let's get you started


In order to create invoices, you need to perform following steps:

  1. Get new instalments which need to be invoiced
  2. Create/Update customers
  3. Create/Update products
  4. Update invoice data from your accounting system
  5. Update payment status of invoice

  

1. Get new instalments which need to be invoiced

To get the new instalments, you need to call GET api/instalments

This will provide you a list with all the info you need to create the invoice. But you need to check if this might be for a new customer and might contain a new product

2. Create/Update customers

When you are going to create an invoice, you should create or update the customer. To get all the info of a customer, use GET api/customer/{CustomerId}

If your accounting system is responsible for generating the customer code, you can update the customer code in iXpole using PATCH api/customers/{customerId} after you have created the customer in your accounting system.

3. Create/Update products

When you are going to create an invoice, you should check if every product exists in your accounting systsem. If the product does not exists yet, you can get all the product info using GET api/products/{ProductId}

4. Update invoice data from your accounting system

When the invoice has been created in your accounting system, you need to inform iXpole that this has happened. To update the instalment in iXpole, use PUT api/instalments.

We expect following data to be returned to us from the accounting system:

  • InstalmentCode = This is the key on which the invoice in your accounting system and the instalment in iXpole are matched.
  • invoicenumber = This is the invoice number from the accounting system
  • invoice duedate = This is the invoice duedate
  • PDF layout to be returned = This is the PDF layout of the invoice. To be provided in BASE64 string.

If your interface creates a draft invoice or sales order, in stead of a real invoice, you should first return ‘D’ + document number to iXpole. This will set the status of the instalment in iXpole to Pending and makes sure that this instalment will not be provided a second time when you call GET api/instalments.

Afterwards, when the real invoices has been created, you can still provide us the actual data using the same PUT api/instalments endpoint.

5. Update payment status for your invoice

When the invoice has been fully paid, you can update the payment status in iXpole.
You also need to use PUT api/instalments.

We expect following data to be returned to us from the accounting system:
  • InstalmentCode = This is the key on which the invoice in your accounting system and the instalment in iXpole are matched.
  • paymentNo= This is the payment refrerence number from the accounting system