Preview. Stack v4.0 has not been released, and what is documented here can still change before it does. The current release is v3.2, which covers this as Payments.Go to v3.2
Connectivity

From Provider to Ledger

Follow one payment from a provider, through a connection, into accounts, transactions, and metadata in Ledger.

This page follows one payment from a provider into Ledger, one stage at a time. Activity happens at the provider on its own schedule. The connection only reads it, and the connector's profile (its rules for turning provider records into Ledger entries) decides what each record becomes.

The example is fictional. It follows one pay-in from created to succeeded, then a balance that the provider reports. The accounts, Numscript, and fields are simplified to show the stages. To see what a real connector reads and records, open its catalog entry.

Example run

A service provider ledger main

Paused

Observation 1

Observation 2

Observation 3

Observation 4

At the provider
Outside Formance

Service

  1. 1?

A customer pays, a state changes, a statement is produced: the provider's systems change on their own. Nothing in Formance knows what the new object is until the connection reads it. The connection only reads. It never writes back to the provider.

Ledger main

volumes per account and asset
  • No accounts yet. An account exists from its first posting.

Transactions

  1. None recorded yet.

Observation 1 of 4 · At the provider

Something happens in the provider's own systems. Formance is not part of it, and does not know yet what changed.

What happens at each stage#

At the provider

A payment is created, a status changes, a statement is issued. All of this happens in the provider's systems without Formance taking part. Formance learns about it only when the connection reads.

Observe

The connection reads new activity with the access you configured: API resources, events, files, or snapshots. Each item it reads is an observation, one provider fact such as a status change or a reported balance. The connection never writes to the provider.

Match

The profile works out what kind of fact the observation is, such as a payment status change or a reported balance, and picks the rule that handles it.

Transform

The rule computes what Ledger needs: the amount in the asset's smallest unit, the account addresses, a unique reference, and the metadata to attach.

Record

Ledger writes the result as a transaction or as account metadata. Each transaction carries its unique reference, so a retry never records the same step twice.

What a connector profile holds#

A profile has three parts: a chart of accounts, transaction templates for records that move value, and metadata rules for records that only add information.

Reported balances#

The last observation in the example is a balance that the provider reports. The connection stores it as account metadata and posts nothing. The reported figure sits next to the balance Ledger builds from postings without changing it, and each later report replaces the stored value.

In the example the two figures differ by 3,730.00. Ledger does not adjust for a gap like this one. Before you draw a conclusion, check that both figures cover the same accounts at the same point in time, that Ledger has the opening position, and that the reported value is recent. A read that failed leaves the previous value in place. It does not mean the balance is zero.

Two views of a balance walks through the comparison.

The same stages for every provider#

Every connector runs these stages. What changes from one connector to the next is what it reads and the Ledger model it builds. The catalog documents both.