5. Merchant Point of Sale App

The GNU Taler merchant point of sale (POS) App allows sellers to

  • process customers’ orders by adding or removing products

  • calculate the amount owed by the customer

  • let the customer make a Taler payment via QR code or NFC

5.1. Android App

Note

The Android app is currently optimized for tablet devices, not phones.

At first start, the Android app asks you for a configuration URL and a user name as well as a password for HTTP basic authentication.

At every start of the app, it uses the saved configuration data to fetch the current configuration (defined below) and populates the currency, the products and their categories.

The Tabled UI is separated into three columns:

  • Right: Product categories that the user can select to show different products.

  • Middle: Products available in the selected category and their prices.

  • Left: The current order, the ordered products, their quantity and prices as well as the total amount.

At the bottom of the main UI there is a row of buttons:

  • Restart: Clears the current order and turns into an Undo button which restores the order.

  • -1/+1: Available when ordered items are selected and allows you to increment/decrement their quantity.

  • Prev: Goes to the previous order (if available).

  • Next: Goes to the next order or creates a new one if the current is not empty and there is no next.

  • Data entry: Enter a product name and price manually.

  • Complete: Finalize an order and prompt the customer to pay.

The top left corner features a hamburger icon. Clicking this opens a menu with these items:

  • Orders: Show current open orders.

  • History: Shows the payment history.

  • Settings: Allows you to change the app configuration settings (URL and username/password) and to forget the password (for locking the app).

5.2. APIs and Data Formats

The GNU Taler merchant POS configuration is a single JSON file with the following structure.

interface MerchantConfiguration {
  // Configuration for how to connect to the backend instance.
  config: BackendConfiguration;

  // The available product categories
  categories: MerchantCategory[];

  // Products offered by the merchant (similar to Product).
  products: MerchantProduct[];

  // Map from labels to locations
  locations: { [label: string]: [location: Location], ... };
}

The elements of the JSON file are defined as follows:

interface BackendConfiguration {
  // The URL to the Taler Merchant Backend (including instance if applicable)
  base_url: string;

  // The API key used for authentication
  api_key: string;
}
interface MerchantProduct {
  // A merchant-internal unique identifier for the product
  product_id?: string;

  // Human-readable product description
  // that will be shown to the user and used in contract terms
  description: string;

  // Map from IETF BCP 47 language tags to localized descriptions
  description_i18n?: { [lang_tag: string]: string };

  // The price of the product
  price: Amount;

  // An optional base64-encoded product image
  image?: ImageDataUrl;

  // A list of category IDs this product belongs to.
  // Typically, a product only belongs to one category, but more than one is supported.
  categories: number[];

  // Where to deliver this product. This may be an URL for online delivery
  // (i.e. 'http://example.com/download' or 'mailto:customer@example.com'),
  // or a location label defined inside the configuration's 'locations'.
  delivery_location: string;
}