Skip to content
SIHub Guides
Select language
Guides/Subscriptions, agent shop and contact
SIHub · Guides

Set up agent subscriptions, payments and the contact agent

SIHub sells agents as monthly or annual subscriptions, with 20% savings on the annual subscription. The detailed guide to selling agents describes operator rights, starting prices, AI allowances, Stripe, workers and the complete customer flow.

Prepare agent sales

  1. Set up MariaDB and the private operator file on the target server: for Apache/systemd /etc/sihub/sihub.env, for Docker deploy/.env.production.
  2. The active account [email protected] must be registered and then deliberately approved with sudo bash apache2/install.sh manage set-platform-admin --email [email protected] as the platform operator. Registering with this email address does not grant any operator rights. For an existing operator account under the previous address, see the one-time renaming.
  3. Under /admin/bot-store edit monthly prices and monthly allowances. The annual price is calculated automatically as twelve monthly payments minus 20%. Existing subscriptions keep the purchased price and allowance.
  4. Set up Stripe credentials and the fixed included AI model. With Connect to payments SIHub automatically creates the Stripe products and both recurring prices. The exact list of fields is in the sales guide.
  5. Set up the signed snapshot webhook https://sihub.at/hooks/stripe, version 2025-02-24.acacia, and the customer portal. After the payment is confirmed, the customer downloads the contract documents and confirms receipt to start the service; returning from checkout alone is not enough. Customers see active agents under /account/billing and configure them via Set up agent.

Agents use only the included AI allowance via the operator account. Telephony and voice output may incur separate costs. The standalone calendar, inbox and marketing helpers as well as rule-based crypto signals are included in the Free plan. Calendar and inbox helpers can be used in your own non-demo workspace without operator or workspace live approval; a Google connection or mailbox credentials and explicit action confirmations remain required. AI agents, telephony and paid integrations require valid operator credentials; external actions keep the required permissions and individual confirmations. The AI agents offered and their native agent tools still require the matching agent license. Existing paid one-time purchase licenses remain valid; new agent offers are subscriptions.

SIHUB_COMMERCE_ENABLED=0 blocks new purchases. Existing Stripe subscriptions continue until they are effectively canceled; if payment credentials are configured, the customer portal remains accessible. A refund alone does not cancel a subscription. Test and live environments have their own keys, webhook endpoints and price objects.

Configure contact agent, AppHub and customer confirmation

Bot protection with Cloudflare Turnstile

Cloudflare Turnstile, combined with the existing server limits, is intended for public chat and contact requests, sign-ins and registrations. Turnstile is free and does not require moving your DNS to Cloudflare. The server verifies the token before the protected action; a widget shown in the browser alone is not enough. Documentation: Plans and server-side validation.

If a site key and secret key already exist, keep using that widget. In the Cloudflare dashboard, check under Turnstile → your widget → Settings, that the mode Managed and the hostname sihub.at are entered. On Cloudflare, this hostname covers www.sihub.at too; SIHub additionally checks the allowed hostnames itself. Hostname management

On an existing Apache/systemd installation, you activate the keys after the code update like this:

cd /var/www/SIHub
sudo python3 apache2/configure-turnstile.py
sudo python3 apache2/configure-turnstile.py --check
sudo bash apache2/install.sh manage check-config
sudo systemctl restart sihub
curl --fail https://sihub.at/health

The helper asks for the site key and, twice with hidden input, for the secret key, enables Turnstile and saves the values atomically in /etc/sihub/sihub.env. It creates a protected backup of the previous operator file. The secret key is neither passed as a command argument nor stored in the checkout. The helper sets SIHUB_TURNSTILE_SECRET_KEY directly and clears an existing SIHUB_TURNSTILE_SECRET_KEY_FILE-reference. Existing allowed hostnames are kept; otherwise it derives them from AIHUB_PUBLIC_URL instead. For https://sihub.at these are sihub.at,www.sihub.at. With --hostnames sihub.at,www.sihub.at you set them explicitly. You select a different operator file with --env-file /pfad/zur/datei, and an already known public site key with --site-key PUBLIC_WIDGET_KEY. The helper does not restart any service. Only restart after the configuration checks have succeeded.

--check performs a read-only check of whether Turnstile is enabled in the operator file and fully configured locally. It does not display secret values and does not contact Cloudflare. manage check-config also checks the application configuration. Then test sign-in, registration, contact and the public chat in the browser; only this test confirms that the real keys work with Cloudflare. /health confirms that the service is reachable.

For manual setup, for example in deploy/.env.production for Docker, enter the values only in the private operator configuration:

