Get Checkout Session
curl --request GET \
--url https://api.flexype.io/session/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexype.io/session/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexype.io/session/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexype.io/session/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexype.io/session/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexype.io/session/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexype.io/session/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "71ef30e1-85c8-4f7a-9e89-7691fd7c1bfb",
"items": [
{
"title": "Charcoal Embroidered Ball Gown with Velvet Drape Neck",
"handle": "charcoal-embroidered-ball-gown-with-velvet-drape-neck",
"product_id": 8948397801608,
"variant_id": 46107636203656,
"quantity": 1,
"properties": {},
"variant": {
"title": "1-2Y(16)",
"variant_id": 46107636203656,
"compare_at_price": null,
"price": 3595
},
"grams": 0,
"single_variant": false,
"item_price": 3595,
"total_discount": 359.5,
"sub_total_price": 3595,
"total_price": 3235.5,
"out_of_stock": false,
"taxable": true,
"image": "https://cdn.shopify.com/s/files/1/0572/8685/2744/files/1_c053a6bd-65f3-4c99-b181-bd799aaab917.jpg?v=1781354018",
"source": "MANUAL"
}
],
"pricing": {
"cart_total": 3595,
"sub_total": 3595,
"discount": 359.5,
"payment_offer_discount": 0,
"shipping": -1,
"cod_price": 0,
"cod_available": false,
"cod_order": false,
"total": 3235.5,
"tax": 0,
"taxes_included": true,
"total_payable": 3235.5,
"partial_cod_price": 0,
"is_partial_cod": false,
"amount_paid": 0,
"coin_discount": 0,
"coupon_discount": 359.5
},
"merchant_id": "c6e40fdc-3c66-4661-b909-65e8b1a68e5b",
"payment_state": "DRAFT",
"session_state": "INITIATED",
"redirect_url": "https://my-store.com/cart",
"coupons": [
{
"coupon_id": "0745bfb2-7ae7-4447-942a-71b50084ed8b",
"code": "SUMMER10",
"application_type": "CODE",
"combine": true,
"discount_type": "PERCENTAGE",
"discount_amount": 10,
"discount_max_cap": null,
"cart_discounted_amount": 3235.5,
"cart_discount_amount": 359.5,
"previous_coupon_code": null,
"coupon_type": "PRODUCT_AMOUNT",
"coupon_platform": "SHOPIFY",
"applied_from": "MANUAL",
"disable_cod": false,
"id": "7ce1eabb-ccb2-441f-9d03-d5249291444b",
"_id": "7ce1eabb-ccb2-441f-9d03-d5249291444b"
}
],
"add_ons": [
{
"coupon_id": "048c69c7-adc8-4cc0-b0ba-78e2f96868f5",
"target_type": "PURCHASE_AMOUNT",
"target": 3500,
"max_quantity": 1,
"products": [
{
"product_id": 12184723390782,
"status": "active",
"id": "9f4353e8-b833-453c-b1e8-7a9dd1365eb5",
"title": "2 Pairs Agate Earrings",
"vendor": "Neidhal",
"body_html": "",
"handle": "2-pairs-agate-earrings",
"image": "https://cdn.shopify.com/s/files/1/0906/1747/9486/files/2-Free_ae5cbe7d-b87d-44a9-bb39-af23c3360273.webp?v=1764495062",
"single_variant": true,
"images": [],
"variants": [
{
"title": "Default Title",
"variant_id": 52647247479102,
"image_id": null,
"compare_at_price": null,
"product_id": 12184723390782,
"item_price": 300,
"price": 300,
"image": "https://cdn.shopify.com/s/files/1/0906/1747/9486/files/2-Free_ae5cbe7d-b87d-44a9-bb39-af23c3360273.webp?v=1764495062",
"inventory_quantity": -368
}
]
}
]
}
],
"country_code": "IN",
"currency_code": "INR",
"coin": {
"coin_ratio": {
"base_currency_value": 0,
"coin_value": 0
},
"config": {
"provider": "NONE",
"name": "",
"logo": "-"
},
"coin_available": 0,
"coin_redeemable": 0,
"coin_used": 0,
"coins_processing": 0
}
}
}{
"status": "FAILURE",
"error": {
"code": "error.session-not-found",
"message": "Session not found"
}
}Checkout Session
Get Checkout Session
Retrieve the full state of a checkout session by its ID.
GET
/
session
/
{id}
Get Checkout Session
curl --request GET \
--url https://api.flexype.io/session/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexype.io/session/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexype.io/session/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexype.io/session/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexype.io/session/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexype.io/session/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexype.io/session/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"id": "71ef30e1-85c8-4f7a-9e89-7691fd7c1bfb",
"items": [
{
"title": "Charcoal Embroidered Ball Gown with Velvet Drape Neck",
"handle": "charcoal-embroidered-ball-gown-with-velvet-drape-neck",
"product_id": 8948397801608,
"variant_id": 46107636203656,
"quantity": 1,
"properties": {},
"variant": {
"title": "1-2Y(16)",
"variant_id": 46107636203656,
"compare_at_price": null,
"price": 3595
},
"grams": 0,
"single_variant": false,
"item_price": 3595,
"total_discount": 359.5,
"sub_total_price": 3595,
"total_price": 3235.5,
"out_of_stock": false,
"taxable": true,
"image": "https://cdn.shopify.com/s/files/1/0572/8685/2744/files/1_c053a6bd-65f3-4c99-b181-bd799aaab917.jpg?v=1781354018",
"source": "MANUAL"
}
],
"pricing": {
"cart_total": 3595,
"sub_total": 3595,
"discount": 359.5,
"payment_offer_discount": 0,
"shipping": -1,
"cod_price": 0,
"cod_available": false,
"cod_order": false,
"total": 3235.5,
"tax": 0,
"taxes_included": true,
"total_payable": 3235.5,
"partial_cod_price": 0,
"is_partial_cod": false,
"amount_paid": 0,
"coin_discount": 0,
"coupon_discount": 359.5
},
"merchant_id": "c6e40fdc-3c66-4661-b909-65e8b1a68e5b",
"payment_state": "DRAFT",
"session_state": "INITIATED",
"redirect_url": "https://my-store.com/cart",
"coupons": [
{
"coupon_id": "0745bfb2-7ae7-4447-942a-71b50084ed8b",
"code": "SUMMER10",
"application_type": "CODE",
"combine": true,
"discount_type": "PERCENTAGE",
"discount_amount": 10,
"discount_max_cap": null,
"cart_discounted_amount": 3235.5,
"cart_discount_amount": 359.5,
"previous_coupon_code": null,
"coupon_type": "PRODUCT_AMOUNT",
"coupon_platform": "SHOPIFY",
"applied_from": "MANUAL",
"disable_cod": false,
"id": "7ce1eabb-ccb2-441f-9d03-d5249291444b",
"_id": "7ce1eabb-ccb2-441f-9d03-d5249291444b"
}
],
"add_ons": [
{
"coupon_id": "048c69c7-adc8-4cc0-b0ba-78e2f96868f5",
"target_type": "PURCHASE_AMOUNT",
"target": 3500,
"max_quantity": 1,
"products": [
{
"product_id": 12184723390782,
"status": "active",
"id": "9f4353e8-b833-453c-b1e8-7a9dd1365eb5",
"title": "2 Pairs Agate Earrings",
"vendor": "Neidhal",
"body_html": "",
"handle": "2-pairs-agate-earrings",
"image": "https://cdn.shopify.com/s/files/1/0906/1747/9486/files/2-Free_ae5cbe7d-b87d-44a9-bb39-af23c3360273.webp?v=1764495062",
"single_variant": true,
"images": [],
"variants": [
{
"title": "Default Title",
"variant_id": 52647247479102,
"image_id": null,
"compare_at_price": null,
"product_id": 12184723390782,
"item_price": 300,
"price": 300,
"image": "https://cdn.shopify.com/s/files/1/0906/1747/9486/files/2-Free_ae5cbe7d-b87d-44a9-bb39-af23c3360273.webp?v=1764495062",
"inventory_quantity": -368
}
]
}
]
}
],
"country_code": "IN",
"currency_code": "INR",
"coin": {
"coin_ratio": {
"base_currency_value": 0,
"coin_value": 0
},
"config": {
"provider": "NONE",
"name": "",
"logo": "-"
},
"coin_available": 0,
"coin_redeemable": 0,
"coin_used": 0,
"coins_processing": 0
}
}
}{
"status": "FAILURE",
"error": {
"code": "error.session-not-found",
"message": "Session not found"
}
}Returns the complete session state — cart items with computed pricing, applied coupons, free-gift add-ons, loyalty coin balance, and payment/session lifecycle state.
A few fields worth calling out:
Use the
session_id returned by Create Session. Monetary amounts in this response are in the major currency unit (e.g. 3595 = ₹3595).pricing.shippingis-1until a delivery address is provided, then it reflects the calculated charge.add_onslists free-gift products unlocked oncepricingcrosses each offer’starget.
Authorizations
API key sent as a bearer token (Bearer <token>). Generate keys in the dashboard under Settings → API Keys.
Path Parameters
The session ID returned by Create Session.
Was this page helpful?
⌘I