> ## Documentation Index
> Fetch the complete documentation index at: https://developer.zamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculations and Transactions

> The bread-and-butter of Zamp's APIs. Making calculations and posting to Zamp.

# Overview

When building an integration to Zamp, this is the core workflow a business using your platform needs to be able to accomplish.

## Endpoints Used

```text theme={null}
POST /calculations
POST /transactions
```

## Recommended Workflow

<Steps>
  <Step title="Building the Transaction Object ">
    When a customer generates a Sales Order, populate the **Transaction Object** with transaction information.
  </Step>

  <Step title="Calculating Taxes">
    When the Sales Order is saved, make a `POST` request to the `/calculations` endpoint.
  </Step>

  <Step title="Retaining the Calculated Tax">
    The calculations endpoint will return a detailed breakdown of the taxes due (`taxDue`) for the transaction you have provided. Your system should retain the taxes due as this will be the liability owed for the transaction.
  </Step>

  <Step title="Posting the Transaction to Zamp">
    Provided that the transaction is finalized and the invoice is ready to be saved, make a `POST` request to the `/transactions` endpoint with the Zamp returned tax due (from step 3) in the `taxCollected` field.
  </Step>
</Steps>
