> ## 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.

# Create a customer session

> Creates a customer session URL that can be used to redirect customers to the customer page. Returns the customer URL and session ID. The session is short-lived (15 minutes) for security reasons.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/sdk/customers/customer-sessions
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/customers/customer-sessions:
    post:
      tags:
        - Customers
      summary: Create a customer session
      description: >-
        Creates a customer session URL that can be used to redirect customers to
        the customer page. Returns the customer URL and session ID. The session
        is short-lived (15 minutes) for security reasons.
      operationId: CustomerSdkController_createCustomerSession
      parameters: []
      requestBody:
        content:
          application/json:
            examples:
              basic:
                summary: Create customer session
                value:
                  customerRef: cus_3c4d5e6f7g8h
            schema:
              $ref: '#/components/schemas/CreateCustomerSessionRequest'
        description: Customer session creation request data
        required: true
      responses:
        '201':
          content:
            application/json:
              example:
                customerUrl: >-
                  https://solvapay.com/customer/manage?id=e3f1c2d4b6a89f001122334455667788
                sessionId: e3f1c2d4b6a89f001122334455667788
              schema:
                $ref: '#/components/schemas/CreateCustomerSessionResponse'
          description: Customer session created successfully
        '400':
          content:
            application/json:
              schema:
                example:
                  error: Bad Request
                  message: Customer not found
                  statusCode: 400
          description: Invalid request data or customer not found
        '404':
          content:
            application/json:
              schema:
                example:
                  error: Not Found
                  message: Customer not found
                  statusCode: 404
          description: Customer not found
      security:
        - SecretKey: []
components:
  schemas:
    CreateCustomerSessionRequest:
      properties:
        customerRef:
          minLength: 1
          type: string
        productRef:
          type: string
      required:
        - customerRef
      type: object
    CreateCustomerSessionResponse:
      properties:
        customerUrl:
          description: >-
            Full customer URL based on backend configuration (ready to redirect
            customer)
          example: >-
            https://solvapay.com/customer/manage?id=e3f1c2d4b6a89f001122334455667788
          type: string
        sessionId:
          description: Customer session ID/token
          example: e3f1c2d4b6a89f001122334455667788
          type: string
      required:
        - sessionId
        - customerUrl
      type: object

````