Create Payment
xero.create_payment
ActionCRM & salesconnection required
Calls the Xero API with the connection's credentials.
Apply a payment to an invoice or credit note from a bank account.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Xero
- Secret shape
- {"client_id": "…", "client_secret": "…", "refresh_token": "…"}
- Config it needs
- tenant_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
9 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
invoice_id The Xero InvoiceID being paid; leave blank to pay a credit note. | string | No | — | — | — |
credit_note_id The Xero CreditNoteID being paid, when no invoice id is given. | string | No | — | — | — |
account_code Code of the bank account the payment moves through, e.g. 090. | string | No | — | — | 090 |
account_id AccountID of the bank account, as an alternative to its code. | string | No | — | — | — |
amount Amount paid, in the invoice currency; may not exceed the amount due. | number | Yes | — | ≥ 0 | — |
date Payment date as YYYY-MM-DD; Xero uses today when it is blank. | string | No | — | iso8601 format | — |
reference Optional description shown against the payment, e.g. Direct Debit. | string | No | — | — | — |
fields Extra Xero Payment fields merged into the request, e.g. CurrencyRate. | object | No | — | — | — |
tenant_id Xero organisation (tenant) id for this call; overrides the connection's. | string | No | — | — | — |
- At least one of invoice_id, credit_note_id must be set.
- At least one of account_code, account_id must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"account_code": "090"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
payment The payment as Xero returned it, in PascalCase. | object | — |
payment_id The Xero identifier of the payment. | string | — |
validation_errors Messages Xero attached to the record; empty when it was accepted. | array | — |
{
"payment": {},
"payment_id": "",
"validation_errors": []
}Notes
- Xero refuses a payment larger than the invoice's outstanding amount.
See Create Payment run in a workflow.
In a technical demo we add the Xero connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.