# Payments

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

> QuickBooks Payments API tool types.

# Payments

Tool types that drive the QuickBooks Payments API: tokenizing cards and bank accounts, charging and refunding them, storing payment methods on customers, and composites that collapse tokenize-store-charge sequences into one call.

Every type on this page requires a [QuickBooks connector](/docs/guide/connectors.md) whose Intuit company has a QuickBooks Payments merchant account; `connectorId` is the ID of that connector. Unlike the accounting families, these tools move real money in production — sandbox connectors hit Intuit's sandbox Payments endpoint and accept test card and bank numbers. Charges and refunds here do **not** write accounting entries by themselves; the `*_AND_RECORD_*` composites here and on the [Workflows](/docs/tools/quickbooks/workflows.md) page bridge the two sides.

## Tokenize card **TOOL** `QUICKBOOKS_TOKENIZE_CARD`

Exchanges raw card details for a single-use payment token, so downstream calls never carry the card number. Tokens are short-lived — spend the token promptly with `QUICKBOOKS_CHARGE_CARD` or store it with `QUICKBOOKS_CREATE_CARD`, or use the tokenize-and-* composites to do both steps atomically.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_CARD",
  "connectorId": "V1StGXR8Z5",
  "cardNumber": "@@{cardNumber}",
  "expMonth": "@@{expMonth}",
  "expYear": "@@{expYear}",
  "cvc": "@@{cvc}",
  "cardHolderName": "@@{cardHolderName}",
  "addressPostalCode": "@@{billingZip}"
}
```

> 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.
- `cardNumber` (string) — Credit card number
- `expMonth` (string) — Expiration month (MM)
- `expYear` (string) — Expiration year (YYYY)
- `cvc` (string) — Card verification code
- `cardHolderName` (string) — Name on card
- `addressStreet` (string) — Billing address street
- `addressCity` (string) — Billing address city
- `addressRegion` (string) — Billing address state/region
- `addressPostalCode` (string) — Billing address postal code
- `addressCountry` (string) — Billing address country (ISO code)

## Tokenize bank account **TOOL** `QUICKBOOKS_TOKENIZE_BANK_ACCOUNT`

Exchanges bank account details (routing and account number) for a single-use token for ACH eCheck processing. `accountType` is one of `PERSONAL_CHECKING`, `PERSONAL_SAVINGS`, `BUSINESS_CHECKING`, or `BUSINESS_SAVINGS`. Pair with `QUICKBOOKS_PROCESS_ECHECK` or the tokenize-and-* composites.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_BANK_ACCOUNT",
  "connectorId": "V1StGXR8Z5",
  "routingNumber": "@@{routingNumber}",
  "accountNumber": "@@{accountNumber}",
  "accountType": "PERSONAL_CHECKING",
  "accountHolderName": "@@{accountHolderName}",
  "phone": "@@{phone}"
}
```

> 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.
- `routingNumber` (string) — Bank routing number (9 digits)
- `accountNumber` (string) — Bank account number
- `accountType` (string) — PERSONAL_CHECKING, PERSONAL_SAVINGS, BUSINESS_CHECKING, BUSINESS_SAVINGS
- `accountHolderName` (string) — Name on account
- `phone` (string) — Account holder phone

## Create card **TOOL** `QUICKBOOKS_CREATE_CARD`

Stores a tokenized card on a QuickBooks customer as a reusable payment method, returning a permanent `cardId`. The `cardToken` must come from a fresh `QUICKBOOKS_TOKENIZE_CARD` call; `isDefault` makes it the customer's default method.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_CREATE_CARD",
  "connectorId": "V1StGXR8Z5",
  "customerId": "@@{customerId}",
  "cardToken": "@@{cardToken}",
  "isDefault": 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.
- `customerId` (string) — QuickBooks customer ID
- `cardToken` (string) — Token from tokenizeCard
- `isDefault` (boolean) — Set as default payment method

## Charge card **TOOL** `QUICKBOOKS_CHARGE_CARD`

