Pennylane

Learn how to connect and configure Pennylane for automated invoice generation.

Pennylane is a modern cloud accounting platform designed for entrepreneurs and small businesses, primarily in France. This guide covers both connecting your Pennylane account and configuring it for optimal order processing and financial management.

Table of Contents

Before You Start

Prerequisites

What You'll Need

  • Pennylane Account — BrickInvoice connects via OAuth, so no API key is required. You will be redirected to Pennylane to authorize the connection.
  • Products configured in Pennylane — BrickInvoice maps each line item type (products, shipping, handling fees) to a product in Pennylane. You will need to have the relevant products set up in Pennylane before configuring the integration.

Part 1: Connecting Pennylane

Pennylane uses OAuth 2.0 for authentication. This means you authorize BrickInvoice directly from within Pennylane — no manual API keys or tokens are needed.

Step 1: Initiate the Connection

  1. Navigate to: /home/accounting/connect
  2. Select "Pennylane" from the accounting package dropdown
  3. Click "Connect to Pennylane"
  4. You will be redirected to the Pennylane authorization page

Step 2: Authorize in Pennylane

  1. Log in to your Pennylane account if prompted
  2. Review the requested permissions and click "Authorize"
  3. You will be redirected back to BrickInvoice automatically

Connection Status

After a successful connection:

  • The connection status shows Connected
  • BrickInvoice will automatically refresh the OAuth token in the background — you do not need to reconnect manually

Disconnecting Pennylane

To disconnect:

  1. Navigate to: /home/accounting/connect
  2. Click "Disconnect" next to the Pennylane connection
  3. The OAuth token will be revoked and all credentials removed

Part 2: Configuring Pennylane Settings

After connecting, configure how orders are mapped to your Pennylane account.

General Settings

Invoice Template:

  • Select which Pennylane invoice template to use for generated invoices
  • Templates control the layout, branding, and design of invoices
  • BrickInvoice loads available templates directly from your Pennylane account

Create as Draft:

  • When enabled, invoices are created as drafts in Pennylane (not yet finalized)
  • When disabled, invoices are immediately finalized
  • Using drafts allows you to review invoices before they are sent

Differentiate Platforms:

  • When enabled, you can configure separate products for BrickLink and Brick Owl orders
  • Useful when you want to track sales per platform in your Pennylane revenue accounts

Contact Sync

Sync Email Address:

  • When enabled, the customer's email address is included when creating or updating contacts in Pennylane

Update Existing Contacts:

  • When enabled (default), existing Pennylane contacts are updated with the latest order information
  • When disabled, existing contacts are left unchanged

BrickInvoice deduplicates contacts using a unique external reference (format: {SOURCE}_{ORDER_ID}), ensuring the same customer is never created twice.

Line Item Settings

BrickInvoice maps order data to Pennylane Products. Each line item type requires you to configure which Pennylane product it maps to. You can find your products in Pennylane under Sales → Products.

The following line item types are supported:

Products

The product line items represent the physical goods sold in the order.

Description:

  • Customize the text that appears on this line item in the invoice
  • Placeholders for dynamic content:
    • {order_number} — Replaced with the order number (e.g., "123456")
    • {source} — Replaced with the platform name ("BrickLink" or "Brick Owl")
    • {payment_method} — Replaced with the payment method (e.g., "PayPal")
    • Example: "Order {order_number} via {source}" becomes "Order 123456 via BrickLink"

Product mapping by customer location:

  • Domestic — Sales to customers in your own country
  • EU — Sales to customers in other EU countries
  • Export — Sales to customers outside the EU

Each of these maps to a different product in Pennylane, allowing you to use separate revenue accounts and VAT rates per geographic zone. When platform differentiation is enabled, each geographic zone has separate fields for BrickLink and Brick Owl.

Margin Scheme

The margin line items represent second-hand goods sold under the margin scheme (VAT is calculated on the profit margin rather than the full sale price).

Configuration and placeholders are identical to the Products section above, with separate products for domestic, EU, and export sales.

Shipping

The shipping line item represents the shipping cost charged to the customer.

Description:

  • Customizable, supports the same placeholders as above

Product mapping:

  • Regular — Used for domestic and EU shipments (standard VAT rate applies)
  • Export — Used for shipments outside the EU (typically 0% VAT)

Handling Fees

The handling fee line item represents any order processing fees charged to the customer.

Description:

  • Customizable, supports the same placeholders as above

Product mapping:

  • Regular — Used for domestic and EU orders
  • Export — Used for orders outside the EU

B2B Orders (VAT Reverse Charge)

When your settings have B2B VAT enabled, BrickInvoice will use dedicated B2B products for orders from business customers within the EU. These orders use the reverse charge mechanism, meaning 0% VAT is applied on the invoice and the customer is responsible for reporting and paying VAT in their own country.

You can configure separate B2B products for:

  • Products (domestic, EU, export variants)
  • Margin scheme goods
  • Shipping
  • Handling fees

Invoice Line Item Structure

Each order creates a Pennylane invoice with separate line items per revenue type. This allows you to maintain accurate, compliant bookkeeping across different tax scenarios.

Example: Dutch seller, German customer (EU sale):

Order: €100 (products) + €5 (shipping) + €2 (handling)

