Sager for Craft CMS

Sage Accounting for Craft Commerce 5

Orders in your books, not retyped

Sager turns each Commerce order into a Sage sales invoice, finds or creates the customer as a contact, and follows it with the payment and any refund. You map your ledger accounts and tax rates from dropdowns read out of your own Sage business. Nobody pastes a GUID.

Sager

Features

The Sage connection, plus the parts that decide whether your accountant trusts it.

Your chart of accounts, in dropdowns

Sage rejects an invoice line without a ledger account and a tax rate, and both are IDs that differ for every business. Sager reads them from your Sage business and lets you map them per tax category and product type.

Totals that agree

Every invoice is rebuilt in whole pence from Commerce's own adjustments, then checked against the order total. A difference within your tolerance becomes a visible Rounding line. Anything bigger is refused with a reason, never posted.

Payments and refunds follow

A captured payment becomes a contact payment allocated to the invoice. A refund becomes a credit note, partial or full. Shipping goes in Sage's own shipping fields, not a fake line item.

One order, one invoice

A per-order lock stops two workers posting at once, and a unique index records what Sage has already created. A retry, a double click or a second queue runner can't invoice the same order twice.

See exactly what Sage gets

Preview payload on any order shows the JSON Sager would send. It comes from the same builder as the real push, so the preview and the request match byte for byte.

Never in the way of checkout

Nothing talks to Sage while a customer is paying. Orders, payments and refunds are queued and retried with backoff. A Sage outage can't stop a sale, and Sage's five-minute tokens are refreshed safely.

  • Every request is in a log, with secrets redacted
  • Works on production with admin changes turned off

Invoice numbers on your own pages

The craft.sager Twig variable tells a template whether an order has reached your books, and under which invoice number. Use it on an order page or in a Commerce email.

twig
{% if craft.sager.isSynced(order) %}
    <p>Invoice {{ craft.sager.invoiceNumber(order) }}</p>
{% endif %}

{% for document in craft.sager.documents(order) %}
    <p>{{ document.documentType }}: {{ document.sageNumber }}</p>
{% endfor %}

Frequently Asked Questions

The questions worth answering before you install it.

Connect, map, and the next order is an invoice

Install Sager, create a Sage app, connect your business and pick your accounts from the dropdowns. The log shows the first request.