Commerce
Track Checkout Started
Track a started checkout for abandoned checkout automations
POST
/
api
/
v1
/
checkouts
Track Checkout Started
curl --request POST \
--url https://api.sequenzy.com/api/v1/checkouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkoutId": "<string>",
"totalCents": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"customer": {},
"items": [
{}
],
"properties": {}
}
'import requests
url = "https://api.sequenzy.com/api/v1/checkouts"
payload = {
"checkoutId": "<string>",
"totalCents": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"customer": {},
"items": [{}],
"properties": {}
}
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({
checkoutId: '<string>',
totalCents: 123,
currency: '<string>',
checkoutUrl: '<string>',
customer: {},
items: [{}],
properties: {}
})
};
fetch('https://api.sequenzy.com/api/v1/checkouts', 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.sequenzy.com/api/v1/checkouts",
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([
'checkoutId' => '<string>',
'totalCents' => 123,
'currency' => '<string>',
'checkoutUrl' => '<string>',
'customer' => [
],
'items' => [
[
]
],
'properties' => [
]
]),
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.sequenzy.com/api/v1/checkouts"
payload := strings.NewReader("{\n \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\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.sequenzy.com/api/v1/checkouts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/checkouts")
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 \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"checkoutId": "checkout-abc123",
"subscriberId": "sub_abc123",
"eventId": "evt_xyz789"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Validation error: checkoutId is required"
}
{
"success": false,
"error": "Internal server error"
}
Track a started checkout from any e-commerce platform. Triggers the
ecommerce.checkout_started event, which can power abandoned checkout automations (start a sequence on ecommerce.checkout_started with a delay, and stop it on ecommerce.order_placed).
Request Body
URL the customer can use to resume the checkout. Available in emails as
{{event.checkoutUrl}}.The customer who started the checkout. Requires
email; also accepts
externalId, firstName, lastName, and attributes.Checkout line items. Each item has
productId (required), title
(required), quantity (required), variantId, sku, variantTitle, and
priceCents.curl -X POST "https://api.sequenzy.com/api/v1/checkouts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"checkoutId": "checkout-abc123",
"totalCents": 8850,
"currency": "USD",
"checkoutUrl": "https://store.example.com/checkout/abc123",
"customer": { "email": "buyer@example.com" },
"items": [
{
"productId": "SKU-PROTEIN-1KG",
"title": "Protein Powder",
"quantity": 1,
"priceCents": 8850
}
]
}'
Responses
{
"success": true,
"checkoutId": "checkout-abc123",
"subscriberId": "sub_abc123",
"eventId": "evt_xyz789"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Validation error: checkoutId is required"
}
{
"success": false,
"error": "Internal server error"
}
⌘I
Track Checkout Started
curl --request POST \
--url https://api.sequenzy.com/api/v1/checkouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"checkoutId": "<string>",
"totalCents": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"customer": {},
"items": [
{}
],
"properties": {}
}
'import requests
url = "https://api.sequenzy.com/api/v1/checkouts"
payload = {
"checkoutId": "<string>",
"totalCents": 123,
"currency": "<string>",
"checkoutUrl": "<string>",
"customer": {},
"items": [{}],
"properties": {}
}
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({
checkoutId: '<string>',
totalCents: 123,
currency: '<string>',
checkoutUrl: '<string>',
customer: {},
items: [{}],
properties: {}
})
};
fetch('https://api.sequenzy.com/api/v1/checkouts', 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.sequenzy.com/api/v1/checkouts",
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([
'checkoutId' => '<string>',
'totalCents' => 123,
'currency' => '<string>',
'checkoutUrl' => '<string>',
'customer' => [
],
'items' => [
[
]
],
'properties' => [
]
]),
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.sequenzy.com/api/v1/checkouts"
payload := strings.NewReader("{\n \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\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.sequenzy.com/api/v1/checkouts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/checkouts")
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 \"checkoutId\": \"<string>\",\n \"totalCents\": 123,\n \"currency\": \"<string>\",\n \"checkoutUrl\": \"<string>\",\n \"customer\": {},\n \"items\": [\n {}\n ],\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"checkoutId": "checkout-abc123",
"subscriberId": "sub_abc123",
"eventId": "evt_xyz789"
}
{
"success": false,
"error": "Unauthorized"
}
{
"success": false,
"error": "Validation error: checkoutId is required"
}
{
"success": false,
"error": "Internal server error"
}