# Tips tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Tips

### get_tip_qr

Get the tip QR code for a product at a location: its page address, SVG, and whether tips by QR are enabled there.

Reads · Members of an organization · Needs products:read

#### Input

- `productId` — string; required. The product's id, from list_products
- `locationId` — string; required. The location's id, from get_setup

#### Output

- `url` — string; required. What the QR code holds: the tip page, BOOKING_URL/<organization>/tip/<token>
- `svg` — string; required. The QR code as an SVG document (black on white, with its quiet zone), for any size
- `product` — object; required. 
  - `product.id` — string; required. 
  - `product.name` — string; required. 
- `location` — object; required. 
  - `location.id` — string; required. 
  - `location.name` — string; required. 
- `enabled` — boolean; required. Whether tipQr is on for the product there; while it's off, the code opens nothing (not found)

### get_tip_report

Get paid tips per session, with the members who checked guests in; tips without a session count per location, product and local paid date. Refunds pending or succeeded reduce net. Totals stay separate by currency. Tips are never booking revenue.

Reads · Members of an organization · Needs revenue:read

#### Input

- `from` — string; required. First local date, inclusive format: "date"
- `to` — string; required. Last local date, inclusive, up to 366 days after `from` format: "date"
- `locationId` — string; optional. The location's id, from get_setup
- `productId` — string; optional. The product's id, from list_products

#### Output

- `from` — string; required. 
- `to` — string; required. 
- `canExport` — boolean; required. Whether the organization's plan includes CSV export (Growth and up): the screen offers the download only then. The rows are the same either way
- `columns` — array; required. 
  - `columns[]` — object; optional. 
    - `columns[].key` — string; required. 
    - `columns[].label` — string; required. 
    - `columns[].kind` — string; required.  Allowed: "money", "count", "date", "text"
- `rows` — array; required. By date, location, then session start (no session last), each currency on its own row
  - `rows[]` — object; optional. 
    - `rows[].date` — string; required. The session's local date at its location; a tip with no session, the local date it was paid format: "date"
    - `rows[].locationId` — string; required. 
    - `rows[].location` — string; required. 
    - `rows[].productId` — string; required. 
    - `rows[].product` — string; required. 
    - `rows[].sessionId` — string or null; required. Null: the location's tips that day with no session
    - `rows[].startsAt` — string or null; required.  format: "date-time"
    - `rows[].timeZone` — string; optional. The session's location time zone; always sent, including rows without a session
    - `rows[].checkedInBy` — string; required. The names of the members who checked guests in for the session (booking.checked_in), comma-separated; empty when none or no session
    - `rows[].checkedInByMembers` — array; required. 
      - `rows[].checkedInByMembers[]` — object; optional. 
        - `rows[].checkedInByMembers[].memberId` — string; required. 
        - `rows[].checkedInByMembers[].name` — string; required. 
    - `rows[].currency` — string; required. 
    - `rows[].tips` — integer; required. Paid tips minimum: -9007199254740991; maximum: 9007199254740991
    - `rows[].amount` — integer; required. Minor units (cents) in the location's currency
    - `rows[].refunded` — integer; required. Refunds pending or succeeded
    - `rows[].net` — integer; required. amount - refunded
- `totals` — array; required. One row for each currency, over every row
  - `totals[]` — object; optional. 
    - `totals[].currency` — string; required. 
    - `totals[].tips` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `totals[].amount` — integer; required. Minor units (cents) in the location's currency
    - `totals[].refunded` — integer; required. Minor units (cents) in the location's currency
    - `totals[].net` — integer; required. Minor units (cents) in the location's currency

### list_tips

List tips, newest first, by local dates, location, product, session, booking or state. Amounts need orders:amounts; names and email addresses need customers:contact.

Reads · Members of an organization · Needs bookings:read

#### Input

