> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onswitch.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get summary

> Returns aggregated payment statistics.



## OpenAPI

````yaml /openapi.json get /payment/summary
openapi: 3.0.3
info:
  title: Receive stablecoin. Get fiat in seconds.
  description: Stablecoin collection and settlement layer.
  version: 1.0.0
  contact:
    name: Switch Labs
    email: contact@onswitch.xyz
  license:
    name: Proprietary
  x-tagGroups:
    - name: Institution
      tags:
        - Institution
    - name: Miscellaneous
      tags:
        - Miscellaneous
    - name: History
      tags:
        - History
    - name: Payment
      tags:
        - Payment
    - name: Webhook
      tags:
        - Webhook
    - name: Offramp
      tags:
        - Offramp
    - name: Onramp
      tags:
        - Onramp
    - name: Swap
      tags:
        - Swap
    - name: Developer
      tags:
        - Developer
    - name: Wallet
      tags:
        - Wallet
    - name: Compliance
      tags:
        - Compliance
servers:
  - url: https://api.onswitch.xyz
    description: Production server
security: []
tags:
  - name: Institution
    description: Institution discovery and bank or payment-rail lookup
  - name: Miscellaneous
    description: Requirements, coverage, assets, confirmation, and transaction status
  - name: History
    description: Payment history and summaries for the partner's account
  - name: Payment
    description: Saved payment beneficiaries, payment confirmation, and status
  - name: Webhook
    description: Webhook delivery history and callback resend
  - name: Offramp
    description: Offramp transaction endpoints for converting stablecoins to local currency
  - name: Onramp
    description: Onramp transaction endpoints for converting local currency to stablecoins
  - name: Swap
    description: Swap endpoints for exchanging between different stablecoin assets
  - name: Developer
    description: Developer fee balance and withdrawal
  - name: Wallet
    description: >-
      Wallet endpoints for creating and managing chain abstracted stablecoin
      wallets
  - name: Compliance
    description: AML compliance screening for PEP, sanctions, and other regulatory reasons
