Pey

In progressPey

Connectors

A connector reads a ledger and emits events back to it. The contract between the two is the product; the first system it happens to speak to is not.

First connector
erp.io Accounting
Then
QuickBooks, Xero
Auth
Organisation-scoped API key
Direction
Read, plus events out

What a connector does

  1. Reads obligations, payments and ledger entries from the accounting system.
  2. Maps them onto Pey's canonical model — which is where the real work is.
  3. Emits events back when Pey has something to say, for that system to book.

The third step is the constraint that shapes everything: a connector never posts. It hands the accounting system an event and the accounting system decides what entry to make. See the rule.

The connectors

SystemStateNotes
erp.io AccountingFirstReads the module API with an organisation-scoped key.
QuickBooksPlannedAgainst the same canonical model.
XeroPlannedAgainst the same canonical model.
OthersLaterThe contract is designed to make each one smaller than the last.
The first connector is a test of the contract, not a favour to ourselves

Connecting to our own accounting module first is convenient, and the risk of convenience is that the contract quietly assumes things only our module does. The canonical model is deliberately unlike any one system's schema for exactly that reason — if the second connector is hard, the first one was written wrong.

Authentication

A connector authenticates to the accounting system as an integration, with an organisation-scoped API key — the same kind of key documented in Authentication. It acts for one organisation, and it is revocable from that organisation's settings without touching anything else.

Pey keeps its own database, separate from any ledger it connects to. Sharing one would quietly undo the decision to keep them separate — and would make the portability claim untrue the moment anybody looked.

What this does not do

One connector at a time

The others are planned, not partially built.

No write-back of journal entries

Events, never postings.

No bank connections of its own

Pey reads what the ledger has; it is not a second bank feed.

No shared database with any ledger

Deliberately.

Questions

Can we connect two accounting systems?

That is the eventual point of a payment graph. Not yet.

Does the connector need write access?

It emits events. It does not post entries.

Where does the data live?

In Pey's own database.