Formatting Prices (API Terminology Explained #12)

In one of my last blog posts, I told you about how to calculate product prices. The next question is certainly, how to format prices correctly in order to display them in your application. That is what I want to talk about in this blog post.

Preliminaries

When working with the Spreadshirt API and our platform, you will find prices everywhere. As described in my last blog post, print types, print colors and product types have prices attached that tell you how much needs to be payed when using them. Designs have commissions attached that are payed to the designer when using them. Articles also have prices that are calculated based on the actual product price and commissions on top of that, that are payed to the article owner for each sale.

Data about prices, commissions or costs are returned by the API in always the same price format. A price always consists of the following data:

  • price without VAT – price without value added tax (VAT), e.g. 0,42 €
  • price with VAT – price with value added tax (VAT), e.g. 0,50 €
  • VAT – value added tax (VAT) percentage, e.g. 19% in Germany
  • currency – the currency for which the price is given

Continue reading “Formatting Prices (API Terminology Explained #12)”