Skip to main content
POST
/
session
Create Session
curl --request POST \
  --url https://api.flexype.io/session \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "shop_domain": "your-store.myshopify.com",
    "country_code": "IN",
    "items": [
      {
        "product_id": 8948397801608,
        "variant_id": 46107636203656,
        "quantity": 1,
        "properties": {
          "Engraving": "John Doe"
        }
      }
    ],
    "fp_id": "019ed071-5eb5-7058-be68-db99c97a31c6",
    "shopify_s": "f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a",
    "shopify_y": "cb62239e-bf5d-4cd3-9cac-719072e45672",
    "flexy_trace_s": "019ed3c2-e442-758f-82ec-5948f1edf94e",
    "flexy_trace_y": "019ed071-5eb5-7058-be68-e1a61e387644",
    "redirect_url": "https://my-store.com/cart",
    "analytics": {
      "fb": {
        "fbp": "fb.1.1781613551791.890210081485532160",
        "fbc": "fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr"
      }
    },
    "metadata": {
      "utm": [
        {
          "name": "gclid",
          "value": "CjwKCAjw6MPRBhBTEiwAd-7Mr..."
        }
      ],
      "orig_referer": "https://www.google.com/",
      "referer_host": "www.google.com",
      "landing_page": "/"
    },
    "attributes": {
      "gift_wrap": "true",
      "delivery_date": "2026-06-20"
    },
    "note": "Please deliver after 6 PM"
  }
}
'
{
  "status": "SUCCESS",
  "data": {
    "session_id": "5223aec7-bb78-4344-be18-8023eb8f22ae",
    "merchant_id": "4b4c8bf8-5a7c-4786-9210-418c8bc5c379"
  }
}
The session_id returned by this endpoint must be used for all subsequent checkout operations, including Send OTP and Verify OTP.
Sessions expire after 1 hour of inactivity if not completed. The country_code must be in ISO 3166-1 alpha-2 format (e.g. IN, US).
Each entry in items is the full Shopify cart line-item object. Pass it through as-is from the storefront cart — product_id, variant_id, and quantity are the required fields; the rest enrich analytics and display.

Body

application/json
data
object
required

Response

Session created successfully.

status
string
Example:

"SUCCESS"

data
object