Create Checkout Session
curl --request POST \
--url https://api.flexype.io/session \
--header 'Authorization: Bearer <token>' \
--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"
}
}
'import requests
url = "https://api.flexype.io/session"
payload = { "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"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
})
};
fetch('https://api.flexype.io/session', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flexype.io/session"
payload := strings.NewReader("{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flexype.io/session")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexype.io/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"data": {
"session_id": "5223aec7-bb78-4344-be18-8023eb8f22ae",
"merchant_id": "4b4c8bf8-5a7c-4786-9210-418c8bc5c379"
}
}{
"status": "FAILURE",
"error": {
"code": "error.shop-not-found",
"message": "Shop domain not found in merchant database"
}
}Checkout Session
Create Checkout Session
Create a new checkout session for a customer with cart items.
POST
/
session
Create Checkout Session
curl --request POST \
--url https://api.flexype.io/session \
--header 'Authorization: Bearer <token>' \
--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"
}
}
'import requests
url = "https://api.flexype.io/session"
payload = { "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"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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'
}
})
};
fetch('https://api.flexype.io/session', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flexype.io/session"
payload := strings.NewReader("{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flexype.io/session")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexype.io/session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"shop_domain\": \"your-store.myshopify.com\",\n \"country_code\": \"IN\",\n \"items\": [\n {\n \"product_id\": 8948397801608,\n \"variant_id\": 46107636203656,\n \"quantity\": 1,\n \"properties\": {\n \"Engraving\": \"John Doe\"\n }\n }\n ],\n \"fp_id\": \"019ed071-5eb5-7058-be68-db99c97a31c6\",\n \"shopify_s\": \"f9ab0bb4-b5c5-4972-8858-3c45c6df6e2a\",\n \"shopify_y\": \"cb62239e-bf5d-4cd3-9cac-719072e45672\",\n \"flexy_trace_s\": \"019ed3c2-e442-758f-82ec-5948f1edf94e\",\n \"flexy_trace_y\": \"019ed071-5eb5-7058-be68-e1a61e387644\",\n \"redirect_url\": \"https://my-store.com/cart\",\n \"analytics\": {\n \"fb\": {\n \"fbp\": \"fb.1.1781613551791.890210081485532160\",\n \"fbc\": \"fb.1.1781613551791.IwAR0abcdEfGhIjKlMnOpQr\"\n }\n },\n \"metadata\": {\n \"utm\": [\n {\n \"name\": \"gclid\",\n \"value\": \"CjwKCAjw6MPRBhBTEiwAd-7Mr...\"\n }\n ],\n \"orig_referer\": \"https://www.google.com/\",\n \"referer_host\": \"www.google.com\",\n \"landing_page\": \"/\"\n },\n \"attributes\": {\n \"gift_wrap\": \"true\",\n \"delivery_date\": \"2026-06-20\"\n },\n \"note\": \"Please deliver after 6 PM\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "SUCCESS",
"data": {
"session_id": "5223aec7-bb78-4344-be18-8023eb8f22ae",
"merchant_id": "4b4c8bf8-5a7c-4786-9210-418c8bc5c379"
}
}{
"status": "FAILURE",
"error": {
"code": "error.shop-not-found",
"message": "Shop domain not found in merchant database"
}
}The
Each entry in
session_id returned by this endpoint must be used for all subsequent checkout operations.
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).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.Authorizations
API key sent as a bearer token (Bearer <token>). Generate keys in the dashboard under Settings → API Keys.
Body
application/json
Show child attributes
Show child attributes
Was this page helpful?
⌘I