Nox Finans Invoice
This best practice example describes how to create an invoice in Fortnox and transfer it to Nox Finans ledger and factoring services.
Important before you start
Please note that you need to get a special sandbox instance of Fortnox to test Nox Finans services, if you are using a production sandbox, it will send out invoices and start reminder process and charge you for the service.
Types of services
A Fortnox user can let Nox Finans handle their customer ledger. Nox Finans offers currently four types of services
Ledgerbase
Service means that Nox Finans are sending invoices to end customer and coverage customer ledger with reminders and collection.
Precondition
General
- Scope of your application registered to Fortnox must contain “Invoice Noxfinans”
- Nox Finans services must have been activated in client database
Invoices
- Invoice must have been created in Fortnox (Manually or by API)
- Invoice must have an open balance >0
- Invoice date is not allowed to be older than two years
- Currency of Invoice must be in SEK
- Invoice contains at least name, address, zip and city
- Invoice must contain one invoice records
- Interest invoices are not permitted to be sent to Nox Finans
Credit invoices
- Credit Invoice in Fortnox must have a connection to a debit invoice
- Debit invoice must have a open balance >= credit invoice amount
Retrieve a Nox Finans Invoice
Retrieves the status and balance of an invoice sent to Nox Finans. You need to supply the invoice number in Fortox to retrieve list of invoice
Examples
Request
curl -X "GET" "https://api.fortnox.se/3/noxfinansinvoices/72" \
-H "Access-Token: 61cf63ae-4ab9-4a95-9db5-753781c4f41f" \
-H "Client-Secret: 3Er4kHXZTJ" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Response
{ "NoxFinansInvoice": { "@url": "https://api.fortnox.se/3/noxfinansinvoices/72", "BalanceIncludeFees": 67.84, "BalanceIncludeFeesCurrency": 67.84, "CurrentCapitalBalance": 67.84, "CurrentCapitalBalanceCurrency": 67.84, "InvoiceDocumentURL": "https://doc.noxfinans.se/documents/f0206b41-bc35-48c6-b630-7dd3a02ca5e2.pdf", "InvoiceNumber": "72", "NextEvent": "COLLECTION", "NextEventDate": "2015-06-25", "OCRNumber": "002638100105050", "Service": "LEDGERBASE", "Status": "PAUSED" } }
Send a Nox Finans invoice
When sending an invoice to Nox Finans you will get the invoice status returned if everything succeeded, if there was any problems an error will be returned.
Please note that it can take 1 min to several hours before you will get back status, ocr number and link to PDF document, meanwhile the invoice will have status UNKNOWN or NOT_AUTHORIZED.
Nox Finans is today only accept invoices in SEK.
Examples
Request
curl -X "POST" "https://api.fortnox.se/3/noxfinansinvoices" \
-H "Access-Token: 61cf63ae-4ab9-4a95-9db5-753781c4f41f" \
-H "Client-Secret: 3Er4kHXZTJ" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
-d $'{
"NoxFinansInvoice": {
"InvoiceNumber": "7201",
"SendMethod": "LETTER",
"Service": "LEDGERBASE"
}
}
Response
{ "NoxFinansInvoice": { "@url": "https://api.fortnox.se/3/noxfinansinvoices/7201", "BalanceIncludeFees": null, "BalanceIncludeFeesCurrency": null, "CurrentCapitalBalance": null, "CurrentCapitalBalanceCurrency": null, "InvoiceDocumentURL": "https://doc.noxfinans.se/documents/", "InvoiceNumber": "7201", "NextEvent": null, "NextEventDate": null, "OCRNumber": null, "Service": "LEDGERBASE", "Status": "UNKNOWN" } }
Actions
Name | Description |
Pause | Temporarily pause an invoice up to 60 days. Pause means that Nox Finans reminder process will stop for the invoice. Pause can be made for all invoices that not have status OPEN. |
Stop | Removes the invoice from Nox Finans process. |
For information about how to use actions, please read this article.
Properties
Name | Description |
BalanceIncludeFees | float, read-only Balance fees in currency in SEK |
BalanceIncludeFeesCurrency | float, read-only Balance fees in currency (today is only SEK available) |
CurrentCapitalBalance | float, read-only Capital amount balance in SEK |
CurrentCapitalBalanceCurrency | float, read-only Capital amount balance in currency (today is only SEK available) |
InvoiceDocumentURL | string, read-only URL to PDF document for invoice |
InvoiceNumber | integer, read-only Invoice number in Fortnox |
NextEvent | float, read-only INVOICEREMINDER REMINDER COLLECTION EXECUTIONCONTROLL MONITORING |
NextEventDate | Date, read-only |
OCRNumber | string, read-only OCR number generated by Nox Finans. |
Service | string LEDGERBASE |
SendMethod | string EMAIL = EmailNONE = Nox Finans do not distribute invoice (can not be selected on Reminder service) LETTER = Send by letter |
Status | string, read-only UNKOWN = Not yet confirmed by Nox Finans NOT_AUTHORIZED = Factoring invoice waiting approval OPEN = Open PAUSED = Invoice pause CLOSED = Invoice is closed |
Best Practice
Send invoices
Distribution method
When sending an invoice to Nox Finans user shall input a valid distribution method.
LETTER means that Nox Finans will send invoice by letter to end customer (For service reminder this is the only option)
EMAIL means that Nox Finans will send invoice by email to end customer
NONE means that Nox Finans will coverage customer ledger but will not send out any invoices. This functions shall be used if client have an agreement with Nox Finans to distribute the invoice by them self .
Service
LEDGERBASE, REMINDER, FACTORING_LOAN, or FACTORING_SELL
Post
Url:
https://api.fortnox.se/3/noxfinansinvoices/
Request
{ “NoxFinansInvoice”: { “InvoiceNumber”: “7200”, “SendMethod”: “LETTER”, “Service”: “LEDGERBASE” } } |
Response
If request is successful Nox Finans response information about invoice, otherwise error message. Please note that most of the response is null data. It takes Nox Finans from some min to several hours to confirm, meanwhile the invoice have status UNKNOWN or NOT_AUTHORIZED.
{ “NoxFinansInvoice”: { “@url”: “https://api.fortnox.se/3/noxfinansinvoices/7200”, “BalanceIncludeFees”: null, “BalanceIncludeFeesCurrency”: null, “CurrentCapitalBalance”: null, “CurrentCapitalBalanceCurrency”: null, “InvoiceDocumentURL”: null, “InvoiceNumber”: “7200”, “NextEvent”: null, “NextEventDate”: null, “OCRNumber”: null, “Service”: “LEDGERBASE”, “Status”: “UNKNOWN” } } |
Request status of invoice
GET
Url:
https://api.fortnox.se/3/noxfinansinvoices/(INVOICENUMBER)
Response
If an invoice are confirmed Nox Finans will return information of balance of invoice with and without possible reminder fees. Response also contain url to invoice PDF, current status and generated ocr number.
Response if invoice is confirmed
{ “NoxFinansInvoice”: { “@url”: “https://api.fortnox.se/3/noxfinansinvoices/7200”, “BalanceIncludeFees”: 693.75, “BalanceIncludeFeesCurrency”: 693.75, “CurrentCapitalBalance”: 693.75, “CurrentCapitalBalanceCurrency”: 693.75, “InvoiceDocumentURL”: “https://doc.noxfinans.se/documents/de8a3bbb-184e-4329-8e81-32d4edcba9f4.pdf”, “InvoiceNumber”: “7200”, “NextEvent”: “INVOICEREMINDER”, “NextEventDate”: “2017-05-10”, “OCRNumber”: “002638101082357”, “Service”: “LEDGERBASE”, “Status”: “OPEN” } } |
Response if invoice is waiting confirmation
{ “ErrorInformation”: { “error”: 1, “message”: “Fakturan bearbetas i Nox Finans. Prova igen om en stund.”, “code”: 2002866 } } |
Paus Fortnox invoice
PUT
Url:
https://api.fortnox.se/3/noxfinansinvoices/{InvoiceId}/pause
Request Body:
{
“NoxFinansInvoice”:
{ “PausedUntilDate”: “2019-02-01” }
}
PausedUntilDate is a string that accepts date format.