paths:
  /payment/summary:
    get:
      tags:
        - History
      summary: Get summary
      description: Returns aggregated payment statistics.
      operationId: getPaymentSummary
      parameters:
        - name: start_date
          in: query
          required: false
          description: Optional start of date range.
          schema:
            type: string
          example: '2026-01-01'
        - name: end_date
          in: query
          required: false
          description: Optional end of date range.
          schema:
            type: string
          example: '2026-01-31'
      responses:
        '200':
          description: Payment summary retrieved successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - message
                  - timestamp
                  - data
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  timestamp:
                    type: string
                    format: date-time
                  data:
                    allOf:
                      - $ref: '#/components/schemas/PaymentSummaryData'
                    nullable: true
              example:
                success: true
                message: Payment summary for selected window
                timestamp: '2026-04-18T14:22:08.631Z'
                data:
                  payment_summary:
                    payment_volume: 29492.907963
                    no_of_payment: 18
                    fee_collected: 0
                  asset_breakdown:
                    total: 29492.907963
                    breakdown:
                      ngn:
                        amount: 7168.772496
                        count: 1
                        percentage: 24.306767
                      usdc:
                        amount: 12146.557741
                        count: 11
                        percentage: 41.184673
                      usdt:
                        amount: 10177.577726
                        count: 6
                        percentage: 34.50856
                  network_breakdown:
                    total: 29492.907963
                    breakdown:
                      avalanche:
                        amount: 5578.306134
                        count: 4
                        percentage: 18.914059
                      solana:
                        amount: 10177.577726
                        count: 6
                        percentage: 34.50856
                      fiat:
                        amount: 7168.772496
                        count: 1
                        percentage: 24.306767
                      base:
                        amount: 6568.251607
                        count: 7
                        percentage: 22.270614
                  status_breakdown:
                    total: 71095.86236
                    breakdown:
                      awaiting_deposit:
                        amount: 16477.199897
                        count: 20
                        percentage: 23.176032
                      processing:
                        amount: 25125.7545
                        count: 1
                        percentage: 35.340671
                      completed:
                        amount: 29492.907963
                        count: 18
                        percentage: 41.483297
                  weekly_breakdown:
                    last_week:
                      onramp:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      offramp:
                        - 0
                        - 298.525286
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      swap:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                    this_week:
                      onramp:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      offramp:
                        - 1457.63691
                        - 5092.969024
                        - 1999.679085
                        - 1066.31279
                        - 0
                        - 0
                        - 0
                      swap:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                  monthly_breakdown:
                    last_month:
                      onramp:
                        - 0
                        - 0
                        - 7168.772496
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      offramp:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 1.997596
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 1487.419139
                        - 742.017911
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 298.525286
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 1457.63691
                        - 5092.969024
                      swap:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                    this_month:
                      onramp:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      offramp:
                        - 1999.679085
                        - 1066.31279
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                      swap:
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
                        - 0
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - ServiceKey: []
components:
  schemas:
    PaymentSummaryData:
      type: object
      required:
        - payment_summary
        - asset_breakdown
        - network_breakdown
        - status_breakdown
        - weekly_breakdown
        - monthly_breakdown
      properties:
        payment_summary:
          $ref: '#/components/schemas/PaymentSummaryCore'
        asset_breakdown:
          $ref: '#/components/schemas/PaymentSummaryKeyedBreakdown'
        network_breakdown:
          $ref: '#/components/schemas/PaymentSummaryKeyedBreakdown'
        status_breakdown:
          $ref: '#/components/schemas/PaymentSummaryKeyedBreakdown'
        weekly_breakdown:
          $ref: '#/components/schemas/PaymentSummaryWeeklyBreakdown'
        monthly_breakdown:
          $ref: '#/components/schemas/PaymentSummaryMonthlyBreakdown'
    PaymentSummaryCore:
      type: object
      required:
        - payment_volume
        - no_of_payment
        - fee_collected
      properties:
        payment_volume:
          type: number
          description: Completed payment volume (USD)
        no_of_payment:
          type: integer
        fee_collected:
          type: number
    PaymentSummaryKeyedBreakdown:
      type: object
      required:
        - total
        - breakdown
      properties:
        total:
          type: number
          description: Total volume in USD represented by this breakdown
        breakdown:
          type: object
          description: >-
            Keys are lowercase labels (e.g. source asset code, blockchain or
            `fiat`, payment status such as `completed`).
          additionalProperties:
            $ref: '#/components/schemas/PaymentSummaryBreakdownMetric'
    PaymentSummaryWeeklyBreakdown:
      type: object
      required:
        - last_week
        - this_week
      properties:
        last_week:
          $ref: '#/components/schemas/PaymentSummaryWeeklyDirections'
        this_week:
          $ref: '#/components/schemas/PaymentSummaryWeeklyDirections'
    PaymentSummaryMonthlyBreakdown:
      type: object
      required:
        - last_month
        - this_month
      properties:
        last_month:
          $ref: '#/components/schemas/PaymentSummaryMonthlyDirections'
        this_month:
          $ref: '#/components/schemas/PaymentSummaryMonthlyDirections'
    PaymentSummaryBreakdownMetric:
      type: object
      required:
        - amount
        - count
        - percentage
      properties:
        amount:
          type: number
          description: Volume in USD for this bucket
        count:
          type: integer
          description: Number of payments in this bucket
        percentage:
          type: number
          description: Share of the breakdown total (0–100)
    PaymentSummaryWeeklyDirections:
      type: object
      required:
        - onramp
        - offramp
        - swap
      properties:
        onramp:
          type: array
          description: Seven daily `payment_volume` values (USD), ISO week order
          minItems: 7
          maxItems: 7
          items:
            type: number
        offramp:
          type: array
          minItems: 7
          maxItems: 7
          items:
            type: number
        swap:
          type: array
          minItems: 7
          maxItems: 7
          items:
            type: number
    PaymentSummaryMonthlyDirections:
      type: object
      required:
        - onramp
        - offramp
        - swap
      properties:
        onramp:
          type: array
          description: >-
            One entry per calendar day in that month (length equals that month’s
            day count, 28–31); daily completed `payment_volume` (USD)
          items:
            type: number
        offramp:
          type: array
          items:
            type: number
        swap:
          type: array
          items:
            type: number
  responses:
    BadRequest:
      description: Bad request - Invalid input parameters or validation error
      content:
        application/json:
          schema:
            type: object
            required:
              - success
              - message
              - timestamp
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                description: Error message describing what went wrong
              timestamp:
                type: string
                format: date-time
              data:
                description: Additional error details
                nullable: true
          example:
            success: false
            message: amount must be greater than 0 for the selected corridor
            timestamp: '2026-04-18T14:22:08.631Z'
            data: null
  securitySchemes:
    ServiceKey:
      type: apiKey
      in: header
      name: x-service-key
      description: Service key for API authentication

````