Admin

Get total Lifetime Value (LTV)

Calculate total LTV from payment events, optionally filtered by user and currency. LTV = Total Income - Total Expenses.

get/admin/payment-events/total-ltv

Request

  • Base URL
    https://api.miaai.chat (the document declares no server; this is the origin it was published from)
  • URL
    https://api.miaai.chat/admin/payment-events/total-ltv
  • Auth
    HTTP bearer

Query parameters

userIdstring
Example:user-uuid-here

Filter by user ID

currencystring
Example:USD

Filter by currency

Response

Total LTV calculated successfully

totalLtvnumber required

Total Lifetime Value

currencystring required

Currency

userIdstring nullable required

User ID (if filtered by user)

totalIncomenumber required

Total Income

totalExpensesnumber required

Total Expenses (refunds, etc.)

transactionCountnumber required

Total number of transactions

Example response

{
  "totalLtv": 299.97,
  "currency": "USD",
  "userId": "user-uuid-here",
  "totalIncome": 399.96,
  "totalExpenses": 99.99,
  "transactionCount": 15
}

Changes

No recorded changes to this operation across all 1 revision of this API.