Developers

TipCalculate API

Add tips to your history and read them back from your own tools, such as a point-of-sale system, a spreadsheet or an automation.

Overview

The API is a small REST interface over HTTPS that reads and writes JSON. Tips you add appear in your history in the TipCalculate apps and the web dashboard, on every device signed in to your account.

Base URLhttps://tipcalculateapp.com/api
FormatJSON request and response bodies, UTF-8
AuthenticationAPI key sent as a Bearer token

Authentication

Create a key in the dashboard under Developer. Each key belongs to your account and can only read and write your own tips. Send it in the Authorization header of every request:

Authorization: Bearer tc_live_…
  • Keys start with tc_live_ followed by 40 letters and digits.
  • You can show or copy your keys at any time from the dashboard. They’re stored encrypted, and only you can view them while signed in.
  • Revoke a key from the dashboard at any time. Requests using it fail immediately.
  • Keep keys out of client-side code and public repositories. Anyone with your key can add tips to your history and read it.
Keys created before October 2026 no longer work. Those keys were retired when we moved to the current key system. Create a new key in the dashboard and replace the old one in your integration.

Add a tip

POST/api/tips

Adds a tip to your history. Send a JSON body with the fields below; the three amounts are required.

FieldTypeDescription
billAmountRequirednumberThe bill before the tip.
tipPercentageRequiredintegerThe tip as a whole percentage, for example 20.
totalAmountRequirednumberThe bill plus the tip.
tipAmountOptionalnumberThe tip itself.
peopleCountOptionalintegerHow many people split the bill. Defaults to 1.
perPersonAmountOptionalnumberEach person’s share. Defaults to totalAmount.
currencyIdOptionalstringISO 4217 currency code. Defaults to USD.
categoryIdOptionalstringOne of restaurant, cafe, bar, fastfood, delivery, hotel, salon, taxi, valet, tour, other. Defaults to other.
businessNameOptionalstringWhere the bill was, for example a restaurant name.
addressOrDescriptionOptionalstringAn address or short description of the place.
notesOptionalstringFree-form notes.
latitude, longitudeOptionalnumberLocation for the map view. Send both or neither.
timestampOptionalintegerWhen the bill was paid, in milliseconds since the Unix epoch. Defaults to now.

Response · 201 Created

{
  "success": true,
  "message": "Tip added.",
  "id": "0d6f3c8e-2b41-4a7e-9c55-1f8a2e6b7d90",
  "tip": {
    "id": "0d6f3c8e-2b41-4a7e-9c55-1f8a2e6b7d90",
    "billAmount": 84.5,
    "tipPercentage": 20,
    "tipAmount": 16.9,
    "totalAmount": 101.4,
    "currencyId": "USD",
    "categoryId": "restaurant",
    "timestamp": 1791763200000
  }
}

List tips

GET/api/tips

Returns your most recent tips, newest first.

Query parameterTypeDescription
limitOptionalintegerHow many tips to return, from 1 to 100. Defaults to 50.
curl https://tipcalculateapp.com/api/tips?limit=10 \
  -H "Authorization: Bearer $TIPCALCULATE_API_KEY"

Response · 200 OK

{
  "success": true,
  "count": 1,
  "tips": [
    {
      "id": "0d6f3c8e-2b41-4a7e-9c55-1f8a2e6b7d90",
      "billAmount": 84.5,
      "tipPercentage": 20,
      "tipAmount": 16.9,
      "totalAmount": 101.4,
      "peopleCount": 2,
      "perPersonAmount": 50.7,
      "currencyId": "USD",
      "categoryId": "restaurant",
      "businessName": "Harbor Lane Cafe",
      "timestamp": 1791763200000
    }
  ]
}

The tip object

Tips returned by the API have the fields described in Add a tip, plus an id. Optional fields are left out when they have no value. Tips saved in the apps may also include tipPercentageExact (the tip percentage with decimals) and receiptScanned (whether the bill was read with the receipt scanner). Ignore fields you don’t recognise; we may add new ones.

Errors

Errors use standard HTTP status codes and a JSON body with an error message:

{ "error": "Missing required field: totalAmount" }
StatusMeaning
400The body isn’t valid JSON, or a required field is missing.
401The API key is missing, invalid or revoked.
404The endpoint doesn’t exist. Check the method and path.
429Too many requests. Requests may be rate limited; wait and retry with backoff.
500Something went wrong on our side. Retry later, and contact us if it continues.

Examples

Working recipes for common jobs, from logging a tip to a monthly report, are just below, each with a preview of what it produces.


Questions about the API, or need something it doesn’t do yet? Contact us.

Examples

What you can build

Pick a recipe, then a language. Set TIPCALCULATE_API_KEY to a key from your dashboard and run it.

POST /api/tips
curl https://tipcalculateapp.com/api/tips \
  -H "Authorization: Bearer $TIPCALCULATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "billAmount": 64.20,
    "tipPercentage": 20,
    "tipAmount": 12.84,
    "totalAmount": 77.04,
    "peopleCount": 2,
    "businessName": "Harbor Lane Cafe",
    "categoryId": "cafe",
    "notes": "Table 12"
  }'

Saved to your history, on every device

Harbor Lane CafeCafe · Table 12
$77.04$12.84 tip · 20%
Bill
$64.20
Split
2 × $38.52

Sample data. Your results come from your own history.