Transactions

Digits manages the categorization, matching, and modifying of your Source transaction data, automatically.

Transaction syncing is how you write financial transactions from your system into Digits. Using the Sync Transactions endpoint, you can create, update, and delete transactions in your dedicated Source.

How It Works

Transactions are written to your Source using external identifiers from your system. Digits then processes these transactions into the Ledger, handling categorization, matching, and enrichment automatically.

Idempotency

Transaction syncing is idempotent based on the externalId field. Sending the same externalId multiple times will upsert the transaction - creating it if new, or updating it if it already exists.

External IDs are scoped to your Source, so different sources can use the same ID values without conflict.

Prerequisites

Before syncing transactions, you must:

  1. Sync Connection Sources - Use Sync Sources to create sources which organize transactions
  2. Sync Parties (optional) - Use Sync Parties to create counterparties referenced in transactions

Transaction Structure

Each transaction contains:

  • externalId (required) - Your system's unique identifier for the transaction
  • accountId (required) - The connection account this transaction belongs to
  • action - Upsert (create/update) or Delete
  • date - Transaction date
  • pending - Whether the transaction is pending
  • entries - Individual debit and credit entries that comprise the transaction

Entries

Each entry represents a single line in the transaction:

  • amount - Currency amount in minor units (e.g., cents)
  • type - Debit or Credit
  • description - Entry description
  • category - Reference to a category by label or ledger ID
  • counterparty (optional) - Party associated with this entry

Example Request

POST https://connect.digits.com/v1/source/transactions
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json

{
  "transactions": [
    {
      "externalId": {
        "issuer": "myapp",
        "id": "txn_12345"
      },
      "sourceId": {
        "issuer": "myapp",
        "id": "acct_checking"
      },
      "action": "Upsert",
      "memo": "Office supplies purchase",
      "entries": [
        {
          "amount": {
            "amount": 15000,
            "code": "USD"
          },
          "type": "Debit",
          "description": "Office supplies",
          "category": {
            "label": "Expenses"
          }
        },
        {
          "amount": {
            "amount": 15000,
            "code": "USD"
          },
          "type": "Credit",
          "description": "Payment from checking",
          "category": {
            "label": "Bank"
          }
        }
      ]
    }
  ]
}

Response

The response returns identifiers for all upserted and deleted transactions, mapping your external IDs to Digits IDs:

{
  "message": "Success",
  "upserted": [
    {
      "externalId": "txn_12345",
      "digitsId": "a980b5b8-e27e-4616-aad5-15816b294b41"
    }
  ],
  "deleted": []
}

Advanced Features

  • Category Labels - Simplify categorization by using labels instead of tracking the chart of accounts
  • Invoices & Bills - Link transactions to bills and invoices for payment tracking and aging reports

Limitations

  • Digits currently supports USD only.