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 owntaxRateandtaxAmount(and, on contracts, a nestedtaxes[]breakdown). Use this when different products are taxed differently. - Document level — the
taxes[]array on the invoice or contract lists each tax byname,rate, andtaxAmount, andtaxAmountrolls 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)
taxes[] (invoice or contract)| Field | Description |
|---|---|
name | Display name of the tax (for example, Sales Tax). |
rate | Tax rate applied, as a decimal (for example, 0.089 for 8.9%). |
taxAmount | Calculated tax amount for this tax. |
taxCode | Optional tax code, where you classify the tax. |
Line-item tax (on purchases[])
purchases[])| Field | Description |
|---|---|
taxRate | Tax rate for the line item, as a decimal. |
taxAmount | Calculated tax amount for the line item. |
tax | On invoices, the tax applied to the line item. |
Tax-exempt customers carry isTaxExempt on the customer record, which governs exemption handling.
See also
- Invoicing: apply tax to an invoice
- Recurring Billing: apply tax to a recurring plan
- Discounts: reduce the amount before tax
Updated about 4 hours ago