Summarize gym takings
get_gym_payment_summaryUse this when someone asks how much their gym took in, or how many payments succeeded, failed or were canceled. Returns payment counts by status and totals by currency; totals include every status. Covers up to 31 days and 100 payments and defaults to the next 7 days, which hold no payments yet. Not for moving money: it cannot charge, refund or transfer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gymId | Yes | Id of one of the user's gyms, as the gym list returns it (24 lowercase hex characters) | |
| endTime | No | End of the range as an ISO 8601 date-time, after startTime and at most 31 days later; defaults to 7 days after the start | |
| startTime | No | Start of the range as an ISO 8601 date-time, matched against when each payment was recorded; defaults to now, so pass a past date for past takings |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| totals | Yes | Amount totals per currency, summed over every status including FAILED and CANCELED payments. Payment and member ids, processor or card data, contacts, notes, discounts, decline reasons, services and individual transactions are never returned. | |
| statuses | Yes | Payment counts per status, such as SUCCEEDED, FAILED, CANCELED or OTHER | |
| recordCount | Yes | ||
| totalsArePartial | Yes | True when more than 100 payments fall in the range or any returned amount is missing or invalid | |
| recordCountIsLowerBound | Yes |