Charges a card for `amount` — pass either a one-time `cardToken` or a stored `cardId` (with its owning `customerId`), never both. `capture` defaults to true; set it false to authorize only. This processes money but books nothing; use `QUICKBOOKS_CHARGE_AND_RECORD_PAYMENT` on the [Workflows](/docs/tools/quickbooks/workflows.md) page to also write the accounting entry.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_CHARGE_CARD",
  "connectorId": "V1StGXR8Z5",
  "amount": 450.00,
  "currency": "USD",
  "cardToken": "@@{cardToken}",
  "capture": true,
  "description": "@@{paymentDescription}"
}
```

> 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.
- `amount` (number) — Charge amount
- `currency` (string) — Currency code (USD, etc.)
- `cardToken` (string) — Token for one-time payment (use this OR cardId)
- `cardId` (string) — Stored card ID (use this OR cardToken)
- `customerId` (string) — Customer ID (required if using cardId)
- `capture` (boolean) — Whether to capture immediately (default true)
- `description` (string) — Payment description

## Process eCheck **TOOL** `QUICKBOOKS_PROCESS_ECHECK`

Debits a bank account via ACH — pass either a one-time `bankAccountToken` or a stored `bankAccountId` (with its `customerId`). `paymentMode` is the ACH authorization class (`WEB` default, `TEL`, `CCD`, `PPD`). ACH settles over days rather than instantly, so treat the result as initiated, not cleared.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_PROCESS_ECHECK",
  "connectorId": "V1StGXR8Z5",
  "amount": 450.00,
  "bankAccountToken": "@@{bankAccountToken}",
  "paymentMode": "WEB",
  "description": "@@{paymentDescription}"
}
```

> 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.
- `amount` (number) — Payment amount
- `bankAccountToken` (string) — Token for one-time payment (use this OR bankAccountId)
- `bankAccountId` (string) — Stored bank account ID (use this OR bankAccountToken)
- `customerId` (string) — Customer ID (required if using bankAccountId)
- `paymentMode` (string) — WEB (default), TEL, CCD, PPD
- `description` (string) — Payment description

## Refund charge **TOOL** `QUICKBOOKS_REFUND_CHARGE`

Refunds a card charge by `chargeId`, back to the original card. Omit `amount` for a full refund or set it for a partial one. The refund is Payments-API-only; `QUICKBOOKS_REFUND_CHARGE_AND_RECORD_CREDIT` below also books the credit memo.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_REFUND_CHARGE",
  "connectorId": "V1StGXR8Z5",
  "chargeId": "@@{chargeId}",
  "amount": 450.00,
  "description": "@@{refundReason}"
}
```

> 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) — ID of the charge to refund
- `amount` (number · optional) — Refund amount (optional for partial refund)
- `description` (string) — Refund description/reason

## Refund eCheck **TOOL** `QUICKBOOKS_REFUND_ECHECK`

Refunds an ACH eCheck payment by `echeckId`, in full (omit `amount`) or partially. eCheck refunds can only be issued once the original debit has settled, so a refund immediately after processing may be rejected.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_REFUND_ECHECK",
  "connectorId": "V1StGXR8Z5",
  "echeckId": "@@{echeckId}",
  "description": "@@{refundReason}"
}
```

> 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.
- `echeckId` (string) — ID of the eCheck to refund
- `amount` (number · optional) — Refund amount (optional for partial refund)
- `description` (string) — Refund description/reason

## Tokenize and charge **TOOL** `QUICKBOOKS_TOKENIZE_AND_CHARGE`

Tokenizes raw card details and charges the token in one call — the standard way to take a one-off card payment without juggling short-lived tokens across tool calls. The card is not stored; for repeat billing use `QUICKBOOKS_TOKENIZE_AND_STORE_CARD` instead.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_AND_CHARGE",
  "connectorId": "V1StGXR8Z5",
  "amount": 450.00,
  "currency": "USD",
  "cardNumber": "@@{cardNumber}",
  "expMonth": "@@{expMonth}",
  "expYear": "@@{expYear}",
  "cvc": "@@{cvc}",
  "cardHolderName": "@@{cardHolderName}",
  "description": "@@{paymentDescription}"
}
```

> 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.
- `amount` (number) — Charge amount
- `currency` (string) — Currency code (USD, etc.)
- `cardNumber` (string) — Credit card number
- `expMonth` (string) — Expiration month (MM)
- `expYear` (string) — Expiration year (YYYY)
- `cvc` (string) — Card verification code
- `cardHolderName` (string) — Name on card
- `description` (string) — Payment description

## Tokenize and process eCheck **TOOL** `QUICKBOOKS_TOKENIZE_AND_PROCESS_ECHECK`

Tokenizes bank account details and initiates the ACH debit in one call — the eCheck counterpart of tokenize-and-charge. The bank account is not stored for reuse; that's `QUICKBOOKS_TOKENIZE_AND_STORE_BANK_ACCOUNT`.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_AND_PROCESS_ECHECK",
  "connectorId": "V1StGXR8Z5",
  "amount": 450.00,
  "routingNumber": "@@{routingNumber}",
  "accountNumber": "@@{accountNumber}",
  "accountType": "PERSONAL_CHECKING",
  "accountHolderName": "@@{accountHolderName}",
  "paymentMode": "WEB",
  "description": "@@{paymentDescription}"
}
```

