# Calculated tax

Webhooks provide merchants with instant notifications when the Solidgate tax solution calculates the tax amount of the transaction. These notifications allow merchants to notify users about paid taxes or to save tax information in real-time on the merchant’s side.

It delivers key tax details, such as calculated amounts and tax type breakdowns, ensuring accurate and automated tax application for transactions.


  Duplicate webhook events can occur. Implement idempotency on your end to avoid processing the same event twice.

Endpoint: POST CalculatedTax
Version: 1.0.0
Security: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "wh_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

  - `solidgate-event-id` (string, required)
    Unique event identifier.
    Example: "e1765cf7-70f7-4e56-8fb2-bd88744a94d1"

  - `solidgate-event-created-at` (string, required)
    Event creation time in ISO 8601 format with milliseconds.
    Example: "2025-06-05T12:34:56.789Z"

  - `solidgate-event-type` (string, required)
    Event type, indicating the specific event that occurred.
    Example: "taxer.tax.calculated"

## Request fields (application/json):

  - `order_id` (string)
    Unique order identifier, which can be used to find the payment.


  For the first payment, the identifier is defined by the merchant.
  For recurring subscription-based payments, it is generated by the Solidgate subscription service.
    Example: "923bb4e6-4a5f-41ec-81fb-28eb8a152e55"

  - `product_id` (string)
    Unique product identifier.


  Can be absent for payments without product_id.

  - `total_amount` (integer)
    Payment total amount in the smallest currency unit.


  It is negative if the action is not sale, chargeback_reversed, or rdr_reversed.

  - `currency` (string)
    Currency used to initiate the payment by the merchant. Three-letter ISO-4217 currency code.

  - `action` (string)
    Action of a transaction involving tax calculation.


  For all action types except sale, chargeback_reversed, and rdr_reversed, the calculation amounts will be negative.
    Enum: "sale", "refund", "chargeback", "rdr", "chargeback_reversed", "rdr_reversed", "paypal_dispute"

  - `payment_category` (string)
    Payment method used to process the payment.
    Enum: "card-payment", "apm-payment"

  - `transaction_date` (string)
    Datetime when the payment was created.

  - `tax_included` (boolean)
    Indicates type of the tax.

  - `tax` (object)
    Information related to the tax calculation.


  It is absent if the tax calculation fails.

  - `tax.tax_amount` (integer)
    Amount of the tax calculated.


  It is negative if the action is not sale, chargeback_reversed, or rdr_reversed.

  - `tax.taxable_amount` (integer)
    Taxable amount of the transaction before tax.


  It is negative if the action is not sale, chargeback_reversed, or rdr_reversed.

  - `tax.rate` (number)
    Tax rate used for the tax calculation.

  - `tax.currency` (string)
    Currency in which the tax was calculated. Three-letter ISO-4217 currency code.


  Some locations only accept tax in their native currency.

  - `tax.location` (object)
    Information about the cardholder's location.

  - `tax.location.country` (string)
    Country code where the tax applies, specified using an ISO 3166-1 alpha-3 code.

  - `tax.location.state` (string)
    Name of the tax jurisdiction state.


  It is filled if the country is the USA. Otherwise, it is absent.

  - `tax.legal_entity` (string)
    Name of the Legal entity for tax submission.

  - `no_tax_reason` (string)
    Reason for no tax calculated.


  It is absent if the tax calculation is successful.


## Response 2XX fields