SIHUB_TURNSTILE_ENABLED=1
SIHUB_TURNSTILE_SITE_KEY=PUBLIC_WIDGET_KEY
SIHUB_TURNSTILE_SECRET_KEY_FILE=/etc/sihub/turnstile_secret
SIHUB_TURNSTILE_HOSTNAMES=sihub.at,www.sihub.at

As an alternative to the secret file, SIHUB_TURNSTILE_SECRET_KEY possible. Only the site key is published in the browser. The secret file must be readable by the SIHub service; with Docker, it must also be mounted into the container. Restart the service after changing the environment. An empty SIHUB_TURNSTILE_ENABLED automatically detects existing keys; without keys, Turnstile stays turned off. 0 explicitly turns it off. An enabled configuration that is incomplete or invalid blocks the protected actions.

When Turnstile is enabled, sign-in and sign-up each require a fresh token with the action login or register. The server checks success, hostname and action before signing in or creating the account; CSRF checks and rate limits remain active. On final submission, the contact agent fetches a fresh token with the action contact. Cloudflare tokens are valid for five minutes and can be used only once. Therefore they are stored neither in the inbox nor in the sending queue. A request that has already been saved can be confirmed again with the same session-bound request ID, without checking the old token again or sending a second email. The public chat uses the action site_chat with a session approval limited to ten minutes; the existing server limits still apply.

The automatic portal handoff to AppHub and all mail workers do not require an interactive challenge. Do not simply enable Cloudflare's free Bot Fight Mode on the AppHub domain: it can also challenge API connections and cannot be turned off for individual endpoints. Bot Fight Mode

For the additional Cloudflare proxy, if your nameservers have already been switched, you must also set the web DNS records for sihub.at and, if applicable, www to Proxied (orange cloud). Only then does web traffic run through Cloudflare. Under SSL/TLS use Full (strict) with a valid certificate matching the hostname on the Apache server, for example the existing Let's Encrypt certificate. Proxy status, Full (strict)

Dynamic SIHub pages with sign-in, sessions or forms, as well as APIs, remain excluded from the Cloudflare cache; do not enable a blanket Cache Everything. By default, Cloudflare does not cache HTML and JSON. Cache behavior

Blanket browser challenges must leave API calls, webhooks such as /hooks/stripe, health checks and certificate renewal under /.well-known/acme-challenge/ uninterrupted. The Turnstile check applies specifically to the user actions described above. Cloudflare challenge pages

A fully self-hosted alternative is ALTCHA. With it, you run the widget, challenge generation and verification yourself; the server limits are still required as well. The current integration uses Turnstile.

Under https://sihub.at/contact a guided agent replaces the contact form. It asks for the visitor's request, name and email address; company and phone number are optional. For an appointment, it also asks for the preferred date and time. Before sending, visitors review their details and confirm the privacy notice. Only then is the request saved.

In AppHub, open Inbox → Mailboxes & portals and set up the inbox for sihub.at there. SMTP and optional IMAP credentials are stored encrypted in the existing hub database; additional domains and mailboxes can be added in the same place. Assign a portal “SIHub” to this mailbox and copy its portal token, which is shown only once, into the private SIHub operator environment:

SIHUB_APPHUB_URL=https://apphub.heartfrequency.solutions
SIHUB_APPHUB_TOKEN_FILE=/etc/sihub/apphub_portal_token

Alternatively, SIHUB_APPHUB_TOKEN possible. The token authenticates only the assigned portal and must not be used in browser code. Restart SIHub after the configuration. The existing notify-worker transmits waiting requests to AppHub with a stable request ID; a dropped connection loses no request, and a retry does not create a second customer confirmation.

The AppHub inbox shows the source portal, contact, message, requested appointment and history. There you answer the request with the appropriate sender. Its per-minute timer apphub-inbox.timer sends queued confirmations and replies and imports new IMAP emails. The AppHub installer installs and enables this timer during the next prepare or update. Without IMAP, replying to agent requests via SMTP remains available. SMTP credentials for this route are stored only in AppHub.

If SIHUB_APPHUB_URL is left empty, SIHub uses the following local SMTP fallback:

The following known values are already set in the example files:

SIHUB_CONTACT_ENABLED=1
[email protected]
AIHUB_SMTP_HOST=mail.heartfrequency.solutions
AIHUB_SMTP_PORT=587
AIHUB_SMTP_STARTTLS=1
AIHUB_SMTP_SSL=0
[email protected]
AIHUB_SMTP_PASSWORD=
[email protected]

