1. Home
  2. Payment Gateway Based Fees and Discounts for WooCommerce
  3. Payment Gateway Settings – Cash on delivery

Payment Gateway Settings – Cash on delivery

The default WooCommerce payment gateways are Direct Bank Transfer, Cheque Payments, Cash on Delivery and PayPal. You can also add other payment gateways using plugins which can be used as payment options at Checkout. All the selected payment gateways along with its settings will get listed once you activate Payment Gateway Based Fees and Discounts for WooCommerce Pro plugin.

How does this work?

When you install and activate the plugin, default payment gateways will be displayed as pages under Payment Gateway Based Fees and Discounts tab. The settings for all payment gateways are the same which are displayed under each of these payment gateway pages.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

All payment gateway pages appear

We will discuss Cash on delivery payment gateway option in this post. All other payment gateway settings work the same way as Cash on delivery option discussed in this post.

So let us understand in detail how you can add settings for Cash on delivery.

Go to WooCommerce -> Settings -> Payment Gateway Based Fees and Discounts -> Cash on delivery page.

Payment Gateway Settings - Cash on delivery - Tyche Softwares DocumentationPayment Gateway Settings - Cash on delivery - Tyche Softwares DocumentationPayment Gateway Settings - Cash on delivery - Tyche Softwares DocumentationPayment Gateway Settings - Cash on delivery - Tyche Softwares DocumentationPayment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Default Cash on delivery page

There are various settings on this page which we will discuss in detail. There are 5 sections on this page:

  1. Cash on delivery
  2. Fees
  3. Additional Fees (Optional)
  4. General Options
  5. Reset Settings

Cash on delivery

This setting allows you to enable the Cash on delivery fees/discounts for your WooCommerce store.

“Cash on delivery” fees and discounts

You can enable the Cash on delivery option by ticking the Enable checkbox of “Cash on delivery” fees and discounts setting.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Enabling the setting

This will display the added Cash on delivery fee or discount value on the front end. By default, this option is disabled.

Fee

This section allows you to add fees or discounts and set options when it can or cannot be displayed on the front end.

Fee title

Here you can set the title for fee/discount you want to display on the front end for Cash on delivery payment option. This is blank by default and you can add any title here to represent Cash on delivery fee on the front end.

Say you add title as COD Fee, then this will appear on the Cart and Checkout page.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding Fee title 

So on Checkout, this title will get displayed with the amount when Cash on Delivery payment gateway is selected.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Fee title on Checkout page

*** These fees are displayed on both Cart and Checkout pages, but we will only discuss Checkout page screenshot in our examples for all other settings in this post.

Fee type

Fee type will allow you to either display the Cash on delivery fee/discount in Percentage form or Fixed amount.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Fee type dropdown

If you select Fixed, the amount that you add in the Fee value field will be displayed as it is on the front end whereas if you select Percentage, the value you add in the Fee value field will be considered as percentage.

Example – If you select Fixed option and add value as 10, then COD Fee will be shown as $10 on the front end.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding fixed amount as $10

So when you check the COD Fee on Checkout, it will display as $10.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD fee is $10

Now when you select Percentage option and add value as 10 then it will consider 10% of the total COD Fee and display it on the front end.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding % as Fee type

So on the front end, the COD fee will be 10% of the total order amount which includes the shipping charges if any.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

10% of the total amount 

Hence, 10% of the total order amount ($20) is $2.00. So COD Fee is displayed as $2.00 on the Checkout page. By default, this option is set to Fixed.

Fee value

In this setting, you add the amount you want to display as Cash on delivery fee on the Cart and Checkout page. This value is applicable for Fixed and Percentage type both. By default, this option is set to 0. If you want to add a discount, then add a negative sign (-) and the value you add in Fee value field will be taken as a discount amount on the front end. For displaying fees, the Fee value amount that you add will be considered. eg. If Fee value is set as $20, then COD Fee will be displayed as $20 on the front end.

Example – Say you want to give a discount of $10, so in the Fee value field you will add COD Discount as -10.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding negative sign for COD Discount 

Therefore on the Checkout page, it will show total amount of the order with discount of $10.

For instance, the customer’s product cost is $40 and the COD discount is $10.

Thus, the total price will be $40 – $10 = $30.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Discount of $10 added

Minimum fee value

This setting allows you to add a minimum value for the payment gateway fee/discount. The fee you add in the Fee value field should not be less than the value you add in the Minimum fee value field. If so, then value of Minimum fee value field will be considered.

