SimpleFIN API
SimpleFIN is another way to get bank data into monetr without going through Plaid. You get a setup token from your SimpleFIN Bridge, hand it to monetr, and monetr trades it for an access URL that it keeps in its secret storage.
These endpoints are on by default, out of the box monetr only talks to bridge.simplefin.org and
beta-bridge.simplefin.org. If simpleFin.enabled is false in your configuration, or simpleFin.allowedHosts is
empty, they return 404 with "SimpleFIN is not enabled on this server".
There are two objects involved: the SimpleFIN link, which holds the connection to your Bridge, and the ordinary
monetr link that owns the bank accounts. Creating a SimpleFIN link is the first step, it starts out
pending.
SimpleFIN's daily limit
SimpleFIN expects about 24 requests a day for account data, with a little wiggle room for initial setup. If you keep going way past that, SimpleFIN can disable your access and you'll have to set the connection up again with a new setup token.
Here's what counts against it:
monetr's scheduled syncs come out of the same limit, at about 4 a day for each connection. That leaves you around 20 for refreshes and manual syncs.
The SimpleFIN link object
The access URL has your SimpleFIN username and password in it, so it's never in the response. It goes into monetr's secret storage when the setup token is claimed and doesn't come back out.
Statuses
The SimpleFIN bank account object
These are the accounts monetr found on your SimpleFIN Bridge. They aren't monetr bank accounts yet, they're candidates.
GET List SimpleFIN connections
Returns every SimpleFIN connection on your account.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Example
GET Get a SimpleFIN connection
Returns one connection.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Path parameters
Errors
POST Create a SimpleFIN connection
Claims a setup token and stores the access URL SimpleFIN gives back. Unlike Lunch Flow this does talk to SimpleFIN right away, because a setup token is only good for one claim.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Body
The setup token is checked against a few rules:
- It has to be a real setup token, which is a claim URL that's been base64 encoded.
- The claim URL has to be
httpsand on the server's allow list, set withsimpleFin.allowedHosts. That's justbridge.simplefin.organdbeta-bridge.simplefin.orgunless the operator changed it. - The access URL SimpleFIN sends back has to follow the same rules. If it points somewhere that isn't allowed then monetr throws it away.
- It can only be used once. Once monetr claims it, it's spent.
That last one matters if something goes wrong. If the claim works but monetr fails to save the connection after that, the token is gone and you'll need to make a new one in your Bridge.
The new connection comes back with status pending.
Example
Errors
POST Refresh available bank accounts
Asks your SimpleFIN Bridge what accounts it has and reconciles that against what monetr already knows. New accounts get added. Existing ones are left alone, and nothing is ever removed.
This only asks SimpleFIN for balances, not transactions. It still counts as one of the roughly 24 requests SimpleFIN lets you make each day though, so don't call it in a loop.
Whatever errors SimpleFIN sends back with the accounts get saved to the connection's lastErrors, replacing whatever
was there before. A refresh never changes the connection's status, even when it fails.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Path parameters
Returns 204 with no body. To see what it found, list the bank accounts afterwards.
Errors
SimpleFIN uses 402 when payment is required, but monetr sends that back as a 400 because monetr already uses 402 for its own billing.
GET List available bank accounts
Returns the accounts monetr found on a SimpleFIN connection, whether or not you've added them to your budget yet.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Path parameters
Example
Take simpleFinBankAccountId from here and pass it to create a bank account
along with the linkId of the monetr link, which flips this account's status to active.
Errors
POST Trigger a manual sync
Forces a sync now instead of waiting for the scheduled one. Useful right after setup, or to bring a connection in
error status back once you've sorted things out with your Bridge.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Note this one takes the monetr link ID in the body, not the SimpleFIN link ID, and it isn't in the path. That's different from every other endpoint on this page.
Body
Returns 202 with no body. The sync runs in the background, so a 202 means it started, not that it finished. Either
watch the progress socket or re-read the connection and check
lastSuccessfulUpdate.
Manual syncs are limited to one every 2 hours, measured from lastManualSync. Your Bridge only allows so many
requests a day and every sync uses one, no matter how many accounts are on the connection. Asking again too soon is a
425. Handle it, it's a normal answer and not a mistake.
Errors
GET Watch sync progress
Streams progress for a link during a sync. One socket covers the whole link, since a sync is a single request for every account on it.
Like the transaction upload progress endpoint, this upgrades to a WebSocket
despite being a GET. curl won't do anything useful with it.
In the app: Not used by the app yet.
Auth: API key, subscription required.
Path parameters
Messages carry the linkId and its current status. The socket gives up after 5 minutes.