Module pocketsmith

ballerinax/pocketsmith Ballerina library

2.0.0

Overview

PocketSmith is a personal finance and budgeting platform that brings bank accounts, transactions, categories, budgets and cash-flow forecasts together in one place. This connector supports version 2.0 of the PocketSmith API and lets Ballerina applications read and manage that financial data programmatically.

Key features

  • Manage users, institutions and accounts, including their transaction accounts and balances
  • Create, list, update and delete transactions, with filtering by date, type and review status
  • Organise spending with categories and category rules
  • Analyse budgets, trends and forecast events for a user or scenario
  • Look up supported currencies and time zones

Setup guide

To use the connector you need a PocketSmith account and either a developer key or an OAuth 2.0 access token.

Option 1: Developer key

  1. Sign in to PocketSmith.
  2. Open Settings and go to Security & Integrations, then select Manage developer keys.
  3. Choose Create developer key, give the key a name and copy the generated value. It is shown only once.

Option 2: OAuth 2.0

  1. Register an application in the PocketSmith developer area to obtain a client ID and client secret.
  2. Complete the OAuth 2.0 authorization code flow against the PocketSmith authorization and token endpoints to obtain a refresh token.
  3. Keep the client ID, client secret and refresh token for the connector configuration.

Quickstart

To use the pocketsmith connector in your Ballerina application, update the .bal file as follows:

Step 1: Import the module

Copy
import ballerinax/pocketsmith;

Step 2: Instantiate a new connector

Create a Config.toml file with your developer key:

Copy
developerKey = "<your-developer-key>"

Then create a client in your .bal file:

Copy
configurable string developerKey = ?;

final pocketsmith:Client pocketsmithClient = check new ({
    auth: {
        xDeveloperKey: developerKey
    }
});

Step 3: Invoke the connector operation

Copy
public function main() returns error? {
    pocketsmith:User _ = check pocketsmithClient->getAuthorisedUser();
}

Step 4: Run the Ballerina application

Copy
bal run

Examples

The PocketSmith connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:

Import

import ballerinax/pocketsmith;Copy

Other versions

See more...

Metadata

Released date: about 15 hours ago

Version: 2.0.0

License: Apache-2.0


Security

Direct vulnerabilities: No known direct vulnerabilities

Indirect vulnerabilities: 

Checked on 2026-11-20 via OSV.dev


Compatibility

Platform: any

Ballerina version: 2201.12.0

GraalVM compatible: Yes


Pull count

Total: 43

Current verison: 1


Weekly downloads


Source repository


Keywords

Vendor/PocketSmith

Area/Finance & Accounting

Type/Connector

PocketSmith


Contributors