---
title: "Create a customer session"
method: POST
path: "/v1/sdk/customers/customer-sessions"
tags: ["Customers"]
---

# Create a customer session

`POST /v1/sdk/customers/customer-sessions`

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.

## Request body

- CreateCustomerSessionRequest
  - `customerRef` string, required
  - `productRef` string

## Response `201`

Customer session created successfully

- CreateCustomerSessionResponse
  - `customerUrl` string, required — Full customer URL based on backend configuration (ready to redirect customer)
  - `sessionId` string, required — Customer session ID/token

## Other responses

- `400` — Invalid request data or customer not found
- `404` — Customer not found

## Changes

- **2026-07-17** `bbc2ff2bc849` — 2 warning
  - the `customerRef` request property's maxLength was set to `20`
  - the `productRef` request property's maxLength was set to `20`
- **2026-04-26** `60c2cd1caf83` — 2 breaking
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `404`
- **2026-04-10** `c6f97c4a5492` — 2 breaking
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `404`
- **2026-04-04** `88abf6f50f11` — 1 breaking
  - the `customerRef` request property's minLength was increased from `0` to `1`
- **2026-03-14** `0e1cded2ee5d` — 1 info
  - added the new optional request property `productRef`

[Full history](https://skmtc.dev/solvapay/apis/solvapay-rest-api/changes/v1/sdk/customers/customer-sessions/post.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/a946cecd290d?raw)
