---
title: "Create Session"
method: POST
path: "/api/v1/embedded/session"
tags: ["Embedded Checkout"]
---

# Create Session

`POST /api/v1/embedded/session`

Create a new embedded checkout session. Returns session_id and checkout_url.

## Request body

- EmbeddedSessionRequest
  - `merchant_api_key` string, required — Merchant API key from Paylox
  - `amount` integer, required — Amount in minor units (e.g. 1000 = 10.00 TRY)
  - `currency` string — ISO currency code
  - `language` string — Language code
  - `customer` EmbeddedCustomer
    - `email` string — Customer email address
    - `name` string — Customer first name
    - `surname` string — Customer surname
    - `phone` string — Customer phone number
    - `address` string — Customer address
    - `postal_code` string — Customer postal code
    - `city` string — Customer city
    - `country` string — Customer country code
    - `identity_number` string — Customer identity/VAT number
    - `ip_address` string — Customer IP address
    - `customer_id` string — External customer identifier
  - `basket_items` EmbeddedBasketItem[] — List of basket items
    - `id` string, required — Unique item identifier
    - `name` string, required — Product name
    - `brand_name` string — Product brand
    - `qty` integer — Item quantity
    - `unit_price` integer — Unit price in minor units
    - `category` integer — Item category code
  - `customer_basket` object[] — Gateway payment customer basket
  - `submerchant_external_id` string — Primary submerchant external identifier
  - `is_submerchant_payment` boolean — Whether payment should be routed as submerchant
  - `campaign_name` string — Campaign name for payment request
  - `billing_tax_office` string — Billing tax office
  - `billing_tax_number` string — Billing tax number
  - `success_url` string — Merchant success callback URL
  - `fail_url` string — Merchant fail callback URL
  - `metadata` object — Arbitrary metadata to pass through

## Response `200`

Successful Response

- EmbeddedSessionResponse
  - `status` integer, required — Response code, 0 means success
  - `message` string, required — Response message
  - `session_id` string — Unique session identifier
  - `checkout_url` string — URL to redirect for payment
  - `expires_at` string — Session expiration datetime in ISO format

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/jetcheckout/apis/jet-checkout.md) · [All operations](https://skmtc.dev/jetcheckout/apis/jet-checkout/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jetcheckout/jet-checkout/revisions/b17a3806ccb0/schema)
