Skip to main content

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. An account that hasn't finished setup fails with NOT_ONBOARDED. All amounts are integer cents.

Create Invoice TOOLAUTESSA_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.
  • 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 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​

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

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

List Customers TOOLAUTESSA_PAYMENTS_LIST_CUSTOMERS​

Looks up customers on your 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.

Example​

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

Charge Customer TOOLAUTESSA_PAYMENTS_CHARGE_CUSTOMER​

Not available. Every call returns {"success": false, "errorCode": "NOT_SUPPORTED", "errorMessage": ...} without charging anyone. Use 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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.
  • Name
    amountCents
    Type
    integer
    Description
    Required integer value.
  • Name
    currency
    Type
    string
    Description
    Required string value.
  • Name
    description
    Type
    string
    Description
    Required string value.
  • Name
    customerEmail
    Type
    string
    Description
    Required string value.
  • Name
    customerCountry
    Type
    string
    Description
    Required string value.
  • Name
    customerState
    Type
    string
    Description
    Required string value.
  • Name
    customerPostalCode
    Type
    string
    Description
    Required string value.
  • Name
    customerCity
    Type
    string
    Description
    Required string value.
  • Name
    customerTaxId
    Type
    string
    Description
    Required string value.

Refund TOOLAUTESSA_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.
  • Name
    chargeId
    Type
    string
    Description
    Required string value.
  • Name
    amountCents
    Type
    integer
    Description
    null = full refund

Get Payout Status TOOLAUTESSA_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.