Skip to Content
TMBillOpen API
Sales

Payment mode breakdown for a store

Scope: `sales:read`.

GET
/sales/payments

Scope: sales:read.

Authorization

apiKey
headerAuthorizationBearer <tmb_live_<prefix>_<secret> or tmb_test_<prefix>_<secret>>

Scopes (set per key, narrowed by the merchant's grant): stores:read, stores:write, menu:read, orders:read, orders:write, rider:write, sales:read, customers:pii, mcp:use (the key may be used on the MCP endpoint POST /mcp; by default one MCP-enabled app per merchant account).

Query Parameters

store_id*string
from*string
Formatdate
to*string

Inclusive; at most 31 days after from.

Formatdate
order_state?string

Which orders to report: fulfilled (sales, default) or cancelled (cancellation report). Complimentary orders are always reported apart (free_total, free_count).

Default"fulfilled"
Value in"fulfilled""cancelled"
order_type?string

Comma-separated billing type values (up to 20), e.g. 1 (Dine In), 2 (Takeaway), 4 (Zomato). Values are store-configured; see group_by=order_type.

Match^\d{1,6}(,\d{1,6}){0,19}$
Lengthlength <= 140
time_from?string

Time-of-day window start, store local HH:MM (meal slots, shifts). Needs time_to. If time_from > time_to the window wraps past midnight (e.g. 22:00-02:00).

Match^([01]\d|2[0-3]):[0-5]\d$
time_to?string

Time-of-day window end, exclusive, store local HH:MM. Needs time_from.

Match^([01]\d|2[0-3]):[0-5]\d$
limit?integer
Range1 <= value <= 100
Default50
cursor?string

Opaque; pass next_cursor from the previous page with the same other parameters. null next_cursor = last page.

Lengthlength <= 512

Response Body

Amount per payment mode

application/json
  1. response
currency*Currency

ISO 4217

as_of*string

Data freshness; when this result was read from the store data

Formatdate-time
final*boolean

false when the range includes any of the last 3 days in store local time (late syncs and edits can still change them)

due*Money

Unpaid dues (amount_to_pay minus received) in the range, reported apart from the payment modes (same on every page)

Match^-?\d+(\.\d{1,3})?$
next_cursor*string|null
data*array<>
Example Request
curl -X GET 'https://openapi.tmbill.com/v1/sales/payments?store_id=string&from=2019-08-24&to=2019-08-24'
Example Response
{  "currency": "INR",  "as_of": "2019-08-24T14:15:22Z",  "final": true,  "due": "249.00",  "next_cursor": "string",  "data": [    {      "payment_option": "string",      "count": 0,      "amount": "249.00"    }  ]}