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

# Get user info and purchase status

> Returns customer profile, active purchase details including usage and plan info, and a customer portal URL.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/sdk/user-info
openapi: 3.0.0
info:
  contact: {}
  description: The SolvaPay REST API specification
  title: SolvaPay REST API
  version: '1.0'
servers: []
security: []
tags: []
paths:
  /v1/sdk/user-info:
    post:
      tags:
        - User Info
      summary: Get user info and purchase status
      description: >-
        Returns customer profile, active purchase details including usage and
        plan info, and a customer portal URL.
      operationId: UserInfoSdkController_getUserInfo
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserInfoRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfoResponse'
          description: User info with purchase status
        '400':
          description: Missing customerRef or productRef
        '404':
          description: Customer or product not found
      security:
        - SecretKey: []
components:
  schemas:
    UserInfoRequest:
      properties:
        customerRef:
          maxLength: 20
          minLength: 1
          type: string
        productRef:
          maxLength: 20
          minLength: 1
          type: string
      required:
        - customerRef
        - productRef
      type: object
    UserInfoResponse:
      properties:
        purchase:
          $ref: '#/components/schemas/UserInfoPurchaseDto'
        status:
          description: Human-readable status summary
          example: 'Active subscription: My API Product (25% usage consumed)'
          type: string
        user:
          $ref: '#/components/schemas/UserInfoUserDto'
        verifyUrl:
          description: Customer portal session URL
          example: https://solvapay.com/customer/manage?id=abc123
          nullable: true
          type: string
      required:
        - status
      type: object
    UserInfoPurchaseDto:
      properties:
        endDate:
          example: '2025-11-27T10:00:00Z'
          nullable: true
          type: string
        plan:
          $ref: '#/components/schemas/UserInfoPlanDto'
        planType:
          example: recurring
          type: string
        productName:
          example: My API Product
          type: string
        reference:
          example: pur_1A2B3C4D
          type: string
        startDate:
          example: '2025-10-27T10:00:00Z'
          nullable: true
          type: string
        status:
          example: active
          type: string
        usage:
          $ref: '#/components/schemas/UserInfoUsageDto'
      required:
        - reference
        - status
        - productName
        - planType
      type: object
    UserInfoUserDto:
      properties:
        email:
          example: john@example.com
          type: string
        externalRef:
          example: auth_user_12345
          nullable: true
          type: string
        name:
          example: John Doe
          nullable: true
          type: string
        reference:
          example: cus_3C4D5E6F
          type: string
      required:
        - reference
        - email
      type: object
    UserInfoPlanDto:
      properties:
        billingCycle:
          example: monthly
          nullable: true
          type: string
        currency:
          example: USD
          type: string
        features:
          items:
            type: string
          nullable: true
          type: array
        limits:
          additionalProperties: true
          nullable: true
          type: object
        price:
          description: Price in minor currency units (e.g. cents)
          example: 2999
          type: number
        reference:
          example: pln_2B3C4D5E
          type: string
        type:
          example: recurring
          type: string
      required:
        - reference
        - price
        - currency
        - type
      type: object
    UserInfoUsageDto:
      properties:
        meterRef:
          description: Meter reference
          example: meter_ABC123
          nullable: true
          type: string
        percentUsed:
          example: 25
          nullable: true
          type: number
        remaining:
          example: 750
          type: number
        total:
          example: 1000
          type: number
        used:
          example: 250
          type: number
      required:
        - total
        - used
        - remaining
      type: object
  securitySchemes:
    SecretKey:
      bearerFormat: JWT
      description: >-
        Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer
        token.
      scheme: bearer
      type: http

````