Enter the SMTP password only in your private operator file. Port 587 uses STARTTLS, not implicit SSL. The mail account [email protected] must be permitted by the mail server to use the sender address [email protected] when sending. If necessary, set up the corresponding alias/sender approval and make sure that [email protected] is an inbox that actually receives mail. SIHub sends an internal notification with the visitor as the reply-to address and a separate confirmation of receipt to the visitor's email address. With an AppHub connection, AppHub sends the confirmation; SIHub does not send a second email.

Check the SPF/DKIM records that your mail provider specifies for sihub.at so that messages from this sender can be delivered. Use the provider's exact DNS values. Apache, Certbot and SIHub do not generate these mail DNS records.

The agent's confirmation means: Request has been saved. The customer confirmation has its own sending status. If configuration is missing or delivery is still pending, it stays in the sending queue. An unclear SMTP delivery status is not resent automatically. You can use SIHUB_CONTACT_ENABLED=0 to turn off accepting requests. Contact requests require neither Stripe nor live telephony approval.

The public SIHub helper opens after the tutorial video and can take call requests. Visitors enter their name, email address, topic and preferred date and time (Austrian time); the phone number is optional. After the visitor reviews the summary and confirms the privacy notice, the explicitly submitted request is stored in contact_messages and processed through the same contact delivery. SIHUB_CONTACT_ENABLED=0 also turns off these call requests. The API response contains a reference. The chat confirms receipt; the team arranges the actual appointment in person. No calendar connection is needed for this.

The table contact_delivery holds the selected route, portal metadata, AppHub link and the independent confirmation status. After review, a failed local customer confirmation can be requeued with manage.py contact-retry --id ANFRAGE_ID --channel confirmation and, if it is unclear whether it was sent, additionally with --confirm-unknown. Confirmations and replies sent centrally are managed exclusively in AppHub.

SMTP diagnostics in the SIHub Apache error log

In direct Apache mode, SIHub and the mail worker write the delivery diagnostics to /var/log/sihub/error.log, which is also used as ErrorLog of the SIHub VirtualHosts. For an existing installation, enable this shared output once after the code update:

cd /var/www/SIHub
sudo bash apache2/install.sh logging
sudo tail -F /var/log/sihub/error.log

You can then submit a contact request yourself and follow the sending attempt in the same log. The diagnostics include the SMTP connection and sending status, the missing configuration or an error with its sending phase. Passwords, authentication data and contact content are not output. A successful SMTP handover means that the mail server has accepted the message; check further delivery with the mail provider and in the target mailbox. Earlier Apache errors remain in /var/log/apache2/sihub-error.log as before. Details on permissions, log rotation and restarting the service are in the Apache guide.

With systemd, the mail worker automatically uses the same log file. In Docker or when running locally, you'll find the SMTP entries in standard error; with SIHUB_LOG_FILE you can additionally choose a file that is writable by the respective application user.

If a message is rejected, SIHub also logs the SMTP command and a hint derived from known server messages, reason_hint. smtp_command=rcpt means that the mail server rejected the recipient during SMTP delivery. In doing so, it may also check rules for the sender. These hints help narrow down the cause:

reason_hint Check with the mail provider
relay_denied Is the signed-in account allowed to send to the target domain? Is the domain set up on the correct mail server?
sender_unauthorized May [email protected] as [email protected] send? Is the alias/sender approval set up?
recipient_unknown Does [email protected] exist as a mailbox or receiving alias?
sender_rejected Which sender check was rejected? The message alone does not prove a missing alias approval.
access_policy or unknown Check the complete rejection in the mail server log; the server response contains no reliably identified, more specific reason.

553 / 5.7.1 after a successful auth ... smtp_status=235 indicates a delivery rejection despite successful authentication. The extended code denotes missing delivery authorization and can be triggered by sender, host or recipient rules; it does not prove a missing mailbox. SMTP status codes, RFC 3463 Section 3.8 SIHub only outputs fixed diagnostic values, not the raw text of the server response. After fixing the mail server problem, a request saved as failed must be explicitly queued via contact-retry again. The section “Handle a failed contact delivery” shows the commands.

Enable the mail worker and check delivery

After entering the SMTP password, run your own form test with a controlled reply address. Check the saved request and run the worker once:

cd /var/www/SIHub
sudo bash apache2/install.sh manage check-config --mail
sudo bash apache2/install.sh manage contact-list
sudo bash apache2/install.sh manage notify-worker --limit 20
sudo bash apache2/install.sh manage contact-list

The normal Apache setup installs and enables the per-minute timer for registration approvals and regular sending. For older installations, or after an AppHub update with a previously inactive timer, you can set it up as follows. The internal service name aihub-notifications remains for compatibility reasons; the service user, working directory, Python environment and operator file use SIHub:

