View as Markdown
Xero Accounting icon

Xero Accounting ACTION

Create Payment

Creates a new payment
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Xero Accounting account once, then configure and run Create Payment 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-payment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xero_accounting_api: { authProvisionId: "apn_xxxxxxx" },
    tenantId: "Tenant ID",
    accountId: "Account ID",
  },
})

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 Payment inputs
Property Type Description
tenantId Tenant ID string
Select an organization tenant to use, or provide a tenant ID
Required Dynamic
accountId Account ID string
ID of account you are using to make the payment e.g. 294b1dc5-cc47-2afc-7ec8-64990b8761b8. This account needs to be either an account of type BANK or have enable payments to this accounts switched on (see GET Accounts) . See the edit account screen of your Chart of Accounts in Xero if you wish to enable payments for an account other than a bank account
Optional
accountCode Account Code string
Code of account you are using to make the payment e.g. 001 ( note: not all accounts have a code value)
Optional
invoiceId Invoice ID string
ID of the invoice you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
Optional
creditNoteId Credit Note ID string
ID of the credit note you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
Optional
prepaymentId Prepayment ID string
ID of the prepayment you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
Optional
overpaymentId Overpayment ID string
ID of the overpayment you are applying payment to e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
Optional
invoiceNumber Invoice Number string
Number of invoice you are applying payment to e.g. INV-4003
Optional
creditNoteNumber Credit Note Number string
Number of credit note you are applying payment to e.g. INV-4003
Optional
date Date string
Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
Optional
currencyRate Currency Rate string
Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500
Optional
amount Amount string
The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00
Optional
reference Reference string
An optional description for the payment e.g. Direct Debit
Optional
isReconciled Is Reconciled boolean
A boolean indicating whether the payment has been reconciled.
Optional
status Status string
The status of the payment.
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-payment
Version
0.1.5
App
Xero Accounting
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes