---
title: "Get customer session by sessionId"
method: GET
path: "/v1/sdk/customers/customer-sessions/{sessionId}"
tags: ["Customers"]
---

# Get customer session by sessionId

`GET /v1/sdk/customers/customer-sessions/{sessionId}`

## Request

- Base URL: `https://api.solvapay.com`
- URL: `https://api.solvapay.com/v1/sdk/customers/customer-sessions/{sessionId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/solvapay/apis/solvapay-rest-api/docs/v1/sdk/customers/customer-sessions/:sessionId/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a customer session by its sessionId with all data hydrated including customer details and purchases. The session must belong to the authenticated provider.

## Path parameters

- `sessionId` string, required

## Response `200`

Customer session retrieved successfully

- GetCustomerSessionResponse
  - `createdAt` string, required: Session creation date
  - `customer` CustomerResponse, required
    - `email` string, required: Customer email address
    - `externalRef` string: External reference ID from your auth system (if set during creation or update)
    - `name` string, required: Customer full name
    - `purchases` SdkPurchaseResponse[]: Active purchases
      - `amount` number, required: Amount in USD cents (normalised for aggregation)
      - `autoRenew` boolean: Auto-renew enabled
      - `billingCycle` 'weekly' | 'monthly' | 'quarterly' | 'yearly': Billing cycle
      - `cancellationReason` string: Reason for cancellation
      - `cancelledAt` string: When purchase was cancelled
      - `createdAt` string, required: Created at
      - `currency` string, required: ISO 4217 currency code of the customer-facing charge
      - `customerEmail` string: Customer email
      - `customerRef` string, required: Customer reference
      - `endDate` string: End date of purchase
      - `exchangeRate` number: Exchange rate from original currency to USD
      - `isRecurring` boolean, required: Whether the purchase is recurring
      - `metadata` object: Arbitrary metadata attached to the purchase
      - `nextBillingDate` string: Next billing date
      - `origin` 'paid' | 'free_default' | 'manual' | 'one_time' | 'credit_topup' | 'admin_assignment': How the purchase originated
      - `originalAmount` number: Original amount in the payment currency (minor units)
      - `paidAt` string: Paid at timestamp
      - `planRef` string: Plan reference from the plan snapshot, for reliable plan matching
      - `planSnapshot` SdkPlanSnapshotDto
        - `currency` string, required: Currency code
        - `features` object, nullable: Plan features
        - `isMetered` boolean: Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
        - `name` string: Plan name captured at purchase time
        - `options` object[]: Frozen composable pricing options captured at purchase time
        - `price` number, required: Headline plan price in minor units (e.g. cents)
        - `reference` string: Plan reference
      - `productName` string: Product name
      - `productRef` string: Product reference
      - `reference` string, required: Purchase reference
      - `requiresPayment` boolean: Whether the purchase requires payment
      - `startDate` string, required: Start date
      - `status` string, required: Purchase status
      - `usage` SdkUsagePeriodDto
        - `periodEnd` string: Billing period of the active usage window; counts come from `/v1/sdk/limits`
        - `periodStart` string: Billing period of the active usage window; counts come from `/v1/sdk/limits`
    - `reference` string, required: Customer reference identifier
  - `customerUrl` string, required: Full customer URL based on backend configuration (ready to redirect customer)
  - `expiresAt` string, required: Session expiration date
  - `sessionId` string, required: Customer session ID/token
  - `status` 'active' | 'expired' | 'used', required: Session status
  - `updatedAt` string, required: Session last update date

## Other responses

- `404`: Customer session not found

## Changes

- **2026-09-30** `e13ee57d07a6`: 2 info
  - added `#/components/schemas/SdkUsagePeriodDto` to the `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/usage` response property `allOf` list for the response status `200`
  - removed `#/components/schemas/UsageBillingDto` from the `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/usage` response property `allOf` list for the response status `200`
- **2026-09-18** `aacdf8ae7816`: 2 breaking, 13 info
  - the response property `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/productName` became optional for the status `200`
  - the `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/planSnapshot` response's property type changed from `object` to no type for status `200`
  - added the optional property `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/autoRenew` to the response with the `200` status
  - added the optional property `customer/allOf[#/components/schemas/CustomerResponse]/purchases/items/billingCycle` to the response with the `200` status
  - …11 more
- **2026-04-26** `60c2cd1caf83`: 1 breaking
  - the response's body type changed from `object` to no type for status `404`
- **2026-04-14** `c6f97c4a5492`: 1 breaking
  - the response's body type changed from no type to `object` for status `404`
- …earlier changes not shown

[Operation history](https://skmtc.dev/solvapay/apis/solvapay-rest-api/changes/v1/sdk/customers/customer-sessions/:sessionId/get.md)

---

[API](https://skmtc.dev/solvapay/apis/solvapay-rest-api.md) - [All operations](https://skmtc.dev/solvapay/apis/solvapay-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/solvapay/apis/solvapay-rest-api/revisions/bd3a1cb8cb52?raw)
