Tamio

Estimate transaction costs

POST https://api.tamio.com/v2/transactions/estimate

Calculates estimated transaction costs including taxes, shipping, and discounts without creating an actual transaction. Useful for checkout previews and price calculations. Requires either an existing customer or new_customer for tax and shipping estimation.

Body Parameters

estimates boolean*

Must be true for estimation mode.

currency string*

Currency code for price estimation.

affiliate string

Affiliate UUID for commission estimation.

no_discounts boolean

Exclude discounts from estimation.

no_payment_validation boolean

Skip payment method validation.

coupons array of string

Coupon codes to include in estimation.

products array of ProductItem*

Product line items (1–20).

JSON
{ "products": [ { "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890", "quantity": 2, "price": 2500, "name": "Premium Widget", "variant": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "pack": "c3d4e5f6-a7b8-9012-cdef-123456789012" } ] }
id string

Product UUID.

quantity integer

Number of units.

price integer

Custom price in smallest currency unit (required when no id/variant/pack).

name string

Custom product name (required when no id/variant/pack).

variant string

Variant UUID.

pack string

Pack UUID.

customer object

Existing customer reference for personalized tax and shipping estimation.

JSON
{ "customer": { "id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890", "billing_address_id": "966a8470-8250-45d7-9ae7-aeaeffc30f28", "shipping_address_id": "ad5701b5-5470-44a3-9a56-af458f24f6b3", "same_shipping_address": false, "billing_information": { "country": "de", "address": "Awesome Street 24", "city": "Frankfurt", "postcode": "60311", "state": null, "name": "John", "last_name": "Doe" }, "shipping_information": { "country": "de", "address": "Shipping Street 5", "city": "Frankfurt", "postcode": "60311", "state": null, "name": "John", "last_name": "Doe" } } }
id string*

Customer UUID.

billing_address_id string

Existing billing address UUID. When provided, billing tax calculations use this stored address.

shipping_address_id string

Existing shipping address UUID. When provided, shipping cost calculations use this stored address.

same_shipping_address boolean

When true, the billing address is also used as the shipping address for delivery cost calculations.

billing_information object

New billing address for tax calculation. Provide this instead of billing_address_id when using an address not yet saved to the customer.

JSON
{ "billing_information": { "country": "de", "address": "Awesome Street 24", "city": "Frankfurt", "postcode": "60311", "state": null, "name": "John", "last_name": "Doe" } }
country string*

Billing country code (ISO 3166-1 alpha-2) for tax rate determination.

address string

Street address.

city string

City name.

postcode string

Postal / ZIP code for precise tax jurisdiction lookup.

state string

State or province code for state-level tax calculation.

name string

Contact first name.

last_name string

Contact last name.

shipping_information object

New shipping address for delivery cost calculation. Provide this instead of shipping_address_id when using an address not yet saved to the customer.

JSON
{ "shipping_information": { "country": "de", "address": "Shipping Street 5", "city": "Frankfurt", "postcode": "60311", "state": null, "name": "John", "last_name": "Doe" } }
country string*

Shipping destination country code (ISO 3166-1 alpha-2).

address string

Street address.

city string

City name.

postcode string

Postal / ZIP code.

state string

State or province code.

name string

Contact first name.

last_name string

Contact last name.

new_customer object

New customer information for cost estimation when no existing customer is available. Only country is required; billing and shipping addresses can be provided for more accurate tax and delivery calculations.

JSON
{ "new_customer": { "country": "de", "same_shipping_address": false, "billing_information": { "country": "de", "address": "Awesome Street 24", "city": "Frankfurt", "postcode": "60311", "state": null }, "shipping_information": { "country": "de", "address": "Shipping Street 5", "city": "Frankfurt", "postcode": "60311", "state": null } } }
country string*

Primary customer country code (ISO 3166-1 alpha-2) for basic tax rate determination.

same_shipping_address boolean

When true, the billing address is cloned as the shipping address for delivery cost estimation.

billing_information object

Billing address details for accurate tax calculation in the estimate.

JSON
{ "billing_information": { "country": "de", "address": "Awesome Street 24", "city": "Frankfurt", "postcode": "60311", "state": null } }
country string*

Billing country code (ISO 3166-1 alpha-2) for tax rate determination.

address string

Street address.

city string

City name.

postcode string

Postal / ZIP code for precise tax jurisdiction lookup.

state string

State or province code for state-level tax calculation.

shipping_information object

Shipping address details for delivery cost calculation and shipping method availability.

JSON
{ "shipping_information": { "country": "de", "address": "Shipping Street 5", "city": "Frankfurt", "postcode": "60311", "state": null } }
country string*

Shipping destination country code (ISO 3166-1 alpha-2).

address string

Street address.

city string

City name.

postcode string

Postal / ZIP code.

state string

State or province code.

Responses

200 Transaction estimate

Transaction estimate

status integer
transaction object

Estimated transaction breakdown with products, taxes, shipping, totals, and available payment methods.

400 Validation or business-logic error.
401 Missing or invalid API key
/transactions/estimate
1const response = await fetch("https://api.tamio.com/v2/transactions/estimate", {
2 method: "POST",
3 headers: {
4 "Authorization": "Bearer YOUR_API_KEY",
5 "Content-Type": "application/json"
6 },
7 body: JSON.stringify({
8 "estimates": true,
9 "currency": "EUR",
10 "affiliate": "d4e5f6a7-b8c9-0123-defg-456789012345",
11 "no_discounts": false,
12 "no_payment_validation": false,
13 "coupons": [
14 "SAVE20"
15 ],
16 "products": [
17 {
18 "id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
19 "quantity": 2,
20 "price": 2500,
21 "name": "Premium Widget",
22 "variant": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
23 "pack": "c3d4e5f6-a7b8-9012-cdef-123456789012"
24 }
25 ],
26 "customer": {
27 "id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
28 "billing_address_id": "966a8470-8250-45d7-9ae7-aeaeffc30f28",
29 "shipping_address_id": "ad5701b5-5470-44a3-9a56-af458f24f6b3",
30 "same_shipping_address": false,
31 "billing_information": {
32 "country": "de",
33 "address": "Awesome Street 24",
34 "city": "Frankfurt",
35 "postcode": "60311",
36 "state": null,
37 "name": "John",
38 "last_name": "Doe"
39 },
40 "shipping_information": {
41 "country": "de",
42 "address": "Shipping Street 5",
43 "city": "Frankfurt",
44 "postcode": "60311",
45 "state": null,
46 "name": "John",
47 "last_name": "Doe"
48 }
49 },
50 "new_customer": {
51 "country": "de",
52 "same_shipping_address": false,
53 "billing_information": {
54 "country": "de",
55 "address": "Awesome Street 24",
56 "city": "Frankfurt",
57 "postcode": "60311",
58 "state": null
59 },
60 "shipping_information": {
61 "country": "de",
62 "address": "Shipping Street 5",
63 "city": "Frankfurt",
64 "postcode": "60311",
65 "state": null
66 }
67 }
68 })
69});
70const data = await response.json();
Responses
{
  "status": 200,
  "transaction": {}
}