View as Markdown
Xero Accounting icon

Xero Accounting ACTION

Create Bank Transaction

Create a new bank transaction See the documentation
  • Action
  • Writes data
  • Destructive
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Xero Accounting account once, then configure and run Create Bank Transaction from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "xero_accounting_api-create-bank-transaction",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xero_accounting_api: { authProvisionId: "apn_xxxxxxx" },
    tenantId: "Tenant ID",
    bankAccountCode: "Bank Account Code",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Bank Transaction inputs
Property Type Description
tenantId Tenant ID string
Select an organization tenant to use, or provide a tenant ID
Required Dynamic
bankAccountCode Bank Account Code string
The Account Code of the Bank Account of the transaction. If Code is not included then AccountID is required.
Optional
bankAccountId Bank Account ID string
The ID of the Bank Account transaction. If AccountID is not included then Code is required.
Optional
contactId Contact ID string
ID of the contact associated to the bank transaction.
Optional Dynamic
contactName Contact Name string
Name of the contact associated to the bank transaction. If there is no contact matching this name, a new contact is created.
Optional
type Type string
Required
lineItems Line Items object
See LineItems. The LineItems element can contain any number of individual LineItem sub-elements. At least one is required to create a bank transaction.
Required
isReconciled Is Reconciled boolean
Boolean to show if transaction is reconciled. Conversion related apps can set the IsReconciled flag in scenarios when a matching bank statement line is not available. Learn more
Optional
date Date string
Date of transaction - YYYY-MM-DD
Optional
reference Reference string
Reference for the transaction. Only supported for SPEND and RECEIVE transactions.
Optional
currencyCode Currency Code string
The currency that bank transaction has been raised in (see Currencies). Setting currency is only supported on overpayments.
Optional
currencyRate Currency Rate string
Exchange rate to base currency when money is spent or received. e.g. 0.7500 Only used for bank transactions in non base currency. If this isn't specified for non base currency accounts then either the user-defined rate (preference) or the XE.com day rate will be used. Setting currency is only supported on overpayments.
Optional
url URL string
URL link to a source document - shown as "Go to App Name"
Optional
status Status string
Optional
lineAmountTypes Line Amount Types string
Line amounts are exclusive of tax by default if you don't specify this element. See Line Amount Types
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
xero_accounting_api-create-bank-transaction
Version
0.1.4
App
Xero Accounting
Authentication
OAuth
Read-only
No
Destructive
Yes
Open world
Yes