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)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-payment",
"configured_props": {
"xero_accounting_api": { "authProvisionId": "apn_xxxxxxx" },
"tenantId": "Tenant ID",
"accountId": "Account ID"
}
}'// 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-payment",
arguments: {
tenantId: "Tenant ID",
accountId: "Account ID",
},
})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 |
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
- Source
- View on GitHub ↗