Deposit

Canonical contract for persisted deposit payloads.

Identity source_id

Attributes

Field
Type
Description
id
string
Canonical ID — Backfill canonical record ID assigned after persistence. This is distinct from the source-system ID.
source_idrequiredidentity
string
Source ID — Stable external record ID from the source system. Backfill uses this with source_system and, when present, connection_id for idempotent imports and upserts.
source_systemrequired
string
Source System — Connector or provider that supplied the record, such as stripe, shopify, qbo, csv_upload, or manual.
connection_id
string
Connection ID — Backfill tenant connection ID that scopes records to a specific external account, store, realm, or integration instance. It may participate in source identity without being required on every create payload.
subsidiary_id
string
Subsidiary ID — Business entity or subsidiary identifier for multi-entity accounting. Leave blank when the tenant does not use subsidiaries.
document_number
string
Document Number
statusrequired
string
Status
pendingdepositedvoid
currencyrequired
string
Currency
total_amountrequired
decimal
Total Amount
deposit_date
date
Deposit Date
memo
string
Memo
deposit_to_account_id
string
Deposit To Account ID — Backfill account identifier for a related account record. Use account_id for lookups; account_code is display-only when referring to general ledger accounts and may be absent.
deposit_to_account_code
string
Deposit To Account Code
cashback_amount
decimal
Cash Back Amount
cashback_account_id
string
Cash Back Account ID — Backfill account identifier for a related account record. Use account_id for lookups; account_code is display-only when referring to general ledger accounts and may be absent.
cashback_memo
string
Cash Back Memo
lines[]
array<object>
Lines
default: []
line_number
integer
Line Number — One-based display order of the line within the document. Use for ordering and presentation, not stable identity.
line_key
string
Line Key — Backfill-stable key for the line within this document. Use it for line-scoped extension fields or matching when no provider line_ref is available.
line_ref
string
Line Ref — Provider-native line reference. Use it to match the same source line across document versions and related documents.
source_document_type
string
Source Document Type
source_document_id
string
Source Document ID — Identifier for the related source document record.
source_document_number
string
Source Document Number
amount
decimal
Amount
currency
string
Currency
account_id
string
Line Posting Account ID — Backfill account identifier for a related account record. Use account_id for lookups; account_code is display-only when referring to general ledger accounts and may be absent.
account_code
string
Account Code
customer_id
string
Customer ID — Identifier for the related customer record.
description
string
Description
payment_method
string
Payment Method
check_number
string
Check Number
reference_number
string
Reference Number
dimensions
map
Dimensions
metadata
map
Metadata
dimensions
map
Dimensions
default: %{}
metadata
map
Metadata
default: %{}

TypeScript SDK

Import

Every canonical resource is exposed as a top-level entity global on @backfill-io/sdk.

import { Deposit } from "@backfill-io/sdk";

Create

Pass an object matching DepositCreateInput. Required fields are shown below.

const deposit = Deposit.create({
  source_id: "source_id_123",
  source_system: "…",
  status: "pending",
  currency: "USD",
  total_amount: "100.00",
});

Get and query

Look up a single record by canonical ID, or query with filters and pagination.

const deposit = Deposit.get("deposit_123");

const results = Deposit.query({
  where: { },
  orderBy: [{ field: "inserted_at", direction: "desc" }],
  limit: 50,
});

Update

Partial update — pass only the fields you want to change.

Deposit.update("deposit_123", {
  // …fields to update
});

Delete

Deposit.delete("deposit_123");