← Files Flows by plugin.spaceARCHIVED FILE
examples/checkout.flows.json
6.13 KB · Nov 30, 2026 · 00:17 UTC
{
"version": 1,
"id": "checkout",
"name": "Checkout",
"description": "From the first item in a bag to a confirmed order. Includes address validation and payment recovery.",
"startNode": "bag",
"nodes": [
{
"id": "bag",
"type": "screen",
"title": "Shopping bag",
"description": "The customer reviews their items before starting checkout.",
"actor": "Customer",
"position": {
"x": 0,
"y": 60
},
"source": {
"kind": "proposed"
},
"preview": {
"eyebrow": "STUDIO STORE",
"title": "Your bag",
"description": "A few good things, ready to go.",
"items": [
{
"label": "Everyday tote",
"value": "€48"
},
{
"label": "Studio notebook",
"value": "€24"
}
],
"brand": "studio",
"actionLabel": "Continue to checkout",
"variant": "commerce"
}
},
{
"id": "shipping",
"type": "screen",
"title": "Shipping details",
"description": "Collect a delivery address. Existing customers can use a saved address.",
"actor": "Customer",
"position": {
"x": 320,
"y": 60
},
"source": {
"kind": "proposed"
},
"preview": {
"eyebrow": "CHECKOUT · 1 OF 2",
"title": "Where to?",
"description": "Add your delivery details.",
"fields": [
{
"label": "Full name",
"value": "Alex Morgan"
},
{
"label": "Address",
"value": "24 Studio Lane"
},
{
"label": "Postcode",
"value": "10115"
}
],
"brand": "studio",
"actionLabel": "Continue",
"variant": "default"
}
},
{
"id": "address-check",
"type": "decision",
"title": "Address valid?",
"description": "Check that the delivery address is complete and supported.",
"actor": "Application",
"position": {
"x": 660,
"y": 115
},
"source": {
"kind": "proposed"
}
},
{
"id": "address-error",
"type": "state",
"title": "Address needs a fix",
"description": "Keep all entered details and highlight the field that needs attention.",
"actor": "Customer",
"position": {
"x": 660,
"y": 370
},
"source": {
"kind": "proposed"
}
},
{
"id": "payment",
"type": "screen",
"title": "Payment",
"description": "The customer selects a payment method and confirms the total.",
"actor": "Customer",
"position": {
"x": 1000,
"y": 60
},
"source": {
"kind": "proposed"
},
"preview": {
"eyebrow": "CHECKOUT · 2 OF 2",
"title": "Make it yours",
"description": "One last step.",
"fields": [
{
"label": "Payment method",
"value": "Visa ending in 4242"
}
],
"items": [
{
"label": "Subtotal",
"value": "€72"
},
{
"label": "Delivery",
"value": "€5"
},
{
"label": "Total",
"value": "€77"
}
],
"brand": "studio",
"actionLabel": "Pay €77",
"variant": "default"
}
},
{
"id": "authorize",
"type": "action",
"title": "Authorize payment",
"description": "Request authorization for €77 from the payment provider.",
"actor": "Payment provider",
"position": {
"x": 1340,
"y": 115
},
"source": {
"kind": "proposed"
}
},
{
"id": "confirmed",
"type": "screen",
"title": "Order confirmed",
"description": "Show the confirmation and expected delivery. This is the successful end of the journey.",
"actor": "Customer",
"position": {
"x": 1680,
"y": 0
},
"source": {
"kind": "proposed"
},
"preview": {
"eyebrow": "ORDER #1042",
"title": "All yours.",
"description": "Your order is confirmed. We’ll let you know when it ships.",
"items": [
{
"label": "Delivery",
"value": "3–5 business days"
},
{
"label": "Total paid",
"value": "€77"
}
],
"brand": "studio",
"actionLabel": "Order confirmed",
"variant": "success"
}
},
{
"id": "declined",
"type": "state",
"title": "Payment declined",
"description": "Explain the declined payment and let the customer try again without losing their order.",
"actor": "Customer",
"position": {
"x": 1680,
"y": 370
},
"source": {
"kind": "proposed"
}
}
],
"edges": [
{
"id": "checkout",
"source": "bag",
"target": "shipping",
"label": "Checkout"
},
{
"id": "continue",
"source": "shipping",
"target": "address-check",
"label": "Continue"
},
{
"id": "valid",
"source": "address-check",
"target": "payment",
"label": "Valid",
"condition": "Address is deliverable"
},
{
"id": "invalid",
"source": "address-check",
"target": "address-error",
"label": "Invalid",
"condition": "Missing or unsupported address"
},
{
"id": "edit-address",
"source": "address-error",
"target": "shipping",
"label": "Edit address"
},
{
"id": "pay",
"source": "payment",
"target": "authorize",
"label": "Pay €77"
},
{
"id": "approved",
"source": "authorize",
"target": "confirmed",
"label": "Approved"
},
{
"id": "rejected",
"source": "authorize",
"target": "declined",
"label": "Declined"
},
{
"id": "retry",
"source": "declined",
"target": "payment",
"label": "Try another method"
}
]
}
SHA-256: 81eecebc7599d63b7d473c922d26d16e19a51d0d8b6a8c2ce7ee7dd677a4252d