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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "xero_accounting_api-create-bank-transaction",
"configured_props": {
"xero_accounting_api": { "authProvisionId": "apn_xxxxxxx" },
"tenantId": "Tenant ID",
"bankAccountCode": "Bank Account Code"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "xero_accounting_api",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "xero_accounting_api-create-bank-transaction",
arguments: {
tenantId: "Tenant ID",
bankAccountCode: "Bank Account Code",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| 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
- Source
- View on GitHub ↗