Webhook

General

After the successful transmission and delivery of the tax data to the tax authorities, the PDF transfer protocol (as a base64-encoded string) can be automatically passed together with the official transfer ticket to a defined endpoint.

The webhook is disabled by default.

Enabling

Set the following environment variable in docker-compose.yml

HOOK_ENABLED: true

Endpoint

The URI can be adjusted as needed:

HOOK_URI: https://target.tld/hook-endpoint

Example endpoint

For testing an example endpoint is provided within the solution

The example endpoint processes the received data in-memory. Only the transmitted base64-encoded string is decoded and saved.

hook-endpoint

POST http://deric:8080/dummy/hook-endpoint

Example endpoint for accepting the notification of the successful transmission of the tax data to the tax authorities.

Query Parameters

Name
Type
Description

Content-Type

string

application/json

Request Body

Name
Type
Description

ticket

string

Ticket ID

transfer_ticket

string

Transfer Ticket (generated by tax authorities)

file_name

string

File name

file_content

string

base64-encoded content of the file

store

boolean

true (default) - store the file

{
    "success": true,
    "code": 0,
    "locale": "de",
    "message": "OK",
    "data": {
        "received": true,
        "stored": true,
        "ticket": "12345678",
        "transfer_ticket": "et123456789012345678901234567890",
        "file_name": "dummy_1234567890.txt",
        "file_content": true
    }
}

hook-run

GET http://deric:8080/dummy/hook-run/:id

Test call to notify a provided endpoint with data for the selected ticket.

Path Parameters

Name
Type
Description

:id

string

Ticket ID

{
    "success": true,
    "code": 0,
    "locale": "de",
    "message": "OK",
    "data": {
        "sent": true
    }
}

The webhook calls are also stored in Postman.

Last updated

Was this helpful?