# Autessa Payments

Source: https://docs.autessa.com/docs/tools/autessa-payments

> Tool types that let agents invoice your customers, look up customers, refund payments, and check payouts through Autessa Payments.

# Autessa Payments

Let agents invoice your customers and check payouts: create and email real invoices with a pay link, look up your customers, refund a paid invoice, and answer "has my money arrived?"

Every type needs your company's Autessa Payments account (`connectorId`). Set it up from **Payments** in the sidebar; see [Set Up Autessa Payments](/docs/guide/platform/autessa-payments/setup.md). An account that hasn't finished setup fails with `NOT_ONBOARDED`. All amounts are integer cents.

## Create Invoice **TOOL** `AUTESSA_PAYMENTS_CREATE_INVOICE`

Creates a real invoice, exactly like one made on the **Payments** page, and by default emails it to the customer with the PDF and a secure pay link. **It charges nothing**: the customer pays from the link by card, Apple Pay, Google Pay, or bank account. Sales tax is calculated from the customer address for the places you collect tax in and locked when the invoice is sent.

- Identify the customer with `customerEmail` (plus `customerName` and the address fields), or with `customerId` from [List Customers](#list-customers-).
- Bill a single amount with `amountCents` and `description`, or several lines with `lineItemsJson`, a JSON array of `{"description", "quantity", "unitAmountCents"}`.
- `dueDate` (`yyyy-MM-dd`) and `memo` are optional.
- Set `sendNow` to `false` to save a draft for you to review instead of emailing it. Sending needs your business to be verified.

Repeated invocations are idempotent per tool invocation, so a retried agent turn can't create the invoice twice.

The result is `{"success": true, "invoiceId": ..., "invoiceNumber": ..., "status": ..., "amountCents": ..., "taxCents": ..., "totalAmountCents": ..., "customerEmail": ..., "payUrl": ..., "dueDate": ...}`. `amountCents` is the subtotal before tax. `payUrl` is empty for drafts. Keep `invoiceId` if you may need to [refund](#refund-) later. When the invoice can't be created (for example, a missing email or an account that isn't verified yet), the result is `{"success": false, "errorCode": "CREATE_INVOICE_REFUSED", "errorMessage": ...}` with a plain explanation; unexpected failures use `CREATE_INVOICE_ERROR`.

### Example

```json title="Tool config"
{
  "toolType": "AUTESSA_PAYMENTS_CREATE_INVOICE",
  "connectorId": "V1StGXR8Z5",
  "customerEmail": "@@{CUSTOMER_EMAIL}",
  "customerName": "@@{CUSTOMER_NAME}",
  "amountCents": 25000,
  "description": "@@{INVOICE_DESCRIPTION}",
  "customerCountry": "US",
  "customerState": "@@{CUSTOMER_STATE}",
  "customerPostalCode": "@@{CUSTOMER_POSTAL_CODE}",
  "customerCity": "@@{CUSTOMER_CITY}",
  "sendNow": true
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `customerEmail` (string) — Required string value.
- `amountCents` (integer) — Required integer value.
- `currency` (string) — Required string value.
- `description` (string) — Required string value.
- `customerCountry` (string) — Required string value.
- `customerState` (string) — Required string value.
- `customerPostalCode` (string) — Required string value.
- `customerCity` (string) — Required string value.
- `customerTaxId` (string) — Required string value.
- `customerId` (string) — Required string value.
- `customerName` (string) — Required string value.
- `lineItemsJson` (string) — Required string value.
- `dueDate` (string) — Required string value.
- `memo` (string) — Required string value.
- `sendNow` (boolean) — Required boolean value.
- `sendEmail` (boolean) — Required boolean value.

## List Customers **TOOL** `AUTESSA_PAYMENTS_LIST_CUSTOMERS`

Looks up customers on your [Customers](/docs/guide/platform/autessa-payments/customers-and-plans.md#customers) list, so an agent can invoice someone you already bill or check whether they're paying. Set `query` to search by name or email (an exact email is fastest), or leave it empty for the most recent customers. `limit` caps the results at up to 50.

The result is `{"success": true, "customers": [{"customerId": ..., "name": ..., "email": ..., "invoiceCount": ..., "paidCents": ..., "outstandingCents": ..., "activeSubscriptions": ..., "isPaying": ...}]}`. Pass a `customerId` to [Create Invoice](#create-invoice-).

### Example

```json title="Tool config"
{
  "toolType": "AUTESSA_PAYMENTS_LIST_CUSTOMERS",
  "connectorId": "V1StGXR8Z5",
  "query": "@@{CUSTOMER_EMAIL}",
  "limit": 10
}
```

## Charge Customer **TOOL** `AUTESSA_PAYMENTS_CHARGE_CUSTOMER`

Not available. Every call returns `{"success": false, "errorCode": "NOT_SUPPORTED", "errorMessage": ...}` without charging anyone. Use [Create Invoice](#create-invoice-) instead: the customer gets a secure link and pays it themselves.

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `amountCents` (integer) — Required integer value.
- `currency` (string) — Required string value.
- `description` (string) — Required string value.
- `customerEmail` (string) — Required string value.
- `customerCountry` (string) — Required string value.
- `customerState` (string) — Required string value.
- `customerPostalCode` (string) — Required string value.
- `customerCity` (string) — Required string value.
- `customerTaxId` (string) — Required string value.

## Refund **TOOL** `AUTESSA_PAYMENTS_REFUND`

Refunds a payment. Set `chargeId` to the `invoiceId` of an invoice that was paid online through Autessa Payments. Invoices recorded as paid another way (cash, check) can't be refunded here. Leave `amountCents` null for a full refund, or set it for a partial refund. Partial refunds prorate the base amount and tax, and the tax recorded for that place and month is reduced to match. The refund shows on the invoice and under **Transactions**.

The result is `{"success": true, "chargeId": ..., "refundId": ..., "refundedAmountCents": ..., "remainingRefundableCents": ..., "invoiceId": ...}`. An invoice that isn't refundable returns `NOT_REFUNDABLE`; a refund the payment can't take (for example, more than what's left to refund) returns `REFUND_REFUSED` with a plain explanation.

### Example

```json title="Tool config"
{
  "toolType": "AUTESSA_PAYMENTS_REFUND",
  "connectorId": "V1StGXR8Z5",
  "chargeId": "@@{INVOICE_ID}",
  "amountCents": null
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `chargeId` (string) — Required string value.
- `amountCents` (integer) — null = full refund

## Get Payout Status **TOOL** `AUTESSA_PAYMENTS_GET_PAYOUT_STATUS`

Checks the status of your most recent payout, useful for agents that answer "has my money arrived?" questions. It returns a single status string, not a payout history.

The result is `{"success": true, "payoutStatus": ...}` where `payoutStatus` is one of `paid`, `pending`, `in_transit`, `failed`, or `canceled`; `NONE` means no payouts exist yet, and `UNKNOWN` means the status could not be retrieved.

### Example

```json title="Tool config"
{
  "toolType": "AUTESSA_PAYMENTS_GET_PAYOUT_STATUS",
  "connectorId": "V1StGXR8Z5"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.

## Related

- [Set Up Autessa Payments](/docs/guide/platform/autessa-payments/setup.md)
- [Send Your First Invoice](/docs/guide/platform/autessa-payments/first-invoice.md)
- [Customers and Plans](/docs/guide/platform/autessa-payments/customers-and-plans.md)
- [Payouts](/docs/guide/platform/autessa-payments/payouts.md)
- [Payments from the CLI](/docs/cli/payments.md)
- [Tool Types overview](/docs/tools.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [QuickBooks tool types](/docs/tools/quickbooks.md) — accounting-side payments and invoicing

