Customer journeys

Read how far each buyer got on your Live checkout pages, where unpaid buyers stopped and what converts, as JSON or Markdown for an AI assistant.

On this page

How it works

A customer journey is one buyer on your Live pages: every checkout, payment page and Shopify checkout they opened, every step they took there, and the payment it led to. It's the same record as the dashboard's Customer journeys page (Sales → Telemetry in the sidebar), and the user guide explains each stage and step in plain words.

Use it to find where buyers drop off and what makes them pay: which item, campaign, country, device and way to pay convert, and what each buyer who didn't pay did last. Every answer comes as JSON, or as Markdown made for an AI assistant: add format=md to the address, or send Accept: text/markdown.

  • Journeys record Live pages only. A Test key reads an empty list with livemode: false, and a journey id with a Test key is a 404.
  • Both calls need the customers:read scope, which Read only keys have.
  • A journey holds what the buyer typed on your page, their IP address and their device. Keep it where only your team can read it.

How a buyer's visits become one journey

Each time a buyer opens one of your pages is a visit (a page load). Visits are joined into one journey:

  1. by the email the buyer gave, through its customer record (linked_by: "email");
  2. a visit with no email joins the buyer whose most recent visit with an email came from the same device and network (linked_by: "email_device");
  3. with no email anywhere, visits from one device and network are one anonymous journey (linked_by: "device");
  4. otherwise a visit is its own journey (linked_by: null).

An IP address alone never joins two visits. A device and network means the IP address together with the browser, system, device, screen and language.

Stages

Every journey has reached one stage, and the counts count each journey once at each stage it reached, so they make a funnel.

reachedLabelMeans
viewedViewedOpened one of your Live pages
startedStartedEntered their email and pressed pay
providerWent to a providerOpened a card provider's page, or chose crypto
paidPaidThe money arrived

Left is not a stage reached but a state: left: true means the buyer didn't pay and nothing happened for 30 minutes. A held payment counts as reached provider, not paid, until you accept it.

Outcomes

outcome says where the journey stopped, in words you can show as they are:

outcomeMeans
PaidThe money arrived
Needs your decisionThe payment is held for you to accept or not, in Payments
On your page now, With PayPal now, Paying nowStill active in the last 30 minutes
Left after lookingOpened a page and did nothing more
Left while entering detailsTyped in the form and stopped before pressing pay
Left after startingPressed pay and stopped before the list of ways to pay
Left at the list of ways to paySaw the ways to pay and chose none
Left after choosing PayPalChose a way to pay but never opened its page
Left at PayPalWent to the provider's page and never came back
Came back from PayPal without payingWent to the provider's page and returned to yours unpaid

A provider's name stands in for "PayPal" in those last four. With no provider known, the words are Left after choosing a way to pay, Left after going to pay and Came back without paying.

The customer journey object

