Accessing regulatory fee information

Learn how to access regulatory fee information.

When regulatory fees are applied to products in a transaction, you can access both aggregated and product-level information on these fees. This allows you to provide customers transparency into the transaction's fee types, their costs, and which products the fees apply to.

Getting the aggregated fee amounts

For transactions that have one or more assessed regulatory fees, you can find their aggregated amount in the totalFees attribute. This attribute is contained in the Checkout, Order, and Invoice resources. The totalFees value does not include taxes assessed on a transaction's regulatory fees. Instead, fee taxes are rolled up into the totalTax value.

{
    "id": "4f434b0f-b3b6-4698-8754-becb034f1abd",
    ...
    "totalAmount": 44.09,
    "subtotal": 41.0,
    "totalFees": 16.0,
    "totalTax": 3.09,
    ...
    "items": [
        {
            "id": "f8c25de3-ddba-4a41-9946-3db9801bb04f",
            ...
            "amount": 20.0,
            "quantity": 2,
            ...
            "fees": {
                ...
                "amount": 16.0,
                "taxAmount": 1.2
            }
        }
    ],
    ...
}

For each line item with applied regulatory fees, we return fees.amount. This represents the amount of fees applied to the total quantity of that particular line item. For example, if the line item consists of two mobile phones, fees.amount is the aggregated fee amount applied to both devices. The fees.taxAmount represents taxes assessed on these line item fees.

Getting information on specific fees

If you associate regulatory fees with a SKU, and then add that SKU to a checkout, we return information on each applied fee. In Checkouts, Invoices, and Orders, this information is contained within items[].fees.details[].

The data in this array is useful when multiple regulatory fees are associated with a SKU. Each element in the array provides a fee's unique id, the fee type, the perUnitAmount, and the amount. The following table shows how some of these attributes are mapped within the Fee, Checkout, and Order resources.

Fee

Checkout

Order

id

items[].fees.details[].id

items[].fees.details[].id

type

items[].fees.details[].type

items[].fees.details[].type

amount

items[].fees.details[].perUnitAmount

items[].fees.details[].perUnitAmount

The same relationship exists between Fees and Invoices:

Fee

Invoice

id

items[].fees.details[].id

type

items[].fees.details[].type

amount

items[].fees.details[].perUnitAmount

The details[].amount is determined by multiplying details[].perUnitAmount by the quantity of that line item.

In the following example, a physical SKU is created and then associated with two separate regulatory fees. The first is a battery type fee with an amount of 5.0. The second is a WEEE type fee with an amount of 3.0.

The SKU is then attached to a checkout. Since there are now two regulatory fees associated with this checkout's sole line item, details[] contains two elements. Each element maps to one of the applied regulatory fees. When the checkout is converted to an order, the returned fees data remains the same.

You can use this information to provide customers detailed regulatory fee information. In the example below, you could inform customers that both a battery and WEEE regulatory fee are applied to the product and provide a cost-breakdown for each.

{
    "id": "8639a055-ce57-4e1d-afdd-bf83769c3d21",
    "createdTime": "2021-04-08T15:36:04Z",
    ...
    "physical": true
}

Last updated