Building an E-commerce Website With ExpressionEngine, Part 3
Tags: expressionengine, eecms, ecommerce
Published: 2022-06-10 14:07:39

---
title: Building an E-commerce Website With ExpressionEngine, Part 3
series: Building an E-commerce Website With ExpressionEngine
published: true
published: true
date: 2022-06-10 10:04:00 UTC
tags: ExpressionEngine,eecms,ecommerce
canonical_url: https://u.expressionengine.com/course/building-an-e-commerce-website-with-expressionengine/building-an-e-commerce-website-with-expressionengine-part-3
cover_image: https://u.expressionengine.com/asset/article-images/building-ecommerce-with-expression-engine.jpg
---

# Part 3: Shipping / Tax / Payments

## 3a) Shipping

{% embed https://player.vimeo.com/video/631318531?h=c84767280b&amp;badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479 %}

Within CartThrob, navigate to **Shipping**. There’s several plugins to choose from; for this example I’m using **By weight - Threshold**. The settings are self-explanatory. The shipping plugin uses a tiered system so any order weight total of up to 5 lbs will match the first row, resulting in a shipping charge of $8, and so on.

![Shipping Plugin](https://creativearc.com/images/uploads/blog/5-a-shipping-by-weight-thresh.jpg)

For the last row I have a really high threshold of 500, so anything after 15 lbs will just cost $500.

Click **Submit** to save the plugin selection and its values.

On the frontend we’ll test the Yoda Bowling Ball. The cart tallies shipping as $13, because the **By Weight - Threshold** plugin matches the order total of 10 lbs. (Totals up to and matching 10 lbs will match the $13 calculation.)

![Shipping frontend test](https://creativearc.com/images/uploads/blog/5-b-shipping-by-weight-frontend.jpg)

## 3b) Taxes

{% embed https://player.vimeo.com/video/631318859?h=1fc3eb9bae&amp;badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479 %}

Within CartThrob, navigate to **Taxes**. I’ll leave “Calculate taxes using shipping address” as **No** , since I want to calculate by billing address.

For the Tax Plugin, we’ll use “Tax by Location - Percentage”. Each row represents a tax rate, region, and zip. CartThrob will use these values to match to the customer’s billing address to tally the proper tax rate. For this example, I’ll use 7.7%.

Like shipping, I added a second row with a high value to catch all other situations. Anything that doesn’t match the first row would be match by this global rule which is 20%. We could put in more rows and more zip codes and regions, but we’ll leave this simple for now!

![Tax plugin](https://creativearc.com/images/uploads/blog/5-c-tax-by-location.jpg)

Click **Submit**. Taxes are done! Add an item to your cart on the frontend and give it a try!

## 3c) Payments

{% embed https://player.vimeo.com/video/631319089?h=7201b093d5&amp;badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479 %}

Now that our shipping and tax are behaving, I’ll look at the payment gateways. Within CartThrob, navigate to **Payments** , and focus on the first menu, **Choose your primary payment gateway**. I’m using the Stripe plugin developer mode. (Stripe and Authorize are the gateways I use the most. I prefer Stripe because it’s just easier to test compared to Authorize or Paypal)

![Payment Gateway selection](https://creativearc.com/images/uploads/blog/5-d-gateway-select.jpg)

You can choose the various gateways that CartThrob has available. The first select menu is showing you what gateway is chosen, the second is giving you the chance to edit that gateway’s settings. (the settings will appear below, without a page reload, upon making this selection)

Below is where I have my test modes selected, and I have my **Test Mode API key (secret)**, and **Test Mode API key (publishable)** that I configured within my Stripe account.

![Payment Gateway config](https://creativearc.com/images/uploads/blog/5-e-gateway-config.jpg)

Everything else I can leave as-is. Click **Submit** to save the changes.

## 3d) Submit an order on the frontend

Now we can actually complete an order! At the bottom of my checkout page, I’m using the default Stripe test number, 4242 4242 4242 4242, providing any CVV code and a valid expiration date.

![Submit test payment](https://creativearc.com/images/uploads/blog/5-f-test-order.jpg)

Our test order was hopefully successful! Head over to Stripe (or your gateway), and view the appropriate Dashboard for test orders to confirm.

**Have questions or comments about this course?** Be sure to join the discussion and post in the [ExpressionEngine Forums](https://expressionengine.com/forums/topic/253239/building-an-e-commerce-website-with-expressionengine)!

 -- 

Originally published by [Paul Larson](https://u.expressionengine.com/author/paul-larson) at [u.expressionengine.com](https://u.expressionengine.com//article/building-an-e-commerce-website-with-expressionengine-part-3)