Skip to main content

Webhooks

The Smart Receipts API provides a number of events that you can subscribe to. These events are triggered by various actions that occur within the Smart Receipts system. When an event is triggered, Smart Receipts will send a POST request to the webhook URL that you have configured.

Configuration and security

You can setup a webhook by using API endpoint POST /webhooks.

You can verify the webhook signature by following the instructions here.

Event Types

The following events are available:

receipt

This event is triggered when a new receipt is submitted and ready to download. The event payload is as follows:

{
"return_receipts": [],
"voiding_receipt": {},
"returned_receipt": {},
"voided_receipt": {},
"uuid": "string",
"type": "sale",
"status": "ready",
"fiscal_id": "string",
"created_at": "string",
"total_amount": 0,
"transaction_id": "string",
"document_number": "string",
"document_date": "string"
}

receipt-error

This event is triggered when the Tax Authority portal reports an error.

The event payload is as follows:

{
"uuid": "string",
"event": "failed",
"message": "string",
"code": "string",
"sent_at": "datetime"
}

Error codes you can receive are:

CodeMessageNotes
400BAD_REQUESTProvided data is not valid or a generic error happened
400Receipt could not be confirmed the same day it was requestedReceipt could not be delivered in time to the Tax Authority (before 23.58 of the day it was requested)
403CANNOT_SEND_DATA_FOR_THIS_LEGAL_ENTITYThe BusinessRegistryConfiguration VAT number is not valid
422INVALID_CREDENTIALSCredentials of the BusinessRegistryConfiguration are not valid
500SERVICE_UNAVAILABLEThe Tax Authority portal is not available at the moment

receipt-retry

This event is triggered when the communication with the Tax Authority portal failed, and we will retry to send the receipt again.

The event payload is as follows:

{
"uuid": "string",
"event": "retry",
"message": "string",
"code": "string",
"sent_at": "datetime"
}

Error codes you can receive are:

CodeMessageNotes
400BAD_REQUESTProvided data is not valid or a generic error happened
403CANNOT_SEND_DATA_FOR_THIS_LEGAL_ENTITYThe BusinessRegistryConfiguration VAT number is not valid
422INVALID_CREDENTIALSCredentials of the BusinessRegistryConfiguration are not valid

appointee

This event is triggered when the process of giving an appointing for smart receipts succeeded.

The event payload is as follows:

{
"appointing_operation": "receipt",
"appointee": "string",
"appointing_person": "string",
"business_registry": "string",
"status": "completed"
}