> 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.
- `amount` (number) — Payment amount
- `routingNumber` (string) — Bank routing number
- `accountNumber` (string) — Bank account number
- `accountType` (string) — PERSONAL_CHECKING, PERSONAL_SAVINGS, etc.
- `accountHolderName` (string) — Name on account
- `paymentMode` (string) — WEB, TEL, CCD, PPD
- `description` (string) — Payment description

## Tokenize and store card **TOOL** `QUICKBOOKS_TOKENIZE_AND_STORE_CARD`

Tokenizes a card and stores it on an existing customer in one call, returning a permanent `cardId` for later `QUICKBOOKS_CHARGE_STORED_CARD` calls. Nothing is charged. If the customer record may not exist yet, `QUICKBOOKS_SETUP_CUSTOMER_PAYMENT_METHOD` below handles that too.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_AND_STORE_CARD",
  "connectorId": "V1StGXR8Z5",
  "customerId": "@@{customerId}",
  "cardNumber": "@@{cardNumber}",
  "expMonth": "@@{expMonth}",
  "expYear": "@@{expYear}",
  "cvc": "@@{cvc}",
  "cardHolderName": "@@{cardHolderName}",
  "isDefault": 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.
- `customerId` (string) — Customer to store card for
- `cardNumber` (string) — Credit card number
- `expMonth` (string) — Expiration month (MM)
- `expYear` (string) — Expiration year (YYYY)
- `cvc` (string) — Card verification code
- `cardHolderName` (string) — Name on card
- `isDefault` (boolean) — Set as default payment method

## Tokenize and store bank account **TOOL** `QUICKBOOKS_TOKENIZE_AND_STORE_BANK_ACCOUNT`

Tokenizes a bank account and stores it on an existing customer in one call, returning a permanent `bankAccountId` for later `QUICKBOOKS_CHARGE_STORED_BANK_ACCOUNT` calls. Nothing is debited at store time.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_TOKENIZE_AND_STORE_BANK_ACCOUNT",
  "connectorId": "V1StGXR8Z5",
  "customerId": "@@{customerId}",
  "routingNumber": "@@{routingNumber}",
  "accountNumber": "@@{accountNumber}",
  "accountType": "PERSONAL_CHECKING",
  "accountHolderName": "@@{accountHolderName}",
  "isDefault": 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.
- `customerId` (string) — Customer to store bank account for
- `routingNumber` (string) — Bank routing number
- `accountNumber` (string) — Bank account number
- `accountType` (string) — PERSONAL_CHECKING, PERSONAL_SAVINGS, etc.
- `accountHolderName` (string) — Name on account
- `phone` (string) — Account holder phone
- `isDefault` (boolean) — Set as default payment method

## Charge stored card **TOOL** `QUICKBOOKS_CHARGE_STORED_CARD`

Charges a card previously stored on a customer, identified by `customerId` plus `cardId` — no card details or fresh token needed. This is the repeat-billing workhorse for customers set up via the store composites.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_CHARGE_STORED_CARD",
  "connectorId": "V1StGXR8Z5",
  "customerId": "@@{customerId}",
  "cardId": "@@{cardId}",
  "amount": 450.00,
  "currency": "USD",
  "description": "@@{paymentDescription}"
}
```

> 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.
- `customerId` (string) — Customer ID who owns the card
- `cardId` (string) — Stored card ID
- `amount` (number) — Charge amount
- `currency` (string) — Currency code (USD, etc.)
- `description` (string) — Payment description

## Charge stored bank account **TOOL** `QUICKBOOKS_CHARGE_STORED_BANK_ACCOUNT`

Debits a bank account previously stored on a customer via ACH, identified by `customerId` plus `bankAccountId`. `paymentMode` carries the ACH authorization class, and the same settlement-delay caveat as `QUICKBOOKS_PROCESS_ECHECK` applies.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_CHARGE_STORED_BANK_ACCOUNT",
  "connectorId": "V1StGXR8Z5",
  "customerId": "@@{customerId}",
  "bankAccountId": "@@{bankAccountId}",
  "amount": 450.00,
  "paymentMode": "WEB",
  "description": "@@{paymentDescription}"
}
```

