provider POST /v1/tax/calculations
@utdk/stripe /v1/tax/calculations
Create a Calculation
<p>Calculates tax based on the input and returns a Tax <code>Calculation</code> object.</p>

Try it

Authentication
Configure credentials for Stripe API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

posttaxcalculations
POST/v1/tax/calculations
<p>Calculates tax based on the input and returns a Tax <code>Calculation</code> object.</p>

Input

required

Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).

The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`.

Details about the customer, including address and tax IDs.

Specifies which fields in the response should be expanded.

required

A list of items the customer is purchasing.

Details about the address from which the goods are being shipped.

Shipping cost details to be used for the calculation.

Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stripe from '@utdk/stripe';

await stripe.posttaxcalculations()