Add a tax for a certain Manual Payment Method choosen

Shopify Partner
1 0 0

Hello partners


I'm trying to charge an amount of $2.50 on an order where the manual payment method "04 - ESPAÑA CONTRAREEMBOLSO" is chosen.


I would like to know the reason why, when checking out, the value of 2.50$ is not being added to the order, the code I developed for this case was as follows, I cannot understand whether it is a Shopify limitation or some Syntax error / logic to capture this action.



{% if payment_method == '04 - ESPAÑA CONTRAREEMBOLSO' %}
  {% assign surcharge = 2.50 %}
  {% assign order_total = cart.total_price | money %}
  {% assign new_total = cart.total_price | plus: surcharge %}
  {% assign new_total_formatted = new_total | money %}
  <p><strong>Note:</strong> A surcharge of {{ surcharge | money }} has been added to your order total for the payment method "04 - ESPAÑA CONTRAREEMBOLSO".</p>
  <p><strong>New Order Total:</strong> {{ new_total_formatted }}</p>
{% endif %}

 Thank you all for your contribution


I attempted to add a new line in the checkout process called 'Cash on delivery fee' by inserting the code into the theme.liquid file. However, it doesn't seem to be working as intended.

<!-- ##### Test ESPAÑA ##### -->

{% if payment_method == '04 - ESPAÑA CONTRAREEMBOLSO' %}
    $(document).ready(function() {
      var surcharge = 2.50;
      var total = {{ checkout.total_price | money_without_currency }};
      var newTotal = total + surcharge;
      $('.payment-due__price').html('{{ "Cash on delivery fee" | t }}: ' + Shopify.formatMoney(newTotal, '{{ shop.currency }}'));
{% endif %}	



Reply 1 (1)

Shopify Partner
314 24 61

Hello @DenisPereira 


This is not unfortunately possible inside Shopify settings, but you can do this by using our app Releasit Cash On Delivery which allows you to add a fee to any manual payment method like '04 - ESPAÑA CONTRAREEMBOLSO'


You can check and install the app on the Shopify App Store here:




The app is completely free to install and works on all Shopify plans and we also offer 24/7 support, so if you have any questions or you need help feel free to contact us from there!


I hope this helps you!


Marco from Releasit

Install Releasit Cash On Delivery for free here:
Add a fee to Cash on Delivery and limit COD based on any condition (order total, location, products, collections, etc.)