TagMangoTagMango Docs
Analytics

Get Transaction Analytics Summary

GET
/api/v1/external/analytics/transactions/summary

Summarizes the authenticated creator’s paid transactions for a required reporting window: transaction growth, successful-versus-failed outcomes, and completed refunds. Use List Transactions by Creator when you need individual transactions or filters beyond the date window.

Window and comparison

  • startDate and endDate are required ISO 8601 date or date-time values with no default. A date-only value resolves to midnight UTC; use an explicit offset for reporting days in another timezone.
  • The current window includes both bounds. endDate must be on or after startDate and at most 90 days later. Equal bounds select transactions at that exact instant; future and empty windows return zero-filled metrics.
  • previousCount covers the same elapsed duration immediately before the current window. Its start is inclusive and its end at startDate is exclusive, so the windows do not overlap.
  • growthPercentage is rounded to one decimal. When previousCount is 0, the calculation uses 1 as the denominator: 7 against 0 yields 700, while two empty windows yield 0.

Included transactions

  • The summary uses the same paid population as List Transactions by Creator: creator-owned transactions with a non-zero amount in the creator currency. It uses the completion time when present and the creation time otherwise.
  • Incomplete checkouts, duplicates, demo purchases, tier or sale-tracked purchases, zero-cost registrations, and transactions carrying an internally generated coupon are excluded.
  • failed counts only the failed status. Every other eligible status is successful, including completed, refunded, and manual-pay transactions, so the two fields always add up to transactions.count.

Refunds, currency, and freshness

  • A refund counts only when both the transaction and refund are complete. An ongoing refund remains in the transaction and outcome totals but not in the refund metrics.
  • Each refunded transaction counts once, even when several refund events contribute to its cumulative amount. Only transactions explicitly marked as partial count in partial; all other completed refunds count in full.
  • totalAmount is the unrounded cumulative refund amount in the reported creator currency. The currency defaults to INR, and no exchange-rate conversion is applied.
  • Results come from the reporting store and may lag recent transactions or refunds with no guaranteed bound. Currency and transaction data are read separately, while both date windows and all transaction aggregates share one snapshot.

Retries and validation

  • This read has no side effects and is safe to retry; a later attempt may observe fresher reporting data.
  • A missing or unparseable bound, a reversed pair, or a range longer than 90 days returns the standard validation 400 response before analytics are read. A reversed or oversized pair includes "endDate must be on or after startDate and within 90 days".
AuthorizationBearer <token>

In: header

Query Parameters

startDate*string

Inclusive start of the current transaction window, as an ISO 8601 date or date-time. A date-only value resolves to midnight UTC. It is also the exclusive end of the equal-length comparison window immediately before it. Required, with no default, and must be at most 90 days before endDate.

Formatdate-time
endDate*string

Inclusive end of the current transaction window, as an ISO 8601 date or date-time. A date-only value resolves to midnight UTC. A transaction at exactly this instant is counted. Must be on or after startDate and no more than 90 days after it.

Formatdate-time

Header Parameters

x-whitelabel-host*string

Host name of the dashboard, ex: mydomain.tagmango.com

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api-prod-new.tagmango.com/api/v1/external/analytics/transactions/summary?startDate=2026-08-01T00%3A00%3A00.000Z&endDate=2026-08-08T00%3A00%3A00.000Z" \  -H "x-whitelabel-host: string"
{
  "code": 200,
  "result": {
    "transactions": {
      "count": 148,
      "previousCount": 121,
      "growthPercentage": 22.3
    },
    "outcomes": {
      "successful": 143,
      "failed": 5
    },
    "refunds": {
      "count": 4,
      "totalAmount": 7250.5,
      "full": 3,
      "partial": 1
    },
    "currency": "INR"
  },
  "type": "Success",
  "message": "Transaction analytics summary fetched successfully",
  "statusMessage": "OK",
  "success": true
}
{
  "code": 400,
  "type": "Bad Request",
  "statusMessage": "BAD_REQUEST",
  "success": false,
  "message": "Invalid request",
  "result": "Invalid request"
}
{
  "code": 401,
  "type": "Unauthorized",
  "statusMessage": "UNAUTHORIZED",
  "message": "Invalid token",
  "result": "Invalid token",
  "success": false
}
{
  "code": 403,
  "type": "Forbidden",
  "statusMessage": "FORBIDDEN",
  "errorCode": "WORKSHOP_MANGO_FORBIDDEN",
  "message": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "result": "You can not access this api with a TagMango account, only available for whitelabel hosts",
  "success": false
}
{
  "code": 429,
  "type": "Too Many Requests",
  "statusMessage": "TOO_MANY_REQUESTS",
  "message": "Request limit exceeded. try after 10 seconds",
  "result": "Request limit exceeded. try after 10 seconds",
  "success": false
}