- `from` — string; optional. First local date (at each tip's location) it was made, inclusive format: "date"
- `to` — string; optional. Last local date, inclusive format: "date"
- `locationId` — string; optional. The location's id, from get_setup
- `productId` — string; optional. The product's id, from list_products
- `sessionId` — string; optional. The session's id, from list_sessions
- `orderId` — string; optional. The order's id, from list_bookings or list_orders
- `state` — string; optional.  Allowed: "pending", "paid", "partly\_refunded", "refunded", "canceled"
- `before` — string; optional. Page back: the last tip of the page before
- `limit` — integer; optional. The most results to return (default 50) minimum: 1; maximum: 200; default: 50

#### Output

- `tips` — array; required. Newest first
  - `tips[]` — object; optional. 
    - `tips[].id` — string; required. 
    - `tips[].state` — string; required.  Allowed: "pending", "paid", "partly\_refunded", "refunded", "canceled"
    - `tips[].source` — string; required.  Allowed: "qr", "booking\_link", "checkout"
    - `tips[].amount` — integer or null; required. Null without orders:amounts
    - `tips[].refunded` — integer or null; required. Refunds pending or succeeded. Null without orders:amounts
    - `tips[].currency` — string; required. 
    - `tips[].product` — object; required. 
      - `tips[].product.id` — string; required. 
      - `tips[].product.name` — string; required. 
    - `tips[].location` — object; required. 
      - `tips[].location.id` — string; required. 
      - `tips[].location.name` — string; required. 
    - `tips[].session` — object or null; required. The session it counts toward, or null
      - `tips[].session.id` — string; required. 
      - `tips[].session.startsAt` — string; required.  format: "date-time"
    - `tips[].booking` — object or null; required. A booking link's booking
      - `tips[].booking.orderId` — string; required. 
      - `tips[].booking.code` — string; required. 
    - `tips[].name` — string or null; required. The name the guest gave. Null without customers:contact
    - `tips[].email` — string or null; required. The receipt's address. Null without customers:contact
    - `tips[].paymentId` — string or null; required. 
    - `tips[].paidAt` — string or null; required.  format: "date-time"
    - `tips[].createdAt` — string; required.  format: "date-time"
    - `tips[].refunds` — array; required. 
      - `tips[].refunds[]` — object; optional. 
        - `tips[].refunds[].id` — string; required. rfd_…
        - `tips[].refunds[].amount` — integer or null; required. Null without orders:amounts
        - `tips[].refunds[].status` — string; required.  Allowed: "pending", "succeeded", "failed", "reversed"
        - `tips[].refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
        - `tips[].refunds[].createdAt` — string; required.  format: "date-time"
- `nextBefore` — string or null; required. 

### refund_tip

Refund part or all of a tip to the card it was paid with, for a recorded reason. The booking refund roles and caps apply per tip, including what this person has already refunded. Can't be undone. Returns a preview to confirm.

Changes · Members of an organization · Needs orders:amounts, refunds:create

#### Input

- `tipId` — string; required. The tip's id, from list_tips
- `amount` — integer; optional. Minor units. Left out: everything left to refund on it exclusiveMinimum: 0
- `reason` — string; optional. guest_request, service_issue, duplicate, goodwill, or other (or leave it out): staff's own reason, in note Allowed: "guest\_request", "service\_issue", "duplicate", "goodwill", "other"
- `note` — string; optional.  minLength: 1; maxLength: 500

#### Output

- `tip` — object; required. 
  - `tip.id` — string; required. 
  - `tip.state` — string; required.  Allowed: "pending", "paid", "partly\_refunded", "refunded", "canceled"
  - `tip.source` — string; required.  Allowed: "qr", "booking\_link", "checkout"
  - `tip.amount` — integer or null; required. Null without orders:amounts
  - `tip.refunded` — integer or null; required. Refunds pending or succeeded. Null without orders:amounts
  - `tip.currency` — string; required. 
  - `tip.product` — object; required. 
    - `tip.product.id` — string; required. 
    - `tip.product.name` — string; required. 
  - `tip.location` — object; required. 
    - `tip.location.id` — string; required. 
    - `tip.location.name` — string; required. 
  - `tip.session` — object or null; required. The session it counts toward, or null
    - `tip.session.id` — string; required. 
    - `tip.session.startsAt` — string; required.  format: "date-time"
  - `tip.booking` — object or null; required. A booking link's booking
    - `tip.booking.orderId` — string; required. 
    - `tip.booking.code` — string; required. 
  - `tip.name` — string or null; required. The name the guest gave. Null without customers:contact
  - `tip.email` — string or null; required. The receipt's address. Null without customers:contact
  - `tip.paymentId` — string or null; required. 
  - `tip.paidAt` — string or null; required.  format: "date-time"
  - `tip.createdAt` — string; required.  format: "date-time"
  - `tip.refunds` — array; required. 
    - `tip.refunds[]` — object; optional. 
      - `tip.refunds[].id` — string; required. rfd_…
      - `tip.refunds[].amount` — integer or null; required. Null without orders:amounts
      - `tip.refunds[].status` — string; required.  Allowed: "pending", "succeeded", "failed", "reversed"
      - `tip.refunds[].reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
      - `tip.refunds[].createdAt` — string; required.  format: "date-time"
- `refund` — object; required. 
  - `refund.id` — string; required. rfd_…
  - `refund.amount` — integer or null; required. Null without orders:amounts
  - `refund.status` — string; required.  Allowed: "pending", "succeeded", "failed", "reversed"
  - `refund.reason` — string or null; required.  Allowed: "seats\_unavailable", "guest\_request", "session\_canceled", "service\_issue", "duplicate", "goodwill", "other"
  - `refund.createdAt` — string; required.  format: "date-time"
