# Calculate product price

This method allows merchants to calculate an estimated product price for a specific location.
<blockquote>
<p>Calculated prices returned by this endpoint are estimates. The final charged amount may differ at the time of billing due to product updates, tax changes, or other configuration changes.</p>
</blockquote>

Endpoint: POST /products/calculatePrice
Version: 1.0.0
Security: merchant, signature

## Header parameters:

  - `merchant` (string, required)

  - `signature` (string, required)

## Request fields (application/json):

  - `product_id` (string, required)
    Unique product identifier.
    Example: 83b19018-cbc4-45f0-899a-dda84fd2705e

  - `currency` (string)
    Three-letter ISO-4217 currency code of the product price currency.
    Example: USD

  - `location` (object, required)
    Information about the cardholder's location, specified as either a country code or an IP address.

  - `location.country` (string, required)
    Cardholder's ISO 3166-1 alpha-3 country code.
    Example: USA

  - `location.ip_address` (string, required)
    Public IP address of the cardholder, both IPv4 and IPv6 are supported.
    Example: 127.0.0.1

## Response 200 fields (application/json):

  - `product_id` (string, required)
    Unique product identifier.

  - `price_id` (string, required)
    Unique product price identifier.

  - `currency` (string, required)
    Three-letter ISO-4217 currency code of the product price currency.

  - `total_amount` (integer, required)
    Payment total amount.

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

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

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

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

  - `tax.profile_id` (string, required)
    Tax profile identifier.

  - `tax.rate_id` (string, required)
    Tax rate identifier.

  - `tax.rate` (number, required)
    Tax rate.

  - `tax.is_included` (boolean, required)
    Indicates the tax type:
- `true` - tax included
- `false` - tax excluded

  - `recurring` (object)
    Recurring price breakdown.
Required for the recurring product type. It is not returned when the product type is one_time.

  - `recurring.total_amount` (integer, required)
    Payment total amount.

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

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

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

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

  - `recurring.tax.rate` (number, required)
    Tax rate.

  - `recurring.tax.is_included` (boolean, required)
    Indicates the tax type:
- `true` - tax included
- `false` - tax excluded

## Response 400 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: 2.01

  - `error.message` (string, required)
    Error message.
    Example: Validation error

## Response 401 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating the specific authorization failure.
    Example: 1.01

  - `error.message` (string, required)
    Descriptive message providing more details about the authorization failure.
    Example: Authorization failed

## Response 403 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating that access to the service is denied.
    Example: 1.02

  - `error.message` (string, required)
    Message informing that the service is not allowed for the account.
    Example: Access denied

## Response 404 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code.
    Example: 2.01

  - `error.message` (string, required)
    Error message.
    Example: {entityName} not found with id: {entityId}

## Response 422 fields (application/json):

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Error code indicating that while the request is well-formed, it cannot be processed due to conflicting or incorrect data.
    Example: 2.01

  - `error.message` (string, required)
    Descriptive message providing more details about the processing failure.
    Example: Unprocessable entity

