logo

SmartBill

How it Works?

Using the Smartbill API is designed to be as straightforward as possible. There are only two main steps you need to follow:

  • Generate Smartbill API keys
  • Send the Document

Smartbill API Keys

You can generate as many API keys as you need to manage your account. Each key consists of a public key and a private key, both of which must be included in every request you make to the Smartbill API. When creating an API key, you can also assign a role to it either manager or transmitter.

The only difference is that a key with the manager role can invalidate documents, while a transmitter key is not allowed to perform this action. These keys are essential for authenticating and securing your interactions with the API.

Document

The Smartbill API is designed to make handling documents simple and efficient. Here's how it works in detail:

Sending

The goal of the Smartbill API is to keep everything clear and simple. That's why we won't ask you for a lot of data just the necessary information to process the document. However, that doesn't mean we're not prepared for extraordinary cases! You'll still have access to a wide range of properties, allowing you to handle any specific needs your customers may have.

Access

We prefer to send the document data via URLs. This method ensures greater accessibility for your clients and offers an additional benefit: if the document needs to be updated (such as for an invalidation event or contingency event), the data will update automatically. There's no need to send a new email, avoiding unnecessary spam for your clients.

Response

Each request to the Smartbill API typically takes between 700ms and 2 seconds to process a document, so you won't have to wait long for a response. If Hacienda is down and the document has to go through contingency, the response will take around 2 seconds.

Why does it sometimes take longer?
Hacienda requires us to make multiple attempts to send the document. If all attempts fail, we then proceed with the contingency event automatically.

Contingency

At Smartbill, we handle the contingency process so you don't have to worry about it. However, there are two things that will change during contingency:

  • Response time may take up to 2 seconds.
  • Documents sent during contingency won't include the Hacienda received stamp.

You can easily view which documents are in a contingency state through the Smartbill platform. To send these documents, there are two options:

  • You can manually trigger the process by pressing a button to start sending the contingency documents.
  • Alternatively, you can wait until the end of the month, when Smartbill will automatically send all contingency documents on your behalf.