> 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.
- `customerId` (string) — Customer ID who owns the bank account
- `bankAccountId` (string) — Stored bank account ID
- `amount` (number) — Payment amount
- `paymentMode` (string) — WEB, TEL, CCD, PPD
- `description` (string) — Payment description

## Setup customer payment method **TOOL** `QUICKBOOKS_SETUP_CUSTOMER_PAYMENT_METHOD`

The full onboarding composite: finds the customer by email (creating one if missing), then tokenizes and stores the payment method on them. `paymentMethodType` selects `CARD` (card fields required) or `BANK_ACCOUNT` (bank fields required), so one tool config can onboard either kind. Returns the customer, whether it was created, and the stored method.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_SETUP_CUSTOMER_PAYMENT_METHOD",
  "connectorId": "V1StGXR8Z5",
  "email": "@@{customerEmail}",
  "displayName": "@@{customerName}",
  "paymentMethodType": "CARD",
  "cardNumber": "@@{cardNumber}",
  "expMonth": "@@{expMonth}",
  "expYear": "@@{expYear}",
  "cvc": "@@{cvc}",
  "cardHolderName": "@@{cardHolderName}",
  "setAsDefault": 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.
- `email` (string) — Customer email (primary search key)
- `displayName` (string) — Customer display name
- `givenName` (string) — First name
- `familyName` (string) — Last name
- `paymentMethodType` (string) — CARD or BANK_ACCOUNT
- `cardNumber` (string) — Required string value.
- `expMonth` (string) — Required string value.
- `expYear` (string) — Required string value.
- `cvc` (string) — Required string value.
- `cardHolderName` (string) — Required string value.
- `routingNumber` (string) — Required string value.
- `accountNumber` (string) — Required string value.
- `accountType` (string) — Required string value.
- `accountHolderName` (string) — Required string value.
- `phone` (string) — Required string value.
- `setAsDefault` (boolean) — Required boolean value.

## Refund charge and record credit **TOOL** `QUICKBOOKS_REFUND_CHARGE_AND_RECORD_CREDIT`

Refunds a card charge and books a matching credit memo against the customer in the same call, keeping the Payments side and the ledger in sync. Omit `amount` for a full refund; `reason` lands on both the refund and the credit memo.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_REFUND_CHARGE_AND_RECORD_CREDIT",
  "connectorId": "V1StGXR8Z5",
  "chargeId": "@@{chargeId}",
  "customerId": "@@{customerId}",
  "reason": "@@{refundReason}"
}
```

> 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) — Charge ID to refund
- `customerId` (string) — Customer ID for credit memo
- `amount` (number · optional) — Refund amount (optional for full refund)
- `reason` (string) — Refund reason/description

## Refund eCheck and record credit **TOOL** `QUICKBOOKS_REFUND_ECHECK_AND_RECORD_CREDIT`

The ACH counterpart: refunds an eCheck by `echeckId` and books the matching credit memo against the customer in one call. The eCheck must have settled before it can be refunded, same as the plain refund tool.

### Example

```json title="Tool config"
{
  "toolType": "QUICKBOOKS_REFUND_ECHECK_AND_RECORD_CREDIT",
  "connectorId": "V1StGXR8Z5",
  "echeckId": "@@{echeckId}",
  "customerId": "@@{customerId}",
  "reason": "@@{refundReason}"
}
```

> 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.
- `echeckId` (string) — eCheck ID to refund
- `customerId` (string) — Customer ID for credit memo
- `amount` (number · optional) — Refund amount (optional for full refund)
- `reason` (string) — Refund reason/description

## Related

- [Tools overview](/docs/tools.md)
- [QuickBooks overview](/docs/tools/quickbooks.md)
- [Sales & AR](/docs/tools/quickbooks/sales-ar.md)
- [Purchasing & AP](/docs/tools/quickbooks/purchasing-ap.md)
- [Items, Accounts & Company](/docs/tools/quickbooks/items-accounts-company.md)
- [Reports](/docs/tools/quickbooks/reports.md)
- [Workflows](/docs/tools/quickbooks/workflows.md)
- [Connectors](/docs/guide/connectors.md)
- [Autessa Payments](/docs/tools/autessa-payments.md)

