FCHubFCHub.co

Configuration

Connect your Fakturownia account and configure invoice settings, KSeF auto-send, NIP checkout fields, and wp-config.php overrides.

All settings for FCHub Fakturownia are managed through FluentCart's integration settings panel. You can also override the core credentials using wp-config.php constants for environments where you don't want secrets stored in the database.

Settings Location

Navigate to: FluentCart > Integrations > Fakturownia (click the Settings button on the Fakturownia card)

Or go directly to:

/wp-admin/admin.php?page=fluent-cart#/integrations/fakturownia

When connected, the page header shows a green "Connected to your-domain.fakturownia.pl" status. If credentials are invalid, a red error banner appears above the form.

Connection Settings

These are the required fields to connect your Fakturownia account.

Fakturownia Domain

Your Fakturownia subdomain. If your Fakturownia URL is https://mojafirma.fakturownia.pl, enter mojafirma.

You can also enter the full domain (e.g., mojafirma.fakturownia.pl). The plugin validates the domain format and only accepts *.fakturownia.pl domains — custom domains or arbitrary hostnames are rejected for security.

FieldExampleAccepted
Subdomain onlymojafirmaYes — becomes mojafirma.fakturownia.pl
Full domainmojafirma.fakturownia.plYes
Custom domaininvoices.mycompany.comNo — rejected

API Token

Your Fakturownia API authorization token. This is used to authenticate all API requests.

Find Your API Token in Fakturownia

Log in to your Fakturownia account and go to:

Settings > Account Settings > Integration > API Authorization Code

Copy the API token displayed there. If you don't see one, you may need to generate a new token.

Keep Your API Token Secure

The API token provides full access to your Fakturownia account's invoicing capabilities. Do not share it publicly. If you need to restrict access in production, consider using the wp-config.php constant approach described below.

Department ID

The Fakturownia department ID is optional but recommended. When set, the plugin pulls seller information (company name, address, bank account, tax ID) from the specified department in Fakturownia.

To find your department ID:

  1. Go to Settings > Company/Department in Fakturownia
  2. Click on the department you want to use
  3. The department ID is visible in the URL: https://app.fakturownia.pl/departments/XXXXX

If no department ID is provided, the plugin falls back to using your WordPress site name as the seller name.

Invoice Settings

These settings control how invoices are generated.

Invoice Type (Kind)

The type of document to create in Fakturownia.

ValueDescription
VATStandard VAT invoice (faktura VAT). The default and most common choice for Polish businesses.
ProformaProforma invoice. Useful if you need a preliminary invoice before payment is confirmed.
Bill (Rachunek)A simplified bill. Used in specific cases where a full VAT invoice is not required.

Payment Type

The payment method shown on the invoice. This is the default value. The plugin also supports automatic mapping from FluentCart payment gateways -- see the payment type mapping section.

ValueDescription
Bank Transfertransfer -- the default.
Cardcard
Cashcash
PayPalpaypal

Invoice Language

The language used for invoice labels, headers, and text.

ValueDescription
Polskipl -- Polish. The default.
Englishen
Deutschde -- German.
Francaisfr -- French.
Polski / Englishpl/en -- Bilingual Polish/English invoice.

KSeF Auto Send

When enabled, every invoice created through the plugin is automatically submitted to KSeF (Krajowy System e-Faktur) via Fakturownia's built-in KSeF integration.

ValueBehavior
NoInvoices are created in Fakturownia but not submitted to KSeF. Default.
YesInvoices are created and simultaneously submitted to KSeF. A background cron job polls for the KSeF status.

KSeF Requirements

To use KSeF auto-send, your Fakturownia account must be connected to KSeF. This is configured within Fakturownia itself, not in the plugin. See the KSeF integration guide for details.

Checkout NIP Field

Controls whether the "I want a company invoice" checkbox appears at checkout.

ValueBehavior
YesA checkbox and NIP field are added to the FluentCart checkout. Default.
NoNo NIP field at checkout. All invoices will be B2C (consumer) invoices.

When enabled, customers see a "I want a company invoice" checkbox during checkout. Checking it reveals a NIP (tax ID) input field. The NIP is stored with the order and used to create a B2B invoice with the customer's company details.

See the NIP at Checkout page for full details on how this works.

wp-config.php Constants

For production environments, staging/production parity, or CI/CD workflows, you can define the core credentials as PHP constants in your wp-config.php file. These constants override any values stored in the database.

wp-config.php
// Fakturownia domain (subdomain or full domain)
define('FCHUB_FAKTUROWNIA_DOMAIN', 'mojafirma');

// Fakturownia API authorization token
define('FCHUB_FAKTUROWNIA_API_TOKEN', 'your-api-token-here');

// Department ID (optional)
define('FCHUB_FAKTUROWNIA_DEPARTMENT_ID', '12345');

Override Priority

When a wp-config.php constant is defined and non-empty, it takes precedence over the value saved in the FluentCart integration settings. The settings UI will still show the database value, but the plugin will use the constant at runtime.

This approach is recommended if you:

  • Use different credentials for staging and production environments
  • Want to keep API tokens out of the database for security
  • Deploy with environment-specific configuration files
  • Use a secrets manager that populates wp-config.php

Saving and Validating

When you click Save Settings in the FluentCart integration panel, the plugin automatically validates your API connection by making a test request to Fakturownia. If the connection is successful, the integration status is set to active and you'll see a confirmation message.

If the API test fails, your settings are still saved, but the integration status remains inactive. You'll see an error message indicating what went wrong -- typically an invalid domain or API token.

Connection Validation

The plugin validates your credentials every time you save settings. If Fakturownia's API is temporarily unavailable when you save, the status may show as disconnected even if your credentials are correct. Simply save again when the API is back.

Complete Settings Reference

On this page