Example – If you add Minimum fee value as $15 and add Fee value for Cash on delivery as $10, then $15 will be displayed on the front end as that is the minimum amount of the fee to be charged.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Minimum fee value set to $15

So COD Fee on Checkout displayed $15 instead of $10.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee displayed as $15

By default, it is set to 0. If you want to add a discount, then add a negative sign (-) to the value in this field.

Maximum fee value

This setting allows you to add a maximum value for fee/discount for Cash on delivery payment option. This means the fee value you add should not exceed the amount you add in Maximum fee value setting. If so, amount of Maximum fee value field will be considered.

Example – If you add Fee value for Cash on delivery option as $40 but if Maximum fee value is $30, then the Cash on delivery fee on the front end will display $30 and not $40 because maximum fee value will always be considered.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding Maximum fee value

So the Checkout page will show the COD Fee as $30 instead of $40.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee displayed as $30

By default, this option is set to 0 and hence not considered. If you want to add discount, then add a negative sign (-) to the value in Maximum fee value field.

Coupons rule

This setting has 3 options namely Disabled, Apply fees only if no coupons were applied and Apply fees only if any coupons were applied.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

3 options for coupons rule

By default, this option is set to Disabled which means this option is ignored. Now when you select Apply fees only if no coupons were applied option, then Cash on delivery fee will be applicable only when no coupons are used. If you have used a coupon code in the order, then this fee will not be added to the order.

Similarly, when you select Apply fees only if any coupons were applied option then Cash on delivery fee will be applicable only if a coupon is applied to the order.

Example –  Select Apply fees only if no coupons were applied option and add a Coupon – 5rtygh88 during Checkout that gives you $10 discount. So the total amount of the order will be $80 because $10 coupon discount will get added to cart total of $90 but COD Fee will not be applied.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not applied

Now select Apply fees only if any coupons were applied option and add the coupon code – 5rtygh88 during Checkout. This will display the Coupon discount as well as COD Fee to the order total.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee applied when coupon was applied

Hence, the order total is displayed with Coupon discount of $10 and COD Fee of $20 on the Checkout page.

Customer countries

This option allows you to select the countries for which you want to add the Cash on delivery fee/discount. Fee/Discount will only apply if the customer’s billing country is added in Countries to include list. Whereas fees/discount will not apply to the countires which are added to the Countries to exclude list.

Select the countires from the dropdown in Countries to include and Countries to exclude list options. You can add multiple countires here.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding countries in the list

Example – Say you select countries like South America, Guinea and India in Countries to include list, then COD Fee will be applicable to these countries.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee applied for India

So a COD Fee of $20 was applied on the cart total for the order placed from India.

Now say you add countries like China, Japan and South Africa in the Countries to exclude list. Then the COD Fee will not be applied to the order total.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not applied

Hence COD Fee of $20 was not applied to the order which was placed from South Africa. By default, this option is blank.

Customer states

You can select one or more than one states for States to include and States to exclude list in Customer states setting. You need to add state codes sperated by a comma for multiple selections.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Customer states setting

Cash on delivery Fees/Discount will apply to the order if customer’s billing state is included in the States to include list and it will not be applicable if customer’s billing state is included in the States to exclude list.

Example – Say you add Maharashtra (MH) and Delhi (DL) states of India in States to include input field and add Limpopo (LP) and Gauteng (GT) states of South Africa country in State to exclude input field.

Now when a customer from Maharashtra places an order, the order total will include COD Fee of $20.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee applied for Maharashtra state

If a customer from Limpopo state of South Africa places an order, the order total will not include COD Fee.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not applied for Limpopo

By default, these input fields are blank and hence not considered.

Product categories

In this setting you will be able to add product categories to the Categories to include and Categories to exclude lists. When a product of a product category which is also added to the Categories to include list is selected by the customer, then the COD Fee will be applicable at Checkout. Whereas if product of product category which is added to the Categories to exclude list is selected by the customer then COD Fee will not be applied.

Example – Say you add product categories – Adventure and Art in Categories to include field and add product categories – Books and Clothing in Categories to exclude field.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Adding product categories in the input fields

So when customer places order for product Wall Mount from Art category, the COD Fee will be applicable on the Checkout page.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee is applicable 

Now if customer adds product Bag & Heels from Clothing category, COD Fee is not applicable.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee is not applicable

By default, this option is blank and is not considered.

Additional Fee (Optional)

All settings under Additional Fee section are optional and works the same way as Fee section, except Fee title option.

