Configuring Shipping and Other Charges

Read about how to configure shipping and other charges like insurance in your requests.

You may want to create a method that allows buyers to include shipping or other charges in their transactions. These charges are maintained for each transaction line.

Tax Calculation

Tax is calculated on these charges at the standard rate for the country that is specified in the ship_to_address.country_code field.

For example, if you add goods (that are denoted by the product_class=P field), which do not have tax applied (for educational books for example), the standard rate is applied for the shipping charges denoted by the product_class=S field. In the examples below, the standard rate for France is applied.

In other words, if the transaction includes a standard and lower tax rate for two separate items, the higher (standard) rate is applied to the charges.

For example, consider a transaction made up of the following items:

Item

Charge

Tax Rate

Item 1

10.00

20%

Item 2

20.00

5%

Total

30.00

20%

This results in the following charges:

Charges

Tax Rate

Tax Amount for Charges

Shipping Total

30.00

20%

6.00

36.00

Adding Charges to a Request

To include a shipping charge for a transaction line, you add the product_class=S field and the rest of the details.

If you do use product_class=S, you must ensure that there is also an equivalent line for physical goods (product_class=P) that shares at least one of the following. Both lines must be included in the same Transaction object in the same request.

  • The same consignment ID is used by both transaction lines. You can use the consignment_id field to specify an ID that groups transaction lines that belong to the same consignment together.
  • The same ship from information is used in each line.

The following example shows you can model a shipping charge by using the same ship_from_address:

{
   "transaction":{
      "currency_code":"EUR",
      "buyer_name":"Eric Papin",
      "ship_to_address":{
         "address_detail":"Chateuax 12",
         "building_number":"55",
         "street_name":"Rue du Saint-Germain",
         "city":"Paris",
         "postal_code":"75008 ",
         "country_code":"FR"
      },
      "transaction_lines":[
         {
            "product_class":"S",
            "quantity":1,
            "description":"Shipping Charges",
            "amount":"5.95",
            "custom_id":"test_ID_4",
            "import_address":{
               "country_code":"FR"
            },
            "ship_from_address":{
               "building_number":"12",
               "street_name":"Wessex End Street",
               "city":"London",
               "postal_code":"SW1A 2AA",
               "country_code":"GB"
            },
           [{
               "product_class":"P",
               "quantity":7,
               "description":"UnSmoked herrings",
               "amount":"39.95",
               "custom_id":"test_ID_4",
               "import_address":{
                  "country_code":"FR"
               },
               "ship_from_address":{
                  "building_number":"12",
                  "street_name":"Wessex End Street",
                  "city":"London",
                  "postal_code":"SW1A 2AA",
                  "country_code":"GB"
               }]

The following example shows you can model a shipping charge by using the same consignment_id:

{
"transaction": {
    "currency_code": "EUR",
    "buyer_name": "Eric Papin",
    "ship_to_address": {
      "address_detail": "Chateuax 12",
      "building_number": "55",
      "street_name": "Rue du Saint-Germain",
      "city": "Paris",
      "postal_code": "75008 ",
      "country_code": "FR"
    },
    "transaction_lines": [
      {
        "product_class": "S",
        "quantity": 1,
        "description": "Shipping Charges",
        "amount": "5.95",
        "custom_id": "test_ID_4",
        "consignment_id": "001",
        "import_address":{
            "country_code": "FR"
        },
        "ship_from_address": {
            "building_number": "12",
            "street_name": "Wessex End Street",
            "city": "London",
            "postal_code": "SW1A 2AA",
            "country_code": "GB"
        },
        [{
            "product_class":"P",
            "quantity":7,
            "description":"UnSmoked herrings",
            "amount":"39.95",
            "custom_id":"test_ID_4",
            "consignment_id": "001",
            "import_address":{
                "country_code":"FR"
               },
               "ship_from_address":{
                  "building_number":"12",
                  "street_name":"Wessex End Street",
                  "city":"London",
                  "postal_code":"SW1A 2AA",
                  "country_code":"GB"
               }]


If you need further help, contact support at https://www.vertexinc.com/en-gb/support-services/taxamo-customer-support.

Did this page help you?