Tutorial 4: Payment, Shipping & VAT
In the previous tutorials you’ve covered:
- Creating a shop, product groups and products – and a language and currency
- Creating a shopping cart and modifying the checkout flow
- Creating a product index and implementing free-text search in the product catalog
In this tutorial, we are going to get acquainted with payment, shipping and VAT in Dynamicweb – all issues central to running a web shop.
Payment and Shipping in Dynamicweb is handled by creating and implementing one or more payment and shipping methods – which will in turn interact with payment providers (like QuickPay, Paypal or AuthorizeNet) or delivery services (like GLS, FedEx or PostNord).
On this tutorial, however, we will not be integrating with actual services, but will be creating an invoice payment method – since payment providers or delivery services typically require you to set up a test account before you can test their services.
Creating a payment method
To create a payment method:
- Go to Settings > Ecommerce > Orders > Payment
- Click New payment in the toolbar to open the Edit Payment view (Figure 2.1)
- Name it Invoice
Using the Fees settings you can set up payment fees, either as a fixed amount or a percentage of the total order price. Fees can be universal or country/region specific.
- Select United States under country rates
- Create a fee of 1% for the invoice payment with a total price of 0 and for All countries
- Under Cart type select None
Now, in real world scenarios you will probably set up payment methods with payment providers like PayPal, QuickPay, Klarna or AuthorizeNet.
To do so, select Checkout Handler instead of None as your Cart Type – you will be presented with a set of parameters for integrating with the particular payment provider. We have documented some of the most commonly used providers, read more in the manual.
Go through the order flow and verify that you can select the new payment method during checkout.
Creating a shipping method
Creating a shipping method is pretty much an identical process to creating a payment method:
- Go to Settings > Ecommerce > Orders > Shipping
- Click New shipping in the toolbar to open the Edit shipping method view (Figure 3.1)
- Name it Free Shipping
- Under Countries select United States
As with payment methods, in production scenarios you probably want to integrate with a delivery service using one of our delivery providers
To do so, select the appropriate shipping provider rather than None – you will be presented with a set of parameters for integrating with the particular delivery service. We have documented some of the most commonly used providers, read more in the manual.
Go through the order flow and verify that you can select the new shipping method during checkout.
Defining VAT rates
Most countries have some form of VAT (Value Added Tax) on all sales, barring the US which has a relatively complicated Sales Tax system instead. Dynamicweb can handle both VAT and Sales taxes, but for the purpose of this tutorial we are going to pretend our shop is not in the US – as Sales Taxes require an active Avalara AvaTax account to set up.
Please keep in mind that VAT across countries or B2B/B2C platforms is much much simpler to handle when prices in your database are without VAT.
VAT rates are set for each country:
- Go to Settings >Ecommerce > Internationalization > Countries
- Open your default country (United States)
- Set the VAT rate to 10%
Finally, go to frontend and verify that prices in the product list and the cart have changed.
Most countries have some form of differentiated VAT rates – or products which are entirely exempt from VAT. Dynamicweb handles this though VAT Groups, which you can read about in the manual, but which are outside the scope of these tutorials.
What you’ve learned – and what’s next
In this tutorial, you have learned how to:
- Create a simple payment method
- Create a simple shipping method
- Define country VAT rates
In the next tutorial you will learn how to work with more advanced Ecommerce concepts such as:
- The Price Matrix
- The Discount Matrix
- Simple and Extended variants
If you have extra time, or you’re extra curious, consider doing one or more of the extra exercises below.
Loyalty points is a feature which allows you to award customers with a virtual currency – Loyalty Points – when buying your products, and then create ways for them to spend those points, by allowing certain goods to be purchased with points instead of money.
Read about Loyalty Points in the manual, then set it up!