Fee title – If you want to add Additional Fee to the order, the title of this fee should be different from the Fee title set in the Fee section. When different Fee titles are added in the backend, both fees will get displayed on separate lines on the Checkout page. If these titles are same then both will be merged and displayed on a single line.

Example – Say you set Fee title as COD Fee of value $20 under Fee section and set Fee title as Additional Fee of value $10 under Additional Fee section, then these will be displayed on separate lines in the front end.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Both fees added separately

Now if you have same Fee titles for both Fees and Additional Fees (Optional) section, then these will be merged together and displayed on the same line.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Fees displayed together on single line

Thus COD Fee of $20 and Additional Fee of $10, both were added and displayed as a single COD Fee amount of $30 on the front end.

All other settings under Additional Fee (Optional) section like Fee type, Fee value, Minimum fee value, Maximum fee value, Coupons rule, Customer countries, Customer states and Product categories, work the same way as explained in the Fee section above.

General Options

Minimum cart amount

This option allows you to add a minimum cart amount required for applying Cash on delivery fee at Checkout. So if the cart total amount is less than the Minimum cart amount added, then Cash on delivery fee will be applied to that order otherwise wont.

Example – Say you set the Minimum cart amount as $30 to apply the COD Fee of $20.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Minimum cart amount added as $30

Therefore when the cart total is less than $30, then COD Fee will not be applied.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not applicable

Since the cart total is $25 which is less than $30, COD was not applied.

Now say the cart total is more than $30, then COD Fee of $20 will be applicable.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee is applied

By default, this option is 0 and when its 0, this setting is ignored.

Maximum cart amount

This setting will allow you to add a maximum cart amount required to charge a Cash on delivery fee to the order. If you set the Maximum cart amount as $100 and if the cart total is less than $100, COD Fee will be applicable otherwise not.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Maximum cart amount added as $100

Example – When Maximum cart amount is set to $100 and cart amount is less than this amount then COD Fee of $20 will be applied.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee is applied

Now when the cart amount exceeds $100, then COD Fee will not be applicable.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD is not applied

By default, this option is set to 0 and hence it is not considered.

Rounding

When you enable the Rounding setting, the Cash on delivery fee/discount value will be rounded up to the Rounding precision before adding it to the cart. Rounding precision here refers to the number of decimals.

So for instance, if the COD Fee is calculated as $20.239 and rounding precision is set to 2 then COD Fee will be displayed as $20.24 on the front end.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Enabling the setting

Example – Say you enable the Rounding setting and add Rounding precision as 2. The COD Fee is set to 5% of the cart total and you add product Beads Rakhi and Chocolate Cake to the cart. So 5% of $78 is $3.9.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee displayed as $3.90

Thus the COD Fee applied is rounded to 2 decimals and displayed as $3.90. This setting is disabled by default and Rounding precision is set to 0. The Rounding precision option works if you enable this option.

Taxes

There are 3 default WooCommerce Tax class options under Taxes setting – Standard rateReduced Rate and Zero Rate. The custom added tax classes under WooCommerce -> Settings -> Tax tab will also be shown here. This setting is disabled by default and you can enable it by ticking the Enable checkbox. Once you enable it, select one of the options from Tax class dropdown.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

3 options of Tax class

When you select option Standard rate which is set as 20% and have added COD Fee of $20 in the backend, the tax will be calculated on COD Fee which is 20% and added to the tax under WooCommerce settings.

Note – All the Tax rates which are considered in this setting are added in the backend under WooCommerce -> Settings -> Tax tab.

Therefore Standard Rate Tax is calculated as 20% x COD Fee ($20) + tax.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Tax added as per Standard rate option

Hence Tax of $13 is applied at checkout which is $4 (20% of COD Fee) + Tax ($9) = $13.

Now when you select Reduced Rate option then tax will be calculated as per the tax rate (%) set in the backend. It will be calculated on the COD Fee added and will be displayed on the front end.

Say Reduced Rate option is set to 10% and COD Fee is $20, then Reduced Rate tax of $2 will be applied at the Checkout.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Tax of $2 applied

Now when you enable this option in the Tax class dropdown and say Zero Rate tax is set as 5% in the backend, then the applicable tax will be 5% of COD Fee – $20, which will be applied to the total at Checkout.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Tax of $13 is added

Hence Zero Rate Tax of $1 which is 5% of COD Fee $20, is applied to the total amount. You can select options from the Tax class dropdown only if the you have enabled Taxes option.

Note – This setting will only work if you enable the tax calculation option under WooCommerce -> Settings -> General.