sudo install -m 0644 apache2/aihub-notifications.service /etc/systemd/system/aihub-notifications.service
sudo install -m 0644 apache2/aihub-notifications.timer /etc/systemd/system/aihub-notifications.timer
sudo systemctl daemon-reload
sudo systemctl enable --now aihub-notifications.timer
sudo systemctl list-timers aihub-notifications.timer
sudo journalctl -u aihub-notifications.service -n 50 --no-pager

The worker processes registration approvals, contact requests, contract confirmations, withdrawal receipt confirmations and the existing notification outbox. In Docker mode use the Compose worker and its timer instead:

cd /var/www/SIHub
sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml run --rm --no-deps notifications
sudo install -m 0644 deploy/systemd/aihub-compose-notifications.service /etc/systemd/system/aihub-compose-notifications.service
sudo install -m 0644 deploy/systemd/aihub-compose-notifications.timer /etc/systemd/system/aihub-compose-notifications.timer
sudo systemctl daemon-reload
sudo systemctl enable --now aihub-compose-notifications.timer
sudo systemctl list-timers aihub-compose-notifications.timer

Use the timer of your chosen operating mode. A successful SMTP handoff does not guarantee arrival in the inbox; check the target inbox and, if necessary, the mail server's delivery report. The mail worker actually contacts your SMTP server and can send emails.

Handle a failed contact delivery

contact-list shows the request ID, time, status and number of attempts without the message content. You can deliberately display a specific request and requeue it after fixing the error:

sudo bash /var/www/SIHub/apache2/install.sh manage contact-show --id ANFRAGE_ID
sudo bash /var/www/SIHub/apache2/install.sh manage contact-retry --id ANFRAGE_ID
sudo bash /var/www/SIHub/apache2/install.sh manage notify-worker --limit 20

If the SMTP result is unclear (unknown), first check with the mail provider whether the message has already been accepted. Only if redelivery makes sense does contact-retry --id ANFRAGE_ID --confirm-unknown the deliberate retry. This way you avoid accidental duplicate deliveries after a dropped connection.

For Docker, replace the management prefix with sudo docker compose --env-file deploy/.env.production -f deploy/compose.yml run --rm --no-deps app python manage.py. Contact content can include personal data; do not forward complete CLI output to public logs. Regular database backups also include these requests and the purchase/subscription data.

Consumer orders and online withdrawal

The Withdraw from contract function is available at /withdrawal without signing in. A name, information identifying the contract and an email address are sufficient. Neither a reason nor a specific order number format is required. The function remains available even when new sales are turned off and does not automatically reject older orders after 14 days: missing or incorrect information about the right of withdrawal can extend the statutory period.

The final button is labeled exactly Confirm withdrawal. SIHub stores the declaration with its time of receipt, provides an unalterable text receipt and immediately tries to deliver the same confirmation by email. The private receipt address must not be shared publicly. For sending, contract and withdrawal confirmations always use AIHUB_SMTP_*; an AppHub portal for contact requests does not replace this access. The per-minute timer retries deliveries that have definitely failed. unknown requires checking with the mail provider before a deliberate retry.

The shipped Apache VirtualHosts exclude /withdrawal/receipt/… using a conditional CustomLog from the access log. This change must also be applied to VirtualHosts that are already installed and to upstream proxies, CDNs or additional access logs; the URLs contain a private access token. The responses set no-store, no-referrer and noindex. Save the download on a trusted device.

Before accepting new consumer orders, set the actual public contact details in the private operator environment:

SIHUB_LEGAL_OPERATOR_NAME="Heartfrequency Solutions e.U."
SIHUB_LEGAL_OPERATOR_ADDRESS="Grieskai 52A, 8020 Graz, Österreich"
[email protected]
SIHUB_LEGAL_OPERATOR_PHONE="+43 68181378098"

On October 19, 2026, the operator confirmed +43 68181378098 as the public phone number. It is the default even without a dedicated environment variable; a variable explicitly set to empty must be removed or set to this number. manage.py check-config checks these fields and the direct mail transport when sales are enabled. The check confirms neither reachability nor the still outstanding legal notice, hosting and data processing details; these are listed in the legal audit.

