Sales Tax

Apply tax to invoice line items and recurring plans

Sales tax is applied as part of an invoice or a recurring contract — you attach tax to line items or to the whole document, and PCE includes it in the total. There is no separate "create tax" call; tax travels on the Invoicing and Recurring Billing requests. For the full field list, jump to the Tax fields.

Common use cases

  • Add state or local sales tax to an invoice
  • Apply tax per line item at different rates
  • Include tax in a recurring plan's cycle amount

How tax is applied

Tax appears in two places on a request:

  • Per line item — each purchases[] entry can carry its own taxRate and taxAmount (and, on contracts, a nested taxes[] breakdown). Use this when different products are taxed differently.
  • Document level — the taxes[] array on the invoice or contract lists each tax by name, rate, and taxAmount, and taxAmount rolls into the document total.

Send the tax you calculated; PCE stores it and includes it in taxAmount and totalAmount on the response.


Apply tax to an invoice

Add a tax rate and amount to each line item in the invoice purchases[].

POST /checkout/v3/invoice

{
  "merchantId": 1000157980,
  "customer": { "id": 10000000803145 },
  "dueDate": "2026-02-28",
  "allowCreditCard": true,
  "purchases": [
    { "productName": "Consulting", "price": 250.00, "quantity": 2, "tax": 45 }
  ],
  "billingAddress": { "address1": "2001 Westside Parkway", "city": "Alpharetta", "state": "GA", "zip": "30009" },
  "shippingAddress": { "address1": "2001 Westside Parkway", "city": "Alpharetta", "state": "GA", "zip": "30009" }
}

The invoice is created via POST /checkout/v3/invoice. See Invoicing for the full request.


Apply tax to a recurring plan

On a contract, list taxes in the contract-level taxes[] array and (optionally) per line item. PCE includes the tax in each cycle's amount.

POST /checkout/v3/contractsubscription

{
  "contract": {
    "merchantId": 1000157980,
    "type": "Recurring",
    "interval": "Monthly",
    "frequency": 1,
    "purchases": [
      {
        "productName": "Mittens",
        "price": 4.99,
        "quantity": 5,
        "subTotalAmount": "24.95",
        "taxRate": "0.089",
        "taxAmount": "1.93"
      }
    ],
    "taxes": [
      { "name": "Sales Tax", "rate": "0.089", "taxAmount": "1.93" }
    ],
    "subTotalAmount": "24.95",
    "taxAmount": "1.93",
    "totalAmount": 26.88
  },
  "subscription": {
    "customerId": 10000001524400,
    "cardAccountId": 10000001225823,
    "invoiceMethod": "Autopay",
    "status": "Active",
    "startDate": "2026-02-01"
  }
}

The plan is created via POST /checkout/v3/contractsubscription. See Recurring Billing for the full request.


Tax fields

Document-level taxes[] (invoice or contract)

FieldDescription
nameDisplay name of the tax (for example, Sales Tax).
rateTax rate applied, as a decimal (for example, 0.089 for 8.9%).
taxAmountCalculated tax amount for this tax.
taxCodeOptional tax code, where you classify the tax.

Line-item tax (on purchases[])

FieldDescription
taxRateTax rate for the line item, as a decimal.
taxAmountCalculated tax amount for the line item.
taxOn invoices, the tax applied to the line item.

Tax-exempt customers carry isTaxExempt on the customer record, which governs exemption handling.


See also



Did this page help you?
.readme-logo { display: none !important; }