Merx

Tax

How a tax amount is rendered by the API: the amount and the rate it came from.

Fields

The following fields are available in the Tax model and can be fetched with the select parameter.

Name Return type
rate string
rateRaw null or float
price null or string
priceRaw null or float

Views

The following fields are available in the Tax model and can be fetched with the view parameter.

Name Fields
compact rate, price
formatted rate, price
raw rateRaw, priceRaw
default rate, rateRaw, price, priceRaw

Type

Wagnerwagner\Merx\Tax

Examples

The Tax model of an example cart, in each of its views.

View: default
{
    "price": "€14.35",
    "priceRaw": 14.3499999999999996447286321199499070644378662109375,
    "rate": "19%",
    "rateRaw": 0.190000000000000002220446049250313080847263336181640625
}
View: compact
{
    "price": "€14.35",
    "rate": "19%"
}
View: formatted
{
    "price": "€14.35",
    "rate": "19%"
}
View: raw
{
    "priceRaw": 14.3499999999999996447286321199499070644378662109375,
    "rateRaw": 0.190000000000000002220446049250313080847263336181640625
}