Skip to main content
New German e-invoicing mandate from 2027: Kontier issues XRechnung and ZUGFeRD natively German e-invoicing 2027: XRechnung native

Choosing an API‑based billing platform: what to test in a trial

6 min read Kontier editorial team

Most billing platform trials go the same way. Someone sets up three plans in the dashboard, generates a test invoice, finds the PDF tidy and reports back that it "looks good". The problems arrive three months later: a network timeout produces a duplicate invoice, an error response says nothing more than {"error": "invalid request"}, or the webhook endpoint was down for an hour after a deploy and nobody knows which events were missed.

This article is a test plan for the evaluation. It assumes you already know which business objects you need (selling entity, tax profile, credit notes; see what a billing API for European B2B must model). The question here is how the API behaves in operation, and how to find out during a two-week trial.

The sandbox has to apply the same tax rules as production

A sandbox that shows 0% tax everywhere, or skips tax altogether, is useless for European B2B. You want to see the cases that cause trouble in production: reverse charge for a business customer in France, German VAT for a domestic customer, OSS treatment for a consumer in Italy.

Check three things:

  • Can you simulate a VAT number check in test mode, including a "service unavailable" response? If the sandbox accepts every number as valid, you never exercise the failure path.
  • Can you move the clock forward? A renewal, an invoice run and a dunning step should take minutes to play through, not 30 days.
  • Does the sandbox produce the same documents as production, including the XRechnung or ZUGFeRD file and not just the PDF?

Ask the vendor directly which parts of the sandbox are mocked. A straight answer is worth more than a polished demo.

A retry must not create a second invoice

Your backend sends POST /invoices, the connection drops after 30 seconds, and your HTTP client retries. Did the first call already create the invoice? Without an idempotency key you can't tell, and the customer may receive two invoices with two sequential numbers.

The usual pattern is an Idempotency-Key header that the client generates once per business operation and sends again on every retry. The behaviour is described in the IETF draft on the Idempotency-Key header. The draft has since expired without becoming an RFC, but the header name is common across payment and billing APIs.

During the trial, test the following:

  1. Send the same request twice with the same key. Expected: one invoice, the same response both times.
  2. Send the same key with a changed body, for example a different amount. Expected: an error, not silent acceptance of either value.
  3. Send two identical requests in parallel. Expected: one wins, the other gets a conflict status or the stored response.
  4. Ask the vendor how long keys are kept. If it's 24 hours, your retry logic has to stay inside that window.

Check which endpoints accept keys at all. If only payments are idempotent and invoices and credit notes aren't, the riskiest operation is still uncovered.

Error responses your code can branch on

A billing API reports a lot of business errors: invalid VAT number, invoice already finalised, price version expired, currency doesn't match the contract. Your code has to tell these apart to react correctly, and your support team has to be able to read them.

RFC 9457 defines a standard format for this, "problem details", with the media type application/problem+json. A response looks roughly like this:

JSON
{
  "type": "https://api.example.com/problems/invoice-finalized",
  "title": "Invoice is finalized",
  "status": 409,
  "detail": "INV-2026-0412 was finalized on 2026-03-31 and cannot be edited. Create a credit note instead.",
  "instance": "/invoices/inv_8KQ2"
}

The field that matters is type: a stable identifier your code can branch on instead of parsing error text. In the trial, trigger five different errors and check that the format is the same everywhere, that validation errors name the offending field, and that status codes make sense: 409 for state conflicts, 422 for semantically invalid data, 429 with Retry-After for rate limits. Whether the vendor follows RFC 9457 to the letter matters less than whether it is consistent.

Take the webhook endpoint down on purpose

Webhooks usually get tested on the happy path only. The more useful question is what happens when your endpoint doesn't respond. Switch it off for an hour during the trial and create invoices and payments in the meantime. Then check:

  • Are the events redelivered, and on what schedule?
  • Can you request missed events again, or list them through the API?
  • Are deliveries signed, and is the scheme documented, ideally following an open standard?

How to build the receiving side (signature checks, ordering, replay protection) is covered in integrating webhooks into billing.

How the vendor changes the API over time

You'll be tied to a billing API for years. The vendor will add fields, change error codes and retire endpoints. Ask during selection:

  • Is there an explicit API version, per request or per account, that you can pin?
  • How long are old versions supported, and how are deprecations announced?
  • Is there a public, dated changelog?

A vendor that announces changes only by newsletter forces you to recheck your integration every week.

What you can take with you when you leave

Hardly anyone tests the exit during a trial. Yet invoices carry retention duties (eight years in Germany), and if you switch vendors, issued documents must remain available, readable and unchanged.

Find out: can every invoice, credit note, customer, contract and raw usage record be exported through the API? Do you get the original documents (PDF and XML) or only metadata? Is there a bulk export, or only paginated queries behind a rate limit? For the move in the other direction, see how a billing migration is structured.

A two‑week trial plan

Day Test Passes if
1 Sandbox: create a reverse-charge, a domestic and an OSS customer, one invoice each Tax treatment and mandatory details correct, e-invoice file generated
2 Simulate a VAT check returning "service unavailable" Invoice stays a draft, or the rule is configurable
3 POST /invoices twice, in parallel, and with a changed body Exactly one invoice, error on changed body
4 Trigger five business errors One format, stable error types, sensible status codes
5 Take the webhook endpoint down for an hour Delivery is retried, gaps can be backfilled
6 Advance the clock: renewal, failed payment, dunning step Runs without manual steps, events arrive in a usable order
8 Try to edit a finalised invoice API refuses and points to a credit note
10 Full export of all test data Original documents and raw data complete

Whatever fails in this plan will fail later in production, at higher cost. The plan works with any vendor, Kontier included; the Kontier developer documentation is the place to start.

Not tax or legal advice. This post describes the law and common practice in general terms. For your own case, ask your tax adviser. As of:

Book a demo

A technical demo: 15 minutes with an engineer on your pricing model and tax setup.

How we handle your details: privacy policy.

Prefer email? contact@frontieralgorithmics.com

Message Kontier

Write to us right here. We reply by email, usually within one business day.

How we handle your details: privacy policy.

Personal invitation · 30 days

Try Kontier for 30 days, with a personal invite

We set up a trial account for you and send the invite personally. No credit card, the trial ends on its own.

Your invite arrives within 48 hours at the address you enter, sent by a person, not a script.

Separate from the public 14-day trial, which starts with a card on the pricing page.