Skip to main content

German Invoicing API

This is a set of APIs meant for managing electronic invoicing in Germany.

A-Cube API DE helps you to handle E-Invoicing through simple REST APIs.

When you get onboard the A-CUBE API Platform, you will receive:


You will also need to register a Legal Entity in A-Cube API DE.


This is the process to create and send an invoice explained in few steps:

  1. Login into the platform to obtain a JWT token
  2. Create a Legal Entity that you wanna use as invoice sender
  3. Create an invoice payload in JSON or XML format and send it to POST /invoices
  4. The invoice payload gets validated, translated into XML format and sent to the recipient
  5. Every notification will be dispatched in real time to the configured endpoints.

Environments

  • Sandbox is the environment where you can test the entire platform for free, the communication with the Tax Authority is simulated. The base URL is https://de-sandbox.api.acubeapi.com
  • Production is the environment where the communication is real, you can't send an invoice to test. The base URL is https://de.api.acubeapi.com

We support the following TLS protocols: TLSv1_2016 TLSv1.1_2016 TLSv1.2_2018

Authentication

To obtain a JWT token send a POST https://common.api.acubeapi.com/login (or POST https://common-sandbox.api.acubeapi.com/login in case your working on the sandbox environment) specifying the HTTP header Content-Type: application/json with the following payload

{
"email": "your@email.com",
"password": "your password"
}

If the login went fine you will receive a response with

{
"token": "a very long encrypted token"
}

The token you receive is a Json-Web-Token (JWT) that lasts 24 hours. The token is composed by 3 parts, each part is delimited by a dot (.) char. Exploding the token by . and doing a base64 decode of the second part you will obtain some useful information. Example:

{"iat":"<issue timestamp>","exp":"<expire timestamp>","roles":{"<project name>": ["ROLE_WRITER"]},"username":"<your email>","uid":"<your identifier>"}

You can ask for a token once in 24 hours.

The token must be set as Bearer into the Authorization header. Example:

curl -X GET
https://de-sandbox.api.acubeapi.com/legal-entities
-H 'Accept: application/json'
-H 'Authorization: Bearer <here the received token>'

Invoice UUID

Every invoice in the platform is identified by a UUID. This key is received for both created and received invoices.

Webhooks

All the messages sent to your endpoint are sent with a POST request. We manage sending the messages to your endpoints with a queue: if your endpoint fails (we don't get a 200 family response), then the webhook system will retry 15 times every 300 seconds with a back-off rate of 1.25 for a total of about 10 hours. Find out more here