New CereTax SmartResearch. AI tax research. Cited answers. SmartResearch. Cited answers. SmartResearch. Learn more
You need sandbox access to the tax engine and a sample set of purchase invoices from your tool. Include an invoice with vendor-charged tax, one without, an exempt line, and a vendor whose headquarters differs from its ship-from location.
The tests are our recommendations. They follow the purchase transaction field list in the CereTax API documentation. The request requires a configuration object (contentYear, contentMonth, calculationType, and profileId) and an invoice object (glDate and lineItems). Each line requires distributionLineAmount, pSCode (the product or service code), and taxSitusRule. Send every required field. The Create transaction endpoints return an error when a required field is missing. The calculationType field takes P for purchases (the default) or S for sales.
The vendor, address, vendor-charged tax, and exemption fields below are not in the required lists. We include them because CereTax P2P determines taxability based on usage, location, and vendor type. If you use another engine, swap in its field names.
We do not cover who owes use tax or which purchases are taxable. For the terms, see our sales and use tax glossary.
A passing test shows your tool sends each field as AP entered it.
The CereTax purchase request has these vendor fields on the invoice.
Each line also has a vendorAddress field. We advise shipFromAddress over vendorAddress for situsing, because a vendor address is typically a headquarters address.
Test: send an invoice from a vendor whose headquarters differs from its ship-from location. Check that your tool sends the ship-from location in shipFromAddress. Check that vendorNumber, vendorType, the invoice number, and the invoice date match your records.
Each line requires taxSitusRule, which defines the address type to be used for tax situs. It takes these values.
A line can carry shipFromAddress, shipToAddress, InvoiceShipToAddress, poShipToAddress, orderPlacementAddress, and orderApprovalAddress. Each address object has 15 properties, among them addressLine1 to addressLine4, city, state, postalCode, and country. The locationCode, latitude, longitude, and plusCode properties can each serve as an alternate to an address value.
Test: send each line with a complete address and choose the taxSitusRule on purpose. On an invoice that ships to two places, check that each line carries its own address.
Each line requires pSCode, which defines the product or service for the transaction. You can retrieve valid values from the List PS codes endpoint. If rules in your profile apply a valid pSCode, none needs to be passed in the API request. The schema still marks pSCode required.
Test: take a sample of your item and commodity categories. Confirm that every line leaves your tool with a valid pSCode. If you rely on a profile rule, send one line without a pSCode. Read that line's valid flag and errorMessages in the response.
The request has four fields for this.
distributionLineTaxAmount is allocated if it is recorded only at the invoice level.
Test: send one invoice where the vendor charged tax and one where it did not. Check that the flags and amounts reach the request as AP entered them, at invoice and line level.
A CereTax line can carry taxExemptionCodes. They apply exemptions to line taxes by state, taxLevel, taxType, or taxTypeClass. Send a value for at least one of state, tax authority, taxLevel, taxType, or taxTypeClass, or the exemption does not apply. An exemption is ignored when no tax matches its criteria. An exemption without a taxExemptionPercentage applies at 100%. For each tax, exemptAmount holds the line amount or units considered exempt for that tax.
Test: confirm your tool holds an exemption status for each vendor or line to send. Send an exempt line. Check that each tax's exemptAmount matches the line amount the exemption should cover. Then send an exemption that matches no tax, and confirm your tool does not count it as applied.
The invoice object in the purchase response includes calculatedInvoiceTotalTax, the total tax for all lines within the transaction. It also has totalUseTaxAmount, totalInvoiceVariance, invoiceSalesTax, and invoiceTotalTaxAmount. Each line returns lineUseTaxAmount, lineItemTaxAmount, overUnder, a valid flag, errorMessages, and a taxes array. The taxes array holds tax, rate, calculationBaseAmt, exemptAmount, taxVariance (the amount of tax variance), and taxVarianceBase (the base amount of tax variance). The response also has a status with currentStatus, and a ksuid.
Test: compare the response invoiceSalesTax with the invoiceSalesTax you sent. Check each line's valid flag and errorMessages. Store the ksuid, a unique CereTax-generated ID for the transaction.
Coupa's Invoice Line API documentation lists tax fields on an invoice line, among them the following.
A tax line has three engine fields.
Test: ask which of these invoice line fields your tool reads back from the engine.
CereTax connects to Coupa to calculate sales tax on your transactions.
The CereTax API has endpoints to create, list, and replace purchase transactions. CereTax P2P lets your team compare what you were charged with what you owe. It connects to Oracle NetSuite, Microsoft Dynamics 365 Business Central, and Microsoft Dynamics 365 Finance and Operations. Other purchasing, accounts payable, and ERP platforms connect through the API or a scheduled batch file.
For the full procure-to-pay flow, read our procure-to-pay automation guide. Business Central users can follow the use tax setup guide.
Complex tax. Calculated correctly.