Pennylane Invoice Line Items:
1. Products: €100.00 → Product (EU) → 21% VAT
2. Shipping: €5.00   → Shipping (Regular) → 21% VAT
3. Handling: €2.00   → Handling (Regular) → 21% VAT

Example: Dutch seller, US customer (Export):

Order: €100 (products) + €5 (shipping)

Pennylane Invoice Line Items:
1. Products: €100.00 → Product (Export) → 0% VAT
2. Shipping: €5.00   → Shipping (Export) → 0% VAT

Part 3: Invoice Features

Automatic Invoice Creation

When an order is synchronized:

  1. Customer Sync — The customer (contact) is created or updated in Pennylane
  2. Invoice Generation — An invoice is created with the configured line item structure
  3. Product Assignment — Each line item is linked to the correct Pennylane product
  4. VAT Application — VAT rates are determined per product directly from Pennylane
  5. Invoice URL — A direct link to the invoice (and its public PDF) is stored in BrickInvoice

VAT Rounding Correction

Pennylane calculates the VAT-inclusive total of each line item internally using the formula:

total_incl_vat = round(amount_excl_vat × (1 + vat_rate), 2)

Due to how floating-point arithmetic works, this can produce a result that is 1 cent higher or lower than the actual order total. To prevent invoice totals from diverging from the original order amounts, BrickInvoice automatically inserts a VAT rounding correction line item when needed.

How it works:

When the calculated Pennylane total would deviate from the expected order total, BrickInvoice splits the affected line item into two parts:

  1. Main line — The rounded amount (a clean multiple of €0.01)
  2. Correction line — The residual amount (the small remainder needed to reach the exact total)

Both lines use the same product and VAT rate. The correction line is labelled with a (correction) suffix so it is clearly identifiable.

Why is this necessary?

Pennylane rounds VAT at the line item level, while order totals from BrickLink and Brick Owl are authoritative and cannot be changed. Without this correction, the Pennylane invoice total could be off by €0.01 relative to the amount actually paid by the customer. By absorbing the rounding difference in a dedicated correction line, the invoice total always matches the original order total exactly, keeping your bookkeeping accurate.

Manual Synchronization

You can manually trigger synchronization for individual orders, which is useful for:

  • Orders that failed automatic synchronization
  • Testing your Pennylane configuration
  • Re-syncing an order after changing the configuration

Troubleshooting

Connection Issues

"Authorization failed" or redirect error

  • Try again: Close the tab and restart the OAuth flow from the connect page
  • Browser cookies: Ensure third-party cookies are not blocked for the Pennylane authorization page
  • Account access: Verify you are logging in to the correct Pennylane account

Token expired or connection lost

  • Reconnect by navigating to /home/accounting/connect and clicking "Connect to Pennylane" again
  • BrickInvoice automatically refreshes tokens but in rare cases a full re-authorization may be needed

Configuration Issues

"Products not loading"

  • Check connection: Verify Pennylane is still connected
  • Refresh: Try refreshing the configuration page
  • API rate limit: Pennylane limits requests to 5 per second — wait a moment and try again

"Invoice templates not loading"

  • Check connection: Verify Pennylane is still connected
  • Templates in Pennylane: Ensure at least one invoice template exists in your Pennylane account

Invoice Issues

"Invoice creation failed"

  • Required fields: Ensure all required product fields in the configuration are filled
  • Valid products: Verify that the selected products still exist in your Pennylane account
  • Template: Confirm the selected invoice template still exists

"Invoice total does not match order total"

  • This is handled automatically by the VAT rounding correction — see VAT Rounding Correction above
  • If you are still seeing discrepancies, contact support with the specific order details

Best Practices

Product Organization in Pennylane

Set up separate products in Pennylane for each revenue zone to maintain clean bookkeeping:

Recommended product structure:

  • Sales - Domestic (21% VAT or your local rate)
  • Sales - EU (21% VAT)
  • Sales - Export (0% VAT)
  • Margin - Domestic, Margin - EU, Margin - Export
  • Shipping - Regular (21% VAT), Shipping - Export (0% VAT)
  • Handling - Regular (21% VAT), Handling - Export (0% VAT)

Each product in Pennylane carries its own VAT rate, so the rate is controlled entirely within Pennylane — not in BrickInvoice.

Draft vs. Final Invoices

  • Use draft mode when first setting up the integration to review invoice formatting and line item structure before finalizing
  • Switch to final mode once you are confident the setup is correct, for a fully automated workflow

Platform Differentiation

Enable platform differentiation if you want to:

  • Separate BrickLink and Brick Owl revenue in your Pennylane reports
  • Apply different products or VAT treatments per platform
  • Track platform-level profitability in Pennylane

If you do not need per-platform separation, leave this disabled to keep the configuration simpler.

Next Steps

After configuring Pennylane:

  1. Test integration — Process a few test orders to verify invoices are created correctly
  2. Verify products — Confirm each line item is linked to the right Pennylane product
  3. Check VAT rates — Verify correct VAT rates are applied per customer location
  4. Review draft invoices — If using draft mode, review a few invoices in Pennylane before switching to final mode
  5. Set up automation — Enable the accounting schedule for fully automatic order processing

Support

If you encounter issues with the Pennylane integration:

  • Check the connection status in BrickInvoice
  • Verify your Pennylane OAuth authorization is still valid
  • Review your product and template configuration
  • Contact support with specific error details and the affected order number if needed