Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Plaid API

Worlds / Payments and billing

Plaid API

A local Plaid with Items, linked accounts, balances and a transaction feed with pending and posted entries. Test the agent that syncs transactions, checks balances and handles broken bank links.

Base path
/
Auth
client_id and secret in the request body, the world key
Endpoints
13
Status
Active today

This reference previews the surface the Plaid world serves in the closed beta. Paths mirror the public Plaid API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_PLAID_URLThis world's origin followed by /
WORLDS_API_KEYThe world key, accepted wherever Plaid expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · plaid
import { Configuration, PlaidApi } from "plaid";

const client = new PlaidApi(new Configuration({
  basePath: process.env.WORLDS_PLAID_URL,
  baseOptions: { headers: {
    "PLAID-CLIENT-ID": "client",
    "PLAID-SECRET": process.env.WORLDS_API_KEY,
  } },
}));

const { data } = await client.accountsGet({ access_token: "access-sandbox-1" });

API reference

Start and finish a bank connection.

  • POST/link/token/createCreate a link token
  • POST/item/public_token/exchangeExchange a public token for an access token
  • POST/sandbox/public_token/createCreate a sandbox public token
Fields · 4
link_tokenstringToken for the Link flow
expirationstringToken expiry
public_tokenstringToken to exchange after Link
access_tokenstringLong-lived item token

Accounts

Bank accounts on a linked item.

  • POST/accounts/getList accounts for an item
  • POST/accounts/balance/getGet real-time balances
  • POST/auth/getGet account and routing numbers
  • POST/identity/getGet account owner identity
Fields · 5
account_idstringAccount id
namestringAccount name
typestringdepository, credit, loan or investment
balancesobjectAvailable and current balance
maskstringLast digits

Transactions

Posted and pending activity on accounts.

  • POST/transactions/syncSync added, modified and removed transactions
  • POST/transactions/getGet transactions in a date range
  • POST/transactions/refreshRequest a refresh
Fields · 6
transaction_idstringTransaction id
account_idstringAccount id
amountnumberAmount, positive for money out
datestringPosted date
merchant_namestringCleaned merchant name
pendingbooleanWhether it has posted

Items

A connection to one institution.

  • POST/item/getGet an item
  • POST/item/removeRemove an item
  • POST/sandbox/item/reset_loginForce a login required state
Fields · 4
item_idstringItem id
institution_idstringInstitution id
errorobjectLogin required or other error
available_productsarrayProducts not yet enabled

Test workflow

  1. Prepare. Select the Plaid setup for your workflow and review its starting records, including link tokens, accounts, transactions.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Stored cursor advanced for every healthy Item
  • No transaction_id stored twice
  • Removed pending Uber charge deleted from the ledger
  • 3 Items flagged for update mode, none removed
  • Payout check used balances.available

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Plaid
version: 2
connector: plaid
seed: plaid-starter
mode: isolated
policy: >
  Bring every Item's transactions up to date. Drop pending entries that were
  removed and do not double count ones that posted. Flag Items that need a
  login instead of deleting them.
tasks:
  - id: sync-transactions-with-the-cursor-and-handle-removals
    prompt: Sync transactions with the cursor and handle removals
  - id: check-available-balance-before-a-payout
    prompt: Check available balance before a payout
  - id: flag-items-that-need-the-user-to-log-in-again
    prompt: Flag Items that need the user to log in again
expected:
  - Stored cursor advanced for every healthy Item
  - No transaction_id stored twice
  - Removed pending Uber charge deleted from the ledger
  - "3 Items flagged for update mode, none removed"
  - Payout check used balances.available
scenarios:
  - login-required
  - not-ready
  - institution-down

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
login-requiredCalls return ITEM_LOGIN_REQUIRED for one Item
not-readytransactions sync returns PRODUCT_NOT_READY on a new Item
institution-downBalance calls return INSTITUTION_DOWN
rate-limitedBalance refresh returns RATE_LIMIT_EXCEEDED
webhookSYNC_UPDATES_AVAILABLE arrives while a sync is running

Starting data

Start each run from the same records and relationships. The overview below describes the Plaid starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
items40 across 12 institutions, 3 in ITEM_LOGIN_REQUIRED
accounts95 checking, savings and credit
transactions6,000 with 120 pending
authRouting and account numbers for 30 checking accounts

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Link tokens records

Start and finish a bank connection.

FieldTypeMeaning / relationship
link_tokenstringToken for the Link flow
expirationstringToken expiry
public_tokenstringToken to exchange after Link
access_tokenstringLong-lived item token
json · illustrative record shape
{
  "link_token": "<Token for the Link flow>",
  "expiration": "<Token expiry>",
  "public_token": "<Token to exchange after Link>",
  "access_token": "<Long-lived item token>"
}

See link tokens operations

Accounts records

Accounts

Bank accounts on a linked item.

FieldTypeMeaning / relationship
account_idstringAccount id
namestringAccount name
typestringdepository, credit, loan or investment
balancesobjectAvailable and current balance
maskstringLast digits
json · illustrative record shape
{
  "account_id": "<Account id>",
  "name": "<Account name>",
  "type": "<depository, credit, loan or investment>",
  "balances": {},
  "mask": "<Last digits>"
}

See accounts operations

Transactions records

Transactions

Posted and pending activity on accounts.

FieldTypeMeaning / relationship
transaction_idstringTransaction id
account_idstringAccount id
amountnumberAmount, positive for money out
datestringPosted date
merchant_namestringCleaned merchant name
pendingbooleanWhether it has posted
json · illustrative record shape
{
  "transaction_id": "<Transaction id>",
  "account_id": "<Account id>",
  "amount": 1,
  "date": "<Posted date>",
  "merchant_name": "<Cleaned merchant name>",
  "pending": false
}

See transactions operations

Items records

Items

A connection to one institution.

FieldTypeMeaning / relationship
item_idstringItem id
institution_idstringInstitution id
errorobjectLogin required or other error
available_productsarrayProducts not yet enabled
json · illustrative record shape
{
  "item_id": "<Item id>",
  "institution_id": "<Institution id>",
  "error": {},
  "available_products": []
}

See items operations

See the Plaid world in the catalog