Payment Amounts

The service supports both tax inclusive and exclusive pricing. You use a different field for each and the service will return values for both in the JSON that is attached to the response from the API. For more information, see the Pricing Options sections in this document.

You can include amounts on the transaction line item level.

Fields

The following table summarizes the main fields that can be used to specify the amount:

FieldDescription
amountPre-tax amount. You use this field for tax exclusive pricing. The service calculates the tax on this amount and returns the tax_amount and total_amount fields.
total_amountPost-tax amount. You use this field for tax inclusive pricing. Taxamo returns the amount and tax_amount fields.

Pricing Options

The service supports two pricing options:

  • Tax exclusive pricing
  • Tax inclusive pricing

Tax Exclusive Pricing

If the prices that you list on your store do not include tax, you can send the amount to the service. You use the amount field to do this in your requests.

The service uses this field to calculate the tax and returns the following fields:

  • tax_amount: The amount of tax.
  • total_amount: The total amount including tax. This is the sum of the pre-tax amount (amount field) and the tax (tax_amount field).

For example, this request specifies an amount of 100 that does not include tax:

{
				"custom_id": "line_2",
				"amount": 100,
				"ship_from_address": {"country_code": "PL"},
				"product_class": "P",
				
				"description": "Goods #2",				
				"parcel_reference": "3897329872423",
				"carrier_id": "DHL",
        "product_cn_code": "8504 31 80 15",
                
    }]

This example shows the values returned by the service for this request. Note the tax amount is 10:

"transaction_lines": [
            {
                "description": "Smoked herrings",
                "reverse_charge": false,
                "amount": 100,
                "tax_rule_applied": "physical-tax",
                "taxes": [
                    {
                        "rate": 10,
                        "tax_name": "European VAT",
                        "rate_type": "Reduced",
                        "amount_fraction_taxable": 1,
                        "tax_base_amount": 100
                    }
                ],
                "tax_amount": 10,

The total amount is at the end of the JSON:

"total_amount": 110,

Tax Inclusive Pricing

If the prices that you list on your store include tax, you can use the total_amount field to include this in your requests.

The service returns the following fields:

  • amount: The amount excluding the tax.
  • tax_amount: The amount of tax.

For example, this request specifies a total amount of 100 that includes tax:

{
				"custom_id": "line_2",
				"total_amount": 100,
				"ship_from_address": {"country_code": "PL"},
				"product_class": "P",
				
				"description": "Goods #2",				
				"parcel_reference": "3897329872423",
				"carrier_id": "DHL",
        "product_cn_code": "8504 31 80 15",
        
    }]