Exclude shipping

When you enable the Exclude shipping option, the shipping charges will not be included in calculating the Cash on delivery fee/discount. Hence the fee/discount will take into account only the total cart amount excluding shipping amount.

To enable this setting, tick the Exclude checkbox.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Enabling the setting

Example – Say you have set COD Fee of 5% on the order total but if you enable Exclude shipping setting, then 5% of only the cart total will be taken into account for calculating COD Fee.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee of $1 applicable

Hence COD Fee (5%) of $20 (Cart total) is $1. This means COD Fee calculation was done considering only the cart total of $20 excluding shipping charge of $5. By default, this option is disabled.

Note – This setting is applicable only for the Fee type of percentage and not for fixed type.

Add taxes

When you enable this option, taxes will be considered for calculating the Cash on delivery fee/discount. Add taxes setting is disabled by default. To enable it, tick the Add checkbox.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Enabling the setting

For instance, say you have COD Fee of $10 set in the backend and you enable the Add taxes option. The Checkout page will display COD Fee and taxes.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Tax is added on the Checkout page

This shows Tax of $5 got added additional to the COD Fee. Tax is calculated as per the tax rate% added in the backend (WooCommerce -> Settings -> Tax) which is set to 20% in this case. Hence 20% of cart total ($25) excluding COD Fee is $5. By default, this option is disabled.

Customer countries

This setting allows you to add countries to the Countries to include and Countries to exclude list which are considered for displaying Cash on delivery fee/discounts on the front end. This setting works the same as discussed in Fee and Additional Fee sections. But if you add the countries in this list then it is considered for both Cash on delivery fee as well as additional fee. If you wish to add countries individually for Fee and Additional Fee section then this setting should be avoided.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

You can add multiple countries in the input fields for Countries to include and Countries to exclude option which will be applicable for both fees.

Example – Select India in Countries to include field and South Africa in Countries to exclude field. Add COD fee as $20 and Additional fee as $10. So say customer from India places an order, then COD Fee as well as Additional fee will be displayed,

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee and Additional Fee both shown 

Now say customer from South Africa adds products to cart then COD fee and Additional fee both will not be displayed.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee and Additional fee not added

By default, this option is blank and not considered.

Product categories – Calculation type

You have Categories to include and Categories to exclude fields under Product categories – Calculation type setting. You can select product categories in Categories to include field to apply Cash on delivery fee/discount and add product categories in Categories to exclude fields to avoid displaying Cash on delivery fee/discount at the Checkout.

This setting works the same as discussed in Fee section. But here you need to select one of the 2 optionsFor all cart or Only for selected products.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Selecting option for both fields

Example – If you select For all cart option in Categories to include option, then COD Fee will be applied to all products in the cart.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee will be applied

Say you select Only for selected products option in Categories to include option of have Clothing product categories added under Fee section. Now if you add products from other than this product category then COD Fee will not be applied. Say you add products Beads Rakhi, Chocolate Cake and Canon Camera to the cart. Because these products do not belong to Clothing category, COD Fee will not be applicable.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not added

For Categories to exclude option, if you select option For all cart, then COD Fee will not be applied to the order even if you add products of any categories to the cart. But if you select Only for selected products option and have added category Food in Categories to exclude under Fee section, then COD will not appear.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

COD Fee not applied

Hence when Chocolate Cake product is added to the cart which falls under Food category, COD Fee was not applied.

By default, For all cart option is selected for both Categories to include and Categories to exclude settings.

Reset Settings

This setting allows you to reset settings on the Cash on delivery page. To enable this setting, tick the Reset checkbox of Reset section settings.

Payment Gateway Settings - Cash on delivery - Tyche Softwares Documentation

Enabling the setting

When you enable the Reset section setting, ”Cash on delivery” fees and discounts option will be disabled, Fee type for Fee and Additional Fee section will be set to Fixed, All values settings under both sections are set to 0, Coupons rule option is disabled for both sections as well.

Moreover under General Options section, Minimum & Maximum cart amount and Rouding precision options are set to 0, Taxes option is disabled and Tax class is set to Standard rate. Also Product categories – Calculation type setting is set to For all cart option for both Categories to include and Categories to exclude.

*** Remember – The settings that we discussed in this post for Cash on delivery payment gateway option is SAME for remaining 3 payment gateways – Direct Bank Transfer, Cheque Payments and PayPal option. So you can refer to this post to understand the working of other 3 payment gateways.

Was this article helpful to you? Yes 1 No

How can we help?