Forward invoice to collection

When using an external system for invoicing, it is possible to forward overdue invoice that needs to be collected to the Kravia API. The requirements to transfer an invoice to collection are very basic:

  • Invoice details including invoice number, invoice date and due date

  • Customer contact information including postal address

    • Organization number is required for B2B claims

  • Overdue amount inc. VAT

Even though it is not strictly required, we do recommend to provide a copy of the original invoice when available.

Transfer an invoice to collectionCopied!

Register the invoiceCopied!

In order to register a new invoice for collection, you can use the following API endpoint.

curl https://api.kravia.ai/api/v2/invoice/register \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: YOUR_SECRET_TOKEN' \
  --data '{
    "claimType": "CollectionCase",
    "creditorId": 10759,
    "accountingInvoiceId": null,
    "debtorName":"John Doe",
    "debtorNumber": "10001",
    "email": "kevcaballero@gmail.com",
    "ssn": null,
    "organizationNumber": null,
    "isPrivateIndividual": "true",
    "postalAddress": 
    {        
        "addressAddressLine1": "Karl Johan Gate",
        "addressPostalCode":"1000",
        "addressCity":"Oslo",
        "addressCountryCode": "NO"
    },
    "invoiceNo": "20003",
    "invoiceDate":"2025-01-01",
    "dueDate":"2025-02-01",
    "originalAmount": 2250,
    "currencyCode": "NOK",
    "description": "Invoice XYZ to collection"
}'

Some key data elements:

  • You can provide all the customer details in each invoice request creation and kravia will automatically identify the customer card to use. Ensure the external customer number is used and passed as “debtorNumber” in order to ensure consistency

  • When building an integration, we do recommend passing your internal identifier as accountingInvoiceId as this can be used for reconciliation.

Upload a copy of the invoiceCopied!

Kravia supports sending attachment along with the invoice that we produce. To do so, you can use the generic document endpoint

curl 'https://api.kravia.ai/api/v2/invoice/{id}/document?type=Invoice' \
  --request POST \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: YOUR_SECRET_TOKEN' \
  --data "{"file":"BASE64_FILE_CONTENT"}"

Start the collection processCopied!

When the invoice and relevant documents are fully registered, you can trigger the invoicing process via the action API.

curl 'https://api.kravia.ai/api/v2/invoice/{invoiceId}/action?action=Start' \
  --request POST \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: YOUR_SECRET_TOKEN' \
  --data "{"Message":"Confirming invoice action"}"

Maintain the invoice up to dateCopied!

Once an invoice has been registered to collection, it is important to keep the invoice status up to date. To do so, it is recommended to provide the following information regularly:

  • Direct payments paid to the creditor directly

  • Credit notes

Register direct paymentsCopied!

You can register direct payments via the following API

curl https://api.kravia.ai/api/v2/invoice/payment \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: YOUR_SECRET_TOKEN' \
  --data '{
  "date": "2024-07-16",
  "description": "Direct payment registered manually",
  "AccountingPaymentId": "286519",
  "amount": 3000,
  "invoices": [
    {
        "invoiceId": 1553199,
        "amount": 2000
    },
    {
        "invoiceId": 1553198,
        "amount": 1000
    }
  ]
}'

Some key data elements:

  • We usually recommend registering the payments as they are received into the creditor’s bank account in order to match the data your accounting system. It is then possible to book the payments against multiple invoices at once

  • When registering payments,, we do recommend passing your internal identifier as AccountingPaymentId as this can be used for reconciliation.

Register a credit noteCopied!

Similarly to the direct payment, it is possible to credit part or an entire collection case using this API

curl https://api.kravia.ai/api/v2/invoice/creditnote \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: YOUR_SECRET_TOKEN' \
  --data '{
    "Date": "2024-09-16T00:00:00",
    "Amount": -2500,
    "AccountingPaymentId": "4564654465",
    "Description": "Outgoing kreditnota 34242",
    "Invoices": [
        {
            "InvoiceId": 308457,
            "Amount": -2500.0
        }
    ]
}'

Credit note and direct payments will only cover the original capital amount. Any registered payment or credit note that surpass the remaining capital amount will be ignored.