Fans

FansMetric data

Get Fan Transaction Counts

How many transactions match your filters, split by type and by status. Takes the same body as Get Fan Transactions, so you can show the counts without pulling the rows. Requires permission api_fans_read_transactions.

https://public-api.fansmetric.com
POST/v1/fans/{fan_id}/transactions/counts
Bearer

Authorization

default
AuthorizationBearer <token>

Send your FansMetric API key as a Bearer token in the Authorization header.

In: header

Path Parameters

  • fan_id*integer

    The fan's OnlyFans numeric user ID.

Request Body

application/json
  • account_ids*array

    Array of OnlyFans numeric account IDs.

  • categoriesarray

    Keep only these transaction kinds. Any of tip, message, recurring_subscription, new_subscription, unlock, unknown. Absent or [] means every category. An unrecognised value returns 400 listing the allowed set — it never silently matches nothing.

  • statusesarray

    Keep only these statuses. Any of done, undo, pending_return, loading. Absent or [] means every status, chargebacks included. An unrecognised value returns 400.

  • fromstring

    Window start, inclusive. YYYY-MM-DD, YYYY-MM-DD HH:MM:SS, RFC 3339, now, or a relative shorthand like -30days. Absent means no lower bound.

  • tostring

    Window end, inclusive. Same formats as from. Absent means no upper bound. Sending from later than to returns 400.

  • limitinteger

    Accepted and ignored — this endpoint counts rather than pages, so nothing is truncated. Present only so the identical body works on Get Fan Transactions too.

  • offsetinteger

    Accepted and ignored, like limit.

Response Fields

  • data.allinteger

    Total transactions matching the filters.

  • data.categoriesobject

    One key per category — tip, message, recurring_subscription, new_subscription, unlock, unknown — each an integer. Every key is always present, 0 when empty.

  • data.statusesobject

    One key per status — done, undo, pending_return, loading. Always all four, 0 when empty.

  • dataobject | array

    Endpoint-specific payload. See the fields below for this route.

  • _meta._credits.usedinteger

    Credits consumed by this request (currently always 1).

  • _meta._rate_limits.limit_minuteinteger

    Maximum requests per minute for the organization.

  • _meta._rate_limits.remaining_minuteinteger

    Remaining requests in the current minute window.

  • _meta._rate_limits.limit_dayinteger

    Maximum requests per day for the organization.

  • _meta._rate_limits.remaining_dayinteger

    Remaining requests in the current day window.

curl --request POST "https://public-api.fansmetric.com/v1/fans/XXXXX/transactions/counts" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "account_ids": ["100000001"],
  "statuses": ["undo"]
}'

Response

200
{
"data":{
"all":34
"categories":{
"tip":4
"message":22
"recurring_subscription":6
"new_subscription":2
"unlock":0
"unknown":0
}
"statuses":{
"done":29
"undo":5
"pending_return":0
"loading":0
}
}
"_meta":{
"_credits":{
"used":1
}
"_rate_limits":{
"limit_minute":1000
"remaining_minute":999
"limit_day":50000
"remaining_day":49999
}
}
}