Set up POS sources and Stripe for tax agents
When run as root, the helper checks the live commit approved by the operator before importing SIHub code. After publishing from CloudCLI, the operator must review the clean commit and use
sudo /usr/bin/python3 -I /var/www/SIHub/apache2/operator-code-approval.py approve
to approve it.
The two agents use existing SIHub workspaces, read-only POS imports and fixed one-time Stripe prices in EUR. The operator helper scripts/setup-tax-integrations.py sets up Stripe and the MeineKasse action. helloCash and ready2order are connected in the protected SIHub portal. The helper first shows a plan. With --apply it checks or creates the selected Stripe objects or binds a new MeineKasse service secret to the specified client. It does not create a payment or submit a tax return.
Prepare private configuration
Use the existing SIHub operator file, for example /etc/sihub/sihub.env, with DATABASE_URL and the public HTTPS address AIHUB_PUBLIC_URL. The MeineKasse file must exist separately and be loaded by the MeineKasse service. Both files must be regular files owned by the calling operating account and have the mode 0600 set. Symlinks and files changed in the meantime are rejected. Start the helper from the SIHub directory using its Python environment.
Secrets belong in these operator files or in the existing secret management. The hidden prompt for a missing Stripe key reads it directly from the terminal; passing it as a command-line argument or in the chat is not supported. The helper never prints keys. Every change gets a private backup. The service configuration and EnvironmentFile must point to the selected files; then restart the affected services and run a local /api/tax-at/setup/status check.
Set both Stripe prices
Each agent needs either an existing public price_...-object or an explicitly specified amount. Amounts are EUR decimal values; the helper calculates cent amounts without floating-point rounding. exclusive means net price, inclusive gross price. Examples contain placeholders for values set by the operator:
python scripts/setup-tax-integrations.py --env-file /etc/sihub/sihub.env stripe \
--ea-amount '<E/A-Preis in EUR>' --balance-amount '<Bilanz-Preis in EUR>' \
--tax-behavior exclusive
Check existing price objects:
python scripts/setup-tax-integrations.py --env-file /etc/sihub/sihub.env stripe \
--ea-price-id '<price_...>' --balance-price-id '<price_...>'
To apply the changes, put --apply before stripe in the command. The helper checks the account and the test/live mode. Existing prices must be active, one-time, in EUR and in the same mode. New products and prices get stable idempotency keys. It stores SIHUB_STRIPE_PRICE_BOT_TAX_AT_EA, SIHUB_STRIPE_PRICE_BOT_TAX_AT_BALANCE, the account/webhook ID and the webhook secret. An existing webhook secret is reused only if the account, mode, endpoint and event binding are confirmed. Account migration and mode changes for existing purchases are not performed automatically.
The price field tax_behavior by itself calculates no VAT. If you have already set up Stripe Tax, you can add --automatic-tax to the command; the helper checks the active setup before creating objects and then sets SIHUB_STRIPE_AUTOMATIC_TAX=1. It does not set up any tax registrations. Without this option, the actual tax and invoice handling remains the operator's task. Stripe: Tax settings, Price objects.
Checkout for the tax agents collects business tax IDs and updates the Stripe customer's name and billing address. Collecting a tax ID does not replace a professional VAT ID (UID) check. Payment and tax documents must be checked against the actual Stripe/invoice configuration. Stripe: Tax IDs in Checkout.
After the restart, an owner/admin can call POST /api/tax-at/setup/check to run the check. It reads the two configured Stripe prices; it creates neither a checkout nor a payment. Make a test purchase with a separate test account before enabling real sales.
Bind MeineKasse to a client
First create a real firm workspace and a tax client in it. You need the SIHub workspace ID, the SIHub client ID, the MeineKasse client ID, the associated fixed database ID and a publicly reachable HTTPS export endpoint. The exporter must be registered in MeineKasse:
python scripts/setup-tax-integrations.py --env-file /etc/sihub/sihub.env cash \
--cash-env-file /etc/meinekasse/meinekasse.env \
--workspace-id '<SIHub-Arbeitsbereich>' --client-id '<SIHub-Mandant>' \
--tenant-id '<MeineKasse-Mandant>' --database '<Kassendatenbank>' \
--endpoint 'https://<Kassenhost>/api/sihub/tax-export'
To apply the changes, put --apply before cash in the command. The helper checks the local workspace/client mapping and the existing action, generates a random service secret and stores it only in the SIHub file. The MeineKasse file receives only its SHA-256 with a fixed client/database binding in MEINEKASSE_SIHUB_EXPORT_BINDINGS. Other bindings are kept. In SIHub, an active GET-action with read_only=true, auto_execute=false, a fixed tenant_id and a bound HTTPS host is created or updated.
The separate switch AIHUB_TAX_SYNC_ENABLED=1, the list AIHUB_TAX_SYNC_WORKSPACE_IDS and the workspace setting tax_sync_enabled=true only enable the read-only tax import. The setup does not enable model responses or phone calls. The existing general live path remains subject to its own approvals.
The setup writes two private files and one database configuration. Stable private file locks coordinate parallel helper runs until the database step is complete. If a write or database error occurs, only the helper's own file changes are reverted, provided they are still unchanged; changes made by others in the meantime are kept and require reconciliation with the private backups. The final database step rechecks the client, workspace and action. The output remote_verified=false means that no real POS retrieval has taken place yet.
Restart both services with the updated operator files. Then synchronize a limited period in the tax area, check the returned client and the original receipts, and keep paging until next_cursor=null is reached. The first successful import permanently binds the POS client ID to the SIHub client. Add bank, payment, expense, asset and closing data if they are not included in the export; the retrieval does not confirm completeness.
The MeineKasse server also provides GET /api/sihub/agent-read for agent reads. SIHub derives this path exclusively on the server side from the verified export action and uses its client-bound service secret. Private MeineKasse and tax advisor work orders thus receive current, limited pages of customers, invoices, documented cash payments and receipts. For live retrieval, at least one export must first have been synchronized successfully so that the POS client binding is verified. A live result is not automatically treated as a tax import or a complete POS closing.
Connect helloCash and ready2order
For helloCash an owner/admin sets up API v2 access under /app/hellocash and checks the connection. Then, in the tax area, select the client and the source helloCash and assign the verified account. SIHub checks the company ID read-only; if the API does not provide a stable ID, the token fingerprint is bound. A new check in the helloCash area is required if the access has been changed.
For ready2order the account holder obtains an account token via the official authorization process. An owner/admin enters it in the tax area for the correct client. SIHub checks the read access and stores the token encrypted for exactly this client. The binding uses the token fingerprint because the public API does not provide an immutable account ID; after a token change, a new SIHub client is required if receipts have already been imported.
Both sources use the same live approval for the tax import as MeineKasse. Then select the source and period in the tax area and synchronize every API page until the end. Only invoices and documented payments that can be mapped unambiguously are imported; the VAT treatment remains open until professional review. Skipped receipts, cancellations, incomplete payments and other accounting sources must be reconciled separately. The local status at /api/tax-at/setup/status shows bound sources and access requirements but does not itself retrieve any data from the provider.
Approve and submit returns
E1/K1 are available for the published annual return schema 2025 and U30/ZM for the supported periods 2025/2026. Under FinanzOnline files the original sources, the review scope and official checks that cannot be performed locally are described. E1/K1 2026 require a new published and verified BMF schema.
Reconcile the report and form, explicitly adopt suggestions, add missing information and confirm all relevant professional areas. After local validation, the owner/admin saves the professional decision. Only an approved, unchanged and still valid snapshot provides a current XML export. The firm submits the file itself and checks the official result log. The archive download contains exactly the originally approved file, even if later data changes block its current export.