How it works
1
Customer initiates payment
PayNext sends transaction details to your tax provider.
2
Tax calculated
Provider returns tax amount based on customer location and your tax behavior setting (
exclusive or inclusive).3
Payment authorized
Payment authorized for the total amount (subtotal + tax for exclusive, or full amount for inclusive).
4
Payment settles
Tax transaction submitted to provider for reporting.
5
Refund processed (if applicable)
Tax transaction reversed with provider.
How tax location is determined
PayNext determines the customer’s tax jurisdiction based on the payment method and available data:
For US customers, pass
zip_code and state in the customer object when creating the checkout session. These two fields are the minimum required for tax calculation—in most cases, the state can be detected automatically from the zip code. For the most accurate calculation, pass the full address object.
If address data is not provided, PayNext uses geolocation data from the customer’s device. Learn more about what data PayNext collects to determine tax location.
Address data and audit risk
The accuracy of your tax location data affects audit risk. When a payment method provides a full billing address (like Apple Pay or Google Pay), PayNext automatically uses it for tax calculation.
When no customer address is provided, PayNext collects fingerprint data that includes zip code, state, city, coordinates, and IP address from the customer’s device. This approach carries medium audit risk because:
- Documented methodology — Consistent, defensible process with detailed location data
- Regulatory precedent — Texas PLR guidance confirms IP-based geolocation is acceptable when addresses aren’t collected
- Audit trail — All geolocation data is logged and available for compliance review
Location mismatch handling
When creating a client session with customer country set to US but no address data available (nozip_code/state provided and payment method is not Apple Pay or Google Pay), PayNext falls back to device fingerprint for tax location.
If the fingerprint indicates the customer is outside the US (e.g., Canada), PayNext does not calculate US sales tax for that transaction. The payment processes without tax, and the API returns the “tax doesn’t apply” response structure. This occurs because the customer’s actual location—based on fingerprint data—is outside the tax provider’s supported jurisdiction.
Configuration
Tax configuration follows a hierarchy—set defaults globally and override tax collection at the plan level when needed.Global settings
Configure default tax behavior in Dashboard → Integrations → Tax:Plan-level settings
Override global tax collection for specific plans in Dashboard → Plans → [Plan Name]. Each plan has acollect_tax setting that controls whether tax is collected for payments under that plan:
When you retrieve plan details via API, the
tax object reflects this configuration:
Example plan response
Example plan response
Tax behavior (
exclusive or inclusive) and product category are configured globally on the tax provider, not per plan. All plans that collect tax use the same behavior and product category.Tax in API responses
All payments include atax object. The structure varies based on whether tax was calculated for the transaction.
When tax applies
When tax is enabled for the customer’s location, thetax object includes provider details and calculation status:
Example: Tax calculated ($100 + 7% tax)
Example: Tax calculated ($100 + 7% tax)
When customers pay in other currencies, use
amount_subtotal_usd and amount_tax_usd to see the USD equivalent for reporting.When tax doesn’t apply
When tax is not enabled for the customer’s location (no tax provider configured, location not in your tax registrations, or plan set toDONT_COLLECT), the provider field is null and amount_tax is 0:
Example: Tax not applicable ($100, no tax)
Example: Tax not applicable ($100, no tax)
provider field to determine if tax was calculated:
provideris present → tax was calculated, checkstatusfor the outcomeproviderisnull→ tax not applicable for this transaction
Tax fields
Tax status lifecycle
Amount relationships
When calculation fails
If the tax provider doesn’t respond within 1.5 seconds or returns an error, PayNext processes the payment without tax to ensure you don’t lose revenue. Thestatus is failed and an error object contains the failure reason.
Failed transactions appear in Dashboard → Tax → Failed where you can review and submit them manually to your tax provider.
Example: Timeout error
Example: Timeout error
Example: Provider error
Example: Provider error
Example: Post-capture transaction failure
Example: Post-capture transaction failure
When tax calculation succeeds during authorization but the transaction submission fails after capture, the
status becomes failed while preserving the original calculation amounts:Tax calculation failures are rare. When they occur, absorbing the tax cost is preferable to declining payments and losing revenue.
Webhooks
PayNext sends tax data in thetax object of payment webhook payloads. The tax object is included in:
payment_v2.created— Initial payment with taxstatus: "calculated"(or"failed"if calculation errored)payment_v2.settled— After settlement, taxstatus: "submitted"payment_v2.failed— After capture failure, taxstatus: "failed"payment_v2.refund.created/payment_v2.refund.settled— Taxstatus: "reversed"when a refund succeeds
Best practices
Use exclusive pricing for flexibility
Use exclusive pricing for flexibility
Set your global default to
exclusive. This lets you display pre-tax prices and add tax at checkout—the standard approach for US and B2B sales. Override to inclusive only for specific markets (like EU B2C) where tax-inclusive pricing is expected.Start collecting before you register
Start collecting before you register
You can start calculating and collecting tax before you’re officially registered in a jurisdiction. Once registered, most tax providers support backfilling historical transactions. PayNext returns $0 tax for customers in locations where you haven’t enabled tax collection in Integrations.
Use USD amounts for reporting
Use USD amounts for reporting
For reporting convenience, use the
_usd fields (amount_subtotal_usd, amount_tax_usd) to avoid currency conversion complexity. Your final tax liability is available in your tax provider’s dashboard (e.g., Numeral)—use that information for your accounting and filing.