FieldTypeDescription
idstringc. and a customer id when the buyer gave an email we keep a record for; p. and their latest payment id when we know a payment but no customer; v. and a visit id for an anonymous buyer. The prefix tells you how the buyer is known, and the id stays the same while that holds
objectstring"customer_journey"
livemodebooleanAlways true: journeys are Live only
buyerobjectlabel (a short name such as Buyer 7KQ2, stable for the journey, for a buyer with no name), email, name and customer_id (cus_…), each null until the buyer gives it
linked_bystring or nullHow visits were joined: email, email_device, device, or null for a single visit
reachedstringThe furthest stage: viewed, started, provider or paid
leftbooleantrue when the buyer didn't pay and nothing happened for 30 minutes
outcomestringWhere the journey stopped, in words (above)
itemstring or nullWhat they looked at or bought: the checkout's or payment's product name
sourcestring or nullWhere the buyer came from, read from their first visit: Campaign spring (source instagram), Campaign spring, Source newsletter from its utm_ tags, else From google.com from the site that sent them, else null (typed, bookmarked or not sent)
paymentsintegerHow many payments the buyer made or started in the journey
paymentobject or nullThe latest payment: id (pay_…), status (open, pending, paid, held, failed, expired or canceled), amount (a decimal string), currency and provider (the way to pay's name, or null)
page_loadsintegerHow many visits the journey holds
first_seen, last_seenintegerThe first and latest visit, in Unix seconds
placeobjectFrom the latest visit: country (ISO 3166 code), region, city, postal_code, time_zone, network (the internet provider) and ip, each null when unknown
deviceobjectFrom the latest visit: device (phone, tablet or desktop), model, browser, browser_version, os and os_version, each null when unknown
dashboard_urlstringOpens this journey in the dashboard, for someone on your team
A customer journey
{
  "id": "c.cus_9f3kQ2LmXv7RtYp4Wz1A",
  "object": "customer_journey",
  "livemode": true,
  "buyer": {
    "label": "Buyer 7KQ2",
    "email": "alex@example.com",
    "name": "Alex Rivera",
    "customer_id": "cus_9f3kQ2LmXv7RtYp4Wz1A"
  },
  "linked_by": "email_device",
  "reached": "provider",
  "left": true,
  "outcome": "Came back from PayPal without paying",
  "item": "Pro plan",
  "source": "Campaign spring (source instagram)",
  "payments": 1,
  "payment": {
    "id": "pay_7Hq2Lm9XvR4tYp8Wz3Ab",
    "status": "expired",
    "amount": "49.00",
    "currency": "USD",
    "provider": "PayPal"
  },
  "page_loads": 2,
  "first_seen": 1795092000,
  "last_seen": 1795092540,
  "place": {
    "country": "US",
    "region": "Texas",
    "city": "Austin",
    "postal_code": "78701",
    "time_zone": "America/Chicago",
    "network": "Spectrum",
    "ip": "203.0.113.9"
  },
  "device": {
    "device": "phone",
    "model": "iPhone",
    "browser": "Safari",
    "browser_version": "18.1",
    "os": "iOS",
    "os_version": "18.1"
  },
  "dashboard_url": "https://app.railbed.io/telemetry?journey=c.cus_9f3kQ2LmXv7RtYp4Wz1A"
}

List customer journeys

GET /v1/customer_journeys

Returns the buyers seen in a period, most recently active first, with the period's funnel counts and a summary of what converts. Results are paged with cursor.

ParameterTypeDescription
periodstring24h, 7d (the default), 30d or 90d, ending now
stagestringWhich journeys to list: viewed (the default: everyone), started, provider, paid or left. The counts and summary always cover the whole period
limitinteger1 to 50, default 25
cursorstringThe next_cursor of the page before, with the same period and stage
formatstringmd (or markdown) for Markdown, json for JSON, the default
tzstringMarkdown only: the IANA time zone its times are written in, such as America/New_York. UTC when left out
cURL
curl "https://pay.railbed.io/v1/customer_journeys?period=30d&stage=left" \
  -H "Authorization: Bearer $RAILBED_SECRET_KEY"
Response
{
  "object": "list",
  "livemode": true,
  "period": "7d",
  "stage": "viewed",
  "since": 1794487740,
  "generated": 1795093200,
  "counts": {
    "viewed": 120,
    "started": 42,
    "provider": 31,
    "paid": 18,
    "left": 96,
    "capped": false
  },
  "summary": {
    "outcomes": [
      {
        "outcome": "Left after looking",
        "journeys": 61
      },
      {
        "outcome": "Left at the list of ways to pay",
        "journeys": 11
      },
      {
        "outcome": "Came back from PayPal without paying",
        "journeys": 6
      }
    ],
    "items": [
      {
        "value": "Pro plan",
        "journeys": 80,
        "paid": 14
      },
      {
        "value": "Starter plan",
        "journeys": 40,
        "paid": 4
      }
    ],
    "sources": [
      {
        "value": "Campaign spring (source instagram)",
        "journeys": 55,
        "paid": 5
      },
      {
        "value": "From google.com",
        "journeys": 35,
        "paid": 9
      },
      {
        "value": "Direct or unknown",
        "journeys": 30,
        "paid": 4
      }
    ],
    "countries": [
      {
        "value": "US",
        "journeys": 70,
        "paid": 13
      },
      {
        "value": "GB",
        "journeys": 20,
        "paid": 3
      }
    ],
    "devices": [
      {
        "value": "phone",
        "journeys": 84,
        "paid": 9
      },
      {
        "value": "desktop",
        "journeys": 36,
        "paid": 9
      }
    ],
    "providers": [
      {
        "value": "PayPal",
        "journeys": 17,
        "paid": 10
      },
      {
        "value": "Coinbase",
        "journeys": 9,
        "paid": 6
      }
    ]
  },
  "data": [
    {
      "id": "c.cus_9f3kQ2LmXv7RtYp4Wz1A",
      "object": "customer_journey",
      "livemode": true,
      "buyer": {
        "label": "Buyer 7KQ2",
        "email": "alex@example.com",
        "name": "Alex Rivera",
        "customer_id": "cus_9f3kQ2LmXv7RtYp4Wz1A"
      },
      "linked_by": "email_device",
      "reached": "provider",
      "left": true,
      "outcome": "Came back from PayPal without paying",
      "item": "Pro plan",
      "source": "Campaign spring (source instagram)",
      "payments": 1,
      "payment": {
        "id": "pay_7Hq2Lm9XvR4tYp8Wz3Ab",
        "status": "expired",
        "amount": "49.00",
        "currency": "USD",
        "provider": "PayPal"
      },
      "page_loads": 2,
      "first_seen": 1795092000,
      "last_seen": 1795092540,
      "place": {
        "country": "US",
        "region": "Texas",
        "city": "Austin",
        "postal_code": "78701",
        "time_zone": "America/Chicago",
        "network": "Spectrum",
        "ip": "203.0.113.9"
      },
      "device": {
        "device": "phone",
        "model": "iPhone",
        "browser": "Safari",
        "browser_version": "18.1",
        "os": "iOS",
        "os_version": "18.1"
      },
      "dashboard_url": "https://app.railbed.io/telemetry?journey=c.cus_9f3kQ2LmXv7RtYp4Wz1A"
    }
  ],
  "has_more": true,
  "next_cursor": "1795092540000~c.cus_9f3kQ2LmXv7RtYp4Wz1A"
}
200 OK
FieldTypeDescription
objectstring"list"
livemodebooleanThe key's mode. false with a Test key, whose list is always empty
period, stagestringWhat was asked for
since, generatedintegerThe period's start and when the answer was made, in Unix seconds
countsobjectviewed, started, provider and paid: journeys that reached each stage (a funnel: each is part of the one before); left: journeys that ended without paying; capped: true when the period held more than 5,000 visits and only the latest 5,000 were read
summaryobjectWhat converts over the whole period (below)
dataarrayCustomer journey objects
has_morebooleantrue when there is another page
next_cursorstring or nullPass it as cursor for the next page

The summary

Each list in summary is ranked by journeys, at most eight entries.

FieldDescription
outcomesWhere unpaid buyers stopped: outcome and journeys. Paid and still-active journeys aren't in it
itemsBy what they looked at: value, journeys, paid
sourcesBy where they came from (the journey's source, or Direct or unknown): value, journeys, paid
countriesBy country code, or Unknown: value, journeys, paid
devicesBy phone, tablet, desktop or Unknown: value, journeys, paid
providersBy the way to pay the buyer's latest payment used: value, journeys, paid

paid ÷ journeys is that entry's conversion rate. Compare entries with enough journeys to mean something: a source with 3 journeys and 2 paid says less than one with 200 and 40.

Retrieve a customer journey

GET /v1/customer_journeys/:id

Returns one journey with its visits and every step, newest first. The id is a journey's id from the list.

cURL
curl "https://pay.railbed.io/v1/customer_journeys/c.cus_9f3kQ2LmXv7RtYp4Wz1A" \
  -H "Authorization: Bearer $RAILBED_SECRET_KEY"
Response
{
  "id": "c.cus_9f3kQ2LmXv7RtYp4Wz1A",
  "object": "customer_journey",
  "livemode": true,
  "buyer": {
    "label": "Buyer 7KQ2",
    "email": "alex@example.com",
    "name": "Alex Rivera",
    "customer_id": "cus_9f3kQ2LmXv7RtYp4Wz1A"
  },
  "linked_by": "email_device",
  "reached": "provider",
  "left": true,
  "outcome": "Came back from PayPal without paying",
  "item": "Pro plan",
  "source": "Campaign spring (source instagram)",
  "payments": 1,
  "payment": {
    "id": "pay_7Hq2Lm9XvR4tYp8Wz3Ab",
    "status": "expired",
    "amount": "49.00",
    "currency": "USD",
    "provider": "PayPal"
  },
  "page_loads": 2,
  "first_seen": 1795092000,
  "last_seen": 1795092540,
  "place": {
    "country": "US",
    "region": "Texas",
    "city": "Austin",
    "postal_code": "78701",
    "time_zone": "America/Chicago",
    "network": "Spectrum",
    "ip": "203.0.113.9"
  },
  "device": {
    "device": "phone",
    "model": "iPhone",
    "browser": "Safari",
    "browser_version": "18.1",
    "os": "iOS",
    "os_version": "18.1"
  },
  "dashboard_url": "https://app.railbed.io/telemetry?journey=c.cus_9f3kQ2LmXv7RtYp4Wz1A",
  "visits": [
    {
      "id": "Jx8sQ2pL0vT6mN4a",
      "started": 1795092410,
      "last_seen": 1795092540,
      "engaged_ms": 74000,
      "page": "Payment page",
      "url": "/p/pay_7Hq2Lm9XvR4tYp8Wz3Ab",
      "referrer": null,
      "referrer_host": null,
      "utm": null,
      "place": {
        "country": "US",
        "region": "Texas",
        "city": "Austin",
        "postal_code": "78701",
        "time_zone": "America/Chicago",
        "network": "Spectrum",
        "ip": "203.0.113.9"
      },
      "device": {
        "device": "phone",
        "model": "iPhone",
        "browser": "Safari",
        "browser_version": "18.1",
        "os": "iOS",
        "os_version": "18.1",
        "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1",
        "screen": "390 × 844",
        "language": "en-US",
        "time_zone": "America/Chicago",
        "touch": true,
        "scheme": "light",
        "connection": "4g"
      }
    },
    {
      "id": "Rt3kW9zQ5mB1cV7e",
      "started": 1795092000,
      "last_seen": 1795092405,
      "engaged_ms": 212000,
      "page": "Checkout page",
      "url": "/c/pro-plan?utm_source=instagram&utm_campaign=spring",
      "referrer": "https://l.instagram.com/",
      "referrer_host": "l.instagram.com",
      "utm": {
        "source": "instagram",
        "medium": null,
        "campaign": "spring",
        "term": null,
        "content": null
      },
      "place": {
        "country": "US",
        "region": "Texas",
        "city": "Austin",
        "postal_code": "78701",
        "time_zone": "America/Chicago",
        "network": "Spectrum",
        "ip": "203.0.113.9"
      },
      "device": {
        "device": "phone",
        "model": "iPhone",
        "browser": "Safari",
        "browser_version": "18.1",
        "os": "iOS",
        "os_version": "18.1",
        "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1",
        "screen": "390 × 844",
        "language": "en-US",
        "time_zone": "America/Chicago",
        "touch": true,
        "scheme": "light",
        "connection": "4g"
      }
    }
  ],
  "steps": [
    {
      "id": "e88213",
      "at": 1795092530,
      "at_ms": 1795092530120,
      "kind": "step",
      "name": "buyer_return",
      "title": "Came back to your page",
      "detail": null,
      "tone": "quiet",
      "visit": "Jx8sQ2pL0vT6mN4a"
    },
    {
      "id": "r5120",
      "at": 1795092412,
      "at_ms": 1795092412480,
      "kind": "payment",
      "name": "routed",
      "title": "Handed to PayPal",
      "detail": null,
      "tone": "progress",
      "visit": null
    },
    {
      "id": "e88190",
      "at": 1795092411,
      "at_ms": 1795092411950,
      "kind": "step",
      "name": "handoff_open",
      "title": "Went to PayPal’s page",
      "detail": null,
      "tone": "progress",
      "visit": "Jx8sQ2pL0vT6mN4a"
    },
    {
      "id": "e88171",
      "at": 1795092398,
      "at_ms": 1795092398210,
      "kind": "step",
      "name": "provider_select",
      "title": "Chose PayPal",
      "detail": "The best match · Number 1 in the list",
      "tone": "progress",
      "visit": "Rt3kW9zQ5mB1cV7e"
    },
    {
      "id": "e88160",
      "at": 1795092390,
      "at_ms": 1795092390040,
      "kind": "step",
      "name": "checkout_submit",
      "title": "Started paying by card",
      "detail": null,
      "tone": "progress",
      "visit": "Rt3kW9zQ5mB1cV7e"
    },
    {
      "id": "e88152",
      "at": 1795092384,
      "at_ms": 1795092384700,
      "kind": "step",
      "name": "field_blur",
      "title": "Entered email",
      "detail": "alex@example.com",
      "tone": "plain",
      "visit": "Rt3kW9zQ5mB1cV7e"
    },
    {
      "id": "e88101",
      "at": 1795092001,
      "at_ms": 1795092001300,
      "kind": "step",
      "name": "checkout_view",
      "title": "Opened the checkout",
      "detail": null,
      "tone": "plain",
      "visit": "Rt3kW9zQ5mB1cV7e"
    }
  ],
  "steps_truncated": false
}
200 OK

It has every field of the customer journey object, and:

FieldTypeDescription
visitsarrayEach visit, newest first, at most 40: id, started, last_seen (Unix seconds), engaged_ms (time the page was on screen), page (Checkout page, Payment page, Shopify checkout or Tracking page), url (the path and query it opened), referrer, referrer_host, utm (source, medium, campaign, term, content, or null), place and device as above, with user_agent, screen, language, time_zone, touch, scheme (light or dark) and connection added
stepsarrayEverything that happened, newest first, at most 400 (below)
steps_truncatedbooleantrue when there were more than 400 steps and the oldest were left out

Steps

FieldTypeDescription
idstringUnique within the journey
atintegerWhen, in Unix seconds
at_msintegerWhen, in milliseconds, to order steps in the same second
kindstringstep: something the buyer did on your page. payment: the payment's own record
namestringThe event's code, below. Stable: match on it
titlestringWhat happened, in words
detailstring or nullMore: what they typed or chose, which field, an error's code
tonestringprogress (moved towards paying), money (the money arrived), problem (an error, a decline, a missing field), quiet (minor) or plain
visitstring or nullThe visit it happened on. null for a payment record

The user guide lists every step's name with its words. The ones that matter most for conversion are checkout_submit (pressed pay), provider_list_view (saw the ways to pay), provider_select (chose one), handoff_open (went to the provider), buyer_return (came back), checkout_error, form_submit with missing fields, rage_click, and the payment's routed, paid, held, failed and expired.

Markdown for AI assistants

Add format=md to either call, or send Accept: text/markdown, and the answer is a Markdown document instead of JSON, with the same data laid out for an assistant to read and act on:

  • The list: where buyers got to (each stage's count, its share of everyone and of the stage before), where unpaid buyers stopped, what converts by item, source, country, device and way to pay, a table of buyers with each one's journey id, the address of the next page, and a short guide to reading it.
  • One journey: the buyer, their payment and how their visits were joined, a table of visits oldest first, and every step oldest first with its time, visit, mark ([Progress], [Money], [Problem], [Minor]), words, detail and event code.
cURL
curl "https://pay.railbed.io/v1/customer_journeys?period=30d&format=md&tz=America/New_York" \
  -H "Authorization: Bearer $RAILBED_SECRET_KEY"

The same Markdown comes from Copy as Markdown on the dashboard page, the Railbed MCP server's railbed_list_customer_journeys and railbed_get_customer_journey tools, and the page's own WebMCP tools for an assistant in your browser.

Updated · This page as Markdown