On October 19, 2026, the operator confirmed the amounts currently visible under Prices & offers as fixed final prices including VAT. This does not change the amounts. The configured Stripe prices remain authoritative, plus the published price revision for managed agent offers. For new offers, only verified Stripe prices with tax_behavior=inclusive are used; offers that are incomplete or configured differently remain blocked. The offer cards show the price and billing period. After Review selection shows /commerce/review the selected total price, term and cancellation terms, as well as the linked terms of use, consumer information and withdrawal instructions. The terms of use are accepted with the order click. For an early start of the service, there is a single, non-preselected mandatory checkbox that combines the express request with the acknowledgment of its consequences. The mere start of the service does not extinguish the right of withdrawal for an ongoing subscription.

Each orderable price option contains a time-limited, signed review_token. It binds the selection to the offer, gross price, billing interval, service description and version of the legal texts. Changes between display and submission require a new review. Custom JSON clients take the token of the selected option and early_start_text from /api/commerce/catalog. They display this complete declaration text next to a checkbox that is not preselected and, once it has been actively checked, send early_start_consent: true. By clicking to order, customers accept the linked terms of use; for this, the client sends terms_accepted: true. Existing clients that do not send early_start_consent can continue to send the value pair early_start_requested: true and early_start_acknowledged: true as before. When switching plans, the complete preview content is frozen before confirmation and checked again before payment.

When the payment is confirmed, the legal text version saved at the time of purchase is stored together with the offer, price, billing contact and early-start declarations as an immutable contract confirmation. Plan changes get their own receipts with the prorated immediate payment and the future plan. New receipts can be retrieved under Purchases & subscriptions → Orders → Download contract documents for download. For old purchases without a stored contract version, no contract text is invented after the fact.

Handover before the service starts: A confirmed payment and an email in the send queue do not yet activate the new service. The customer opens Receive contract documents and start new service, downloads the complete immutable file and then explicitly confirms receipt and the start. SIHub logs the download, receipt confirmation, wording and user ID together with the specific document ID and content checksum. Only then, after the payment has been checked again, is the new service or the additional plan scope activated. The existing paid service continues during the pending upgrade step. A repeated confirmation creates neither another payment nor a second activation. Sending by email remains an additional channel; sent proves SMTP acceptance, not guaranteed arrival in the inbox. This handover step serves as contract confirmation before the service starts under § 7(3) FAGG.

Custom browser clients must also offer this customer step: the personal handover page is at /account/orders/BESTELLUNG_ID/start, the file under /account/orders/BESTELLUNG_ID/contract.txt. Only after the actual handover and an explicit confirmation of receipt does the client execute POST /commerce/orders/BESTELLUNG_ID/activate with confirm_handover: true and the CSRF header. API keys cannot confirm purchases or handovers. The download alone does not activate the service. A purely automated confirmation by the client does not replace the customer's declaration.

Handle incoming withdrawals

Under Operator administration → Withdrawals (/admin/withdrawals), authorized platform operators see open cases, time of receipt, review deadline and sending status. The detail view contains the unchanged declaration and allows documented processing as well as a controlled resend of the confirmation. Regular workspace owners and API keys have no access to it. The following administration commands are also available.

The operator must monitor incoming declarations, assign the contract and carry out the legal consequences on time. The displayed review marker is set 14 days after receipt and serves as a reminder of the possible refund deadline. It does not replace a review of the individual case. For security reasons, a public declaration never triggers an unreviewed Stripe refund or account suspension. The legal effectiveness of a timely withdrawal does not depend on the internal review marker.

sudo bash /var/www/SIHub/apache2/install.sh manage withdrawal-list
sudo bash /var/www/SIHub/apache2/install.sh manage withdrawal-show --id VORGANG_ID
sudo bash /var/www/SIHub/apache2/install.sh manage withdrawal-review --id VORGANG_ID --note 'Vertrag zugeordnet; Beendigung und Erstattung dokumentiert.'
sudo bash /var/www/SIHub/apache2/install.sh manage withdrawal-retry --id VORGANG_ID
sudo bash /var/www/SIHub/apache2/install.sh manage commerce-document-list
sudo bash /var/www/SIHub/apache2/install.sh manage commerce-document-retry --id BELEG_ID

withdrawal-review logs the result; it does not trigger any payment or subscription change itself. The note must reflect the steps actually taken. For unknown status, the flag --confirm-unknown is additionally required for both retry commands. The list and detail view may contain personal data; restrict access to operator accounts. The new receipt tables prevent silent deletion through cascading order/workspace deletion; statutory retention, deletion after the retention period and backups must be defined in the operational deletion policy.

After the update, the new tables are created during the regular schema sync. Before going live, send a controlled withdrawal from your own test address, compare the text download with what arrives in the inbox, and check the timer and operator processing. Automated repository tests use simulated payment and mail services and do not replace this delivery test.