---
title: "Behind the Scenes - A Glimpse into Tax Calculations"
description: "Etsy calculates marketplace tax by calling Vertex's tax engine: a Quotation Request SOAP call when items are added to cart, and DistributeTaxRequest calls at order creation, cancellation and refund so Vertex's tax journal holds a complete record for reporting and remittance."
url: "https://swe.quest/articles/behind-the-scenes-a-glimpse-into-tax-calculations-e407cbdd9218b08a"
canonical: "https://www.etsy.com/codeascraft/behind-the-scenes---a-glimpse-to-tax-calculations"
source: "Etsy Code as Craft"
published: "2025-03-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 4
tags: ["ecommerce","scalability","load-balancing","system-design"]
---

# Behind the Scenes - A Glimpse into Tax Calculations

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2025-03-29, 4 min read, Case study. Original: [https://www.etsy.com/codeascraft/behind-the-scenes---a-glimpse-to-tax-calculations](https://www.etsy.com/codeascraft/behind-the-scenes---a-glimpse-to-tax-calculations)

## Summary

Etsy calculates marketplace tax by calling Vertex's tax engine: a Quotation Request SOAP call when items are added to cart, and DistributeTaxRequest calls at order creation, cancellation and refund so Vertex's tax journal holds a complete record for reporting and remittance. Product taxonomy had to be mapped to Vertex rule drivers. To protect checkout latency as traffic grew, quotation and distribution calls were split onto separate Vertex instances, which kept report generation from interfering with carts and allowed horizontal scaling via modulo routing on cart\_id and receipt\_id. Before major launches, shadow requests are ramped up to load-test Vertex without applying the results to buyers' carts.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- SOAP APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))
- load balancing basics ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))

## Keywords

Vertex, Etsy, DistributeTaxRequest, Quotation Request API, shadow traffic

## Related posts

- [How Shopify Dynamically Routes Storefront Traffic](https://swe.quest/articles/how-shopify-dynamically-routes-storefront-traffic-4416894393bf5cd2.md): Shopify Engineering · 2021-04-09 · Medium · 9 min read · Load balancing, Deployment, Refactoring & migrations, Configuration management, Resilience
  Shopify shifted storefront traffic from its legacy Rails storefront to a rewritten renderer using a rule-based routing system in nginx/OpenResty Lua load balancers, with rules stored as JSON in a control plane and managed via the spy chatbot so changes skip CI and deploys.
- [Scaling Personalized Marketing for Multi-Tenant Commerce Platforms](https://swe.quest/articles/scaling-personalized-marketing-for-multi-tenant-commerce-platforms-6d28542d3c7944c7.md): Instacart Tech · 2026-05-14 · Medium · 12 min read · Multi-tenancy, Communications, Stream processing, System design, E-commerce
  Instacart extended its Marketplace marketing automation to 350+ Storefront Pro white-label retailers by giving each retailer its own isolated workspace in a third-party provider, fronted by Instacart-built React tooling.
- [Beyond rate limits: scaling access to Codex and Sora](https://swe.quest/articles/beyond-rate-limits-scaling-access-to-codex-and-sora-f19f4998580ba788.md): OpenAI · 2026-02-13 · Medium · 6 min read · Payments & fintech, System design, Consistency models, Event-driven architecture, Distributed systems
  OpenAI replaced hard rate-limit stops for Codex and Sora with a real-time access engine that treats rate limits, free tiers, credits, promotions and enterprise entitlements as layers in a single decision waterfall evaluated per request.
- [How Etsy gets its mobile apps ready for peak traffic](https://swe.quest/articles/how-etsy-gets-its-mobile-apps-ready-for-peak-traffic-583aefb86e543392.md): Sentry · 2026-09-30 · Medium · 10 min read · Mobile, Observability, Deployment, Incidents & postmortems, E-commerce
  Because mobile apps can't be reverted once a binary ships, Etsy treats holiday peak prep as an October decision about visibility, routing and mitigation rather than capacity.
- [How we prepare Shopify for BFCM](https://swe.quest/articles/how-we-prepare-shopify-for-bfcm-4b4a641105e86a3e.md): Shopify Engineering · 2025-11-20 · Medium · 8 min read · Chaos engineering, Capacity planning, Scaling, SRE, E-commerce
  Shopify readies for Black Friday Cyber Monday with a year-long program that runs from March to October.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
