# Get amount spent per subscription

Retrieves amount spent per subscription with period breakdown

Endpoint: POST /subscriptions/amount-spent
Version: 2.0.0
Security: oauth2ClientCredentials

## Header parameters:

  - `org_wallet_ref` (string)
    Organization wallet reference, defaults to "1" if not provided

  - `business_id` (string, required)
    Business identifier for the request

## Request fields (application/json):

  - `from` (string, required)
    Start date in ISO format
    Example: 2025-12-31T21:00:00.000+00:00

  - `to` (string, required)
    End date in ISO format
    Example: 2026-01-30T21:00:00.000+00:00

  - `currency` (string, required)
    Currency code
    Example: KES

  - `business_id` (string, required)
    Business ID
    Example: 4D7CA841437E366EB38C

  - `period` (string, required)
    Period type
    Example: MONTHLY

  - `subscriptionId` (string, required)
    Subscription ID
    Example: 67b44aea86c1ccabbe965827

## Response 200 fields (application/json):

  - `status` (boolean, required)
    Status of the operation
    Example: true

  - `message` (string, required)
    Response message
    Example: Fetch total amount per period

  - `data` (object, required)
    Amount spent data

  - `data.amountSpent` (array, required)
    Array of amounts spent
    Example: []

  - `data.periodBreakdown` (array, required)
    Breakdown by period

  - `data.periodBreakdown.period` (string, required)
    Period identifier
    Example: 2025-05

  - `data.periodBreakdown.periodStart` (string, required)
    Period start date
    Example: 2025-05-31T21:00:00.000Z

  - `data.periodBreakdown.periodEnd` (string, required)
    Period end date
    Example: 2025-06-30T20:59:59.999Z

  - `data.periodBreakdown.total` (number, required)
    Total amount spent in this period
    Example: 0

