{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-contents/checkout/sidebars.yaml","oas-contents/api/in-person-payments.json":"oas-contents/api/in-person-payments.json"},"props":{"metadata":{"markdoc":{"tagList":["openapi-code-sample","openapi-response-sample","admonition"]},"type":"markdown"},"seo":{"title":"Create a Session","description":"Explore our documentation and API and start integrating Kustom Checkout","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-a-session","__idx":0},"children":["Create a Session"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a customer is ready to pay in-store, your backend creates a session with the cart details and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["device_id"]}," of the target terminal. Kustom dispatches it to the device immediately via push notification — no polling needed on your end."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"the-payment-session-flow","__idx":1},"children":["The payment session flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The diagram below shows the full lifecycle. Only the first step, creating the session, is something your backend does. Everything after the push notification happens inside the Kustom POS app; you can observe progress through the callbacks."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Actor"},"children":["Actor"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Role"},"children":["Role"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant System"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant's backend or e-commerce platform that creates payment sessions when a customer is ready to pay in-store. Webhooks to receive lifecycle events and an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderId"]}," to correlate the session with its own order record are configured in the Kustom Portal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shopper"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Anyone shopping at the merchant store."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Store Clerk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant employee using the Kustom POS app to collect in-person payments."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kustom POS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom POS app for iOS or Android running on any certified device."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Session API"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom session API, used to create sale sessions that handle the payment collection and order creation workflow."]}]}]}]}]},{"$$mdtype":"Tag","name":"Mermaid","attributes":{"data-language":"mermaid","diagramSource":"sequenceDiagram\n    actor Shopper\n    actor Store Clerk\n    participant Kustom POS\n    participant Session API\n    participant Merchant System\n\n    critical Public — authenticated with x-merchant-id\n        Merchant System->>+Session API: POST /ipp/v1/sessions\n        Note over Merchant System,Session API: Session payload\n        Session API->>-Merchant System: 200 if session created successfully\n        Session API-->>Merchant System: callback: ipp.session.created (async)\n    end\n\n    critical Kustom POS gets notified about new session\n        Session API->>Kustom POS: Push notification { sessionId }\n    end\n\n    critical Kustom POS payment flow\n        Kustom POS->>+Session API: Get session details\n        Store Clerk->>Kustom POS: Selects payment method (ex: tap-to-pay)\n        Kustom POS->>+Session API: Attaches payment to session\n        Session API-->>Merchant System: callback: ipp.session.activated\n        Session API->>-Kustom POS: \n\n        Kustom POS->>Store Clerk: Present tap-to-pay screen\n        Store Clerk->>Shopper: Present tap-to-pay\n\n        alt Payment succeeds\n            Shopper->>Kustom POS: Tap card\n            Kustom POS->>+Session API: Finalize payment\n            Session API-->>Merchant System: callback: ipp.session.finalized\n            Session API->>-Kustom POS: \n            Kustom POS->>Store Clerk: Render receipt / QR code\n        else Payment fails — clerk retries\n            Shopper->>Kustom POS: Tap card (declined)\n            Kustom POS->>+Session API: Finalize payment\n            Session API->>-Kustom POS: Return payment failed status\n            Kustom POS->>Store Clerk: Show payment failed\n        else Clerk cancels\n            Store Clerk->>Kustom POS: Cancel session\n            Kustom POS->>+Session API: Cancel session\n            Session API-->>Merchant System: callback: ipp.session.cancelled\n            Session API->>-Kustom POS: \n        end\n    end\n","diagramHtml":"<div class=\"mermaid\" data-processed=\"true\"><svg id=\"mermaid-1780646113273\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"max-width: 1457px;\" viewBox=\"-50 -10 1457 1753\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><g><rect x=\"1207\" y=\"1667\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Merchant System\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"1282\" y=\"1699.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"1282\" dy=\"0\">Merchant System</tspan></text></g><g><rect x=\"869\" y=\"1667\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Session API\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"944\" y=\"1699.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"944\" dy=\"0\">Session API</tspan></text></g><g><rect x=\"580\" y=\"1667\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Kustom POS\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"655\" y=\"1699.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"655\" dy=\"0\">Kustom POS</tspan></text></g><g></g><g></g><g><line id=\"actor4\" x1=\"1282\" y1=\"65\" x2=\"1282\" y2=\"1667\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Merchant System\"></line><g id=\"root-4\"><rect x=\"1207\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Merchant System\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"1282\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"1282\" dy=\"0\">Merchant System</tspan></text></g></g><g><line id=\"actor3\" x1=\"944\" y1=\"65\" x2=\"944\" y2=\"1667\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Session API\"></line><g id=\"root-3\"><rect x=\"869\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Session API\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"944\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"944\" dy=\"0\">Session API</tspan></text></g></g><g><line id=\"actor2\" x1=\"655\" y1=\"65\" x2=\"655\" y2=\"1667\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Kustom POS\"></line><g id=\"root-2\"><rect x=\"580\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"Kustom POS\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"655\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"655\" dy=\"0\">Kustom POS</tspan></text></g></g><g><line id=\"actor1\" x1=\"284\" y1=\"80\" x2=\"284\" y2=\"1667\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Store Clerk\"></line></g><g><line id=\"actor0\" x1=\"75\" y1=\"80\" x2=\"75\" y2=\"1667\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Shopper\"></line></g><style>#mermaid-1780646113273{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-1780646113273 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-1780646113273 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-1780646113273 .error-icon{fill:#552222;}#mermaid-1780646113273 .error-text{fill:#552222;stroke:#552222;}#mermaid-1780646113273 .edge-thickness-normal{stroke-width:1px;}#mermaid-1780646113273 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1780646113273 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1780646113273 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-1780646113273 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1780646113273 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1780646113273 .marker{fill:#333333;stroke:#333333;}#mermaid-1780646113273 .marker.cross{stroke:#333333;}#mermaid-1780646113273 svg{font-family:\"trebuchet ms\",verdana,arial,sans-serif;font-size:16px;}#mermaid-1780646113273 p{margin:0;}#mermaid-1780646113273 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1780646113273 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-1780646113273 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1780646113273 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-1780646113273 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1780646113273 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1780646113273 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1780646113273 .sequenceNumber{fill:white;}#mermaid-1780646113273 #sequencenumber{fill:#333;}#mermaid-1780646113273 #crosshead path{fill:#333;stroke:#333;}#mermaid-1780646113273 .messageText{fill:#333;stroke:none;}#mermaid-1780646113273 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1780646113273 .labelText,#mermaid-1780646113273 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-1780646113273 .loopText,#mermaid-1780646113273 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-1780646113273 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-1780646113273 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1780646113273 .noteText,#mermaid-1780646113273 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-1780646113273 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1780646113273 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1780646113273 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1780646113273 .actorPopupMenu{position:absolute;}#mermaid-1780646113273 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-1780646113273 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-1780646113273 .actor-man circle,#mermaid-1780646113273 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-1780646113273 :root{--mermaid-font-family:\"trebuchet ms\",verdana,arial,sans-serif;}</style><g></g><defs><symbol id=\"computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><g><rect x=\"939\" y=\"190\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"10\" height=\"104\" class=\"activation0\"></rect></g><g><rect x=\"919\" y=\"198\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"388\" height=\"42\" class=\"note\"></rect><text x=\"1113\" y=\"203\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"noteText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"1113\">Session payload</tspan></text></g><g><line x1=\"909\" y1=\"75\" x2=\"1317\" y2=\"75\" class=\"loopLine\"></line><line x1=\"1317\" y1=\"75\" x2=\"1317\" y2=\"358\" class=\"loopLine\"></line><line x1=\"909\" y1=\"358\" x2=\"1317\" y2=\"358\" class=\"loopLine\"></line><line x1=\"909\" y1=\"75\" x2=\"909\" y2=\"358\" class=\"loopLine\"></line><polygon points=\"909,75 959,75 959,88 950.6,95 909,95\" class=\"labelBox\"></polygon><text x=\"934\" y=\"88\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"labelText\" style=\"font-size: 16px; font-weight: 400;\">critical</text><text x=\"1138\" y=\"93\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"1138\">[Public — authenticated with</tspan></text><text x=\"1138\" y=\"115\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"1138\">x-merchant-id]</tspan></text></g><g><line x1=\"644\" y1=\"368\" x2=\"955\" y2=\"368\" class=\"loopLine\"></line><line x1=\"955\" y1=\"368\" x2=\"955\" y2=\"491\" class=\"loopLine\"></line><line x1=\"644\" y1=\"491\" x2=\"955\" y2=\"491\" class=\"loopLine\"></line><line x1=\"644\" y1=\"368\" x2=\"644\" y2=\"491\" class=\"loopLine\"></line><polygon points=\"644,368 694,368 694,381 685.6,388 644,388\" class=\"labelBox\"></polygon><text x=\"669\" y=\"381\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"labelText\" style=\"font-size: 16px; font-weight: 400;\">critical</text><text x=\"824.5\" y=\"386\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"824.5\">[Kustom POS gets notified</tspan></text><text x=\"824.5\" y=\"408\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"824.5\">about new session]</tspan></text></g><g></g><g><rect x=\"944\" y=\"702\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"10\" height=\"62\" class=\"activation1\"></rect></g><g><rect x=\"944\" y=\"1029\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"10\" height=\"62\" class=\"activation1\"></rect></g><g><rect x=\"944\" y=\"1302\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"10\" height=\"52\" class=\"activation1\"></rect></g><g><rect x=\"944\" y=\"1565\" fill=\"#EDF2AE\" stroke=\"#666\" width=\"10\" height=\"62\" class=\"activation1\"></rect></g><g><line x1=\"64\" y1=\"882\" x2=\"1293\" y2=\"882\" class=\"loopLine\"></line><line x1=\"1293\" y1=\"882\" x2=\"1293\" y2=\"1637\" class=\"loopLine\"></line><line x1=\"64\" y1=\"1637\" x2=\"1293\" y2=\"1637\" class=\"loopLine\"></line><line x1=\"64\" y1=\"882\" x2=\"64\" y2=\"1637\" class=\"loopLine\"></line><line x1=\"64\" y1=\"1160\" x2=\"1293\" y2=\"1160\" class=\"loopLine\" style=\"stroke-dasharray: 3, 3;\"></line><line x1=\"64\" y1=\"1423\" x2=\"1293\" y2=\"1423\" class=\"loopLine\" style=\"stroke-dasharray: 3, 3;\"></line><polygon points=\"64,882 114,882 114,895 105.6,902 64,902\" class=\"labelBox\"></polygon><text x=\"89\" y=\"895\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"labelText\" style=\"font-size: 16px; font-weight: 400;\">alt</text><text x=\"703.5\" y=\"900\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"703.5\">[Payment succeeds]</tspan></text><text x=\"678.5\" y=\"1178\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\">[Payment fails — clerk retries]</text><text x=\"678.5\" y=\"1441\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\">[Clerk cancels]</text></g><g><line x1=\"54\" y1=\"501\" x2=\"1303\" y2=\"501\" class=\"loopLine\"></line><line x1=\"1303\" y1=\"501\" x2=\"1303\" y2=\"1647\" class=\"loopLine\"></line><line x1=\"54\" y1=\"1647\" x2=\"1303\" y2=\"1647\" class=\"loopLine\"></line><line x1=\"54\" y1=\"501\" x2=\"54\" y2=\"1647\" class=\"loopLine\"></line><polygon points=\"54,501 104,501 104,514 95.6,521 54,521\" class=\"labelBox\"></polygon><text x=\"79\" y=\"514\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"labelText\" style=\"font-size: 16px; font-weight: 400;\">critical</text><text x=\"703.5\" y=\"519\" text-anchor=\"middle\" class=\"loopText\" style=\"font-size: 16px; font-weight: 400;\"><tspan x=\"703.5\">[Kustom POS payment flow]</tspan></text></g><g class=\"actor-man actor-top\" name=\"Shopper\"><line id=\"actor-man-torso0\" x1=\"75\" y1=\"25\" x2=\"75\" y2=\"45\"></line><line id=\"actor-man-arms0\" x1=\"57\" y1=\"33\" x2=\"93\" y2=\"33\"></line><line x1=\"57\" y1=\"60\" x2=\"75\" y2=\"45\"></line><line x1=\"75\" y1=\"45\" x2=\"91\" y2=\"60\"></line><circle cx=\"75\" cy=\"10\" r=\"15\" width=\"150\" height=\"65\"></circle><text x=\"75\" y=\"67.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-man\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Shopper</tspan></text></g><g class=\"actor-man actor-top\" name=\"Store Clerk\"><line id=\"actor-man-torso1\" x1=\"284\" y1=\"25\" x2=\"284\" y2=\"45\"></line><line id=\"actor-man-arms1\" x1=\"266\" y1=\"33\" x2=\"302\" y2=\"33\"></line><line x1=\"266\" y1=\"60\" x2=\"284\" y2=\"45\"></line><line x1=\"284\" y1=\"45\" x2=\"300\" y2=\"60\"></line><circle cx=\"284\" cy=\"10\" r=\"15\" width=\"150\" height=\"65\"></circle><text x=\"284\" y=\"67.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-man\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"284\" dy=\"0\">Store Clerk</tspan></text></g><text x=\"1117\" y=\"149\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">POST /ipp/v1/sessions</text><line x1=\"1281\" y1=\"188\" x2=\"952\" y2=\"188\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"1114\" y=\"255\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">200 if session created successfully</text><line x1=\"949\" y1=\"294\" x2=\"1278\" y2=\"294\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"1112\" y=\"309\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">callback: ipp.session.created (async)</text><line x1=\"945\" y1=\"348\" x2=\"1278\" y2=\"348\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"801\" y=\"442\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Push notification { sessionId }</text><line x1=\"943\" y1=\"481\" x2=\"659\" y2=\"481\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"796\" y=\"553\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Get session details</text><line x1=\"656\" y1=\"592\" x2=\"936\" y2=\"592\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"468\" y=\"607\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Selects payment method (ex: tap-to-pay)</text><line x1=\"285\" y1=\"646\" x2=\"651\" y2=\"646\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"796\" y=\"661\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Attaches payment to session</text><line x1=\"656\" y1=\"700\" x2=\"936\" y2=\"700\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"1116\" y=\"715\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">callback: ipp.session.activated</text><line x1=\"954\" y1=\"754\" x2=\"1278\" y2=\"754\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"799\" y=\"769\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">​</text><line x1=\"939\" y1=\"764\" x2=\"659\" y2=\"764\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"471\" y=\"779\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Present tap-to-pay screen</text><line x1=\"654\" y1=\"818\" x2=\"288\" y2=\"818\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"181\" y=\"833\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Present tap-to-pay</text><line x1=\"283\" y1=\"872\" x2=\"79\" y2=\"872\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"364\" y=\"934\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Tap card</text><line x1=\"76\" y1=\"973\" x2=\"651\" y2=\"973\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"796\" y=\"988\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Finalize payment</text><line x1=\"656\" y1=\"1027\" x2=\"936\" y2=\"1027\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"1116\" y=\"1042\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">callback: ipp.session.finalized</text><line x1=\"954\" y1=\"1081\" x2=\"1278\" y2=\"1081\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"799\" y=\"1096\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">​</text><line x1=\"939\" y1=\"1091\" x2=\"659\" y2=\"1091\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"471\" y=\"1106\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Render receipt / QR code</text><line x1=\"654\" y1=\"1145\" x2=\"288\" y2=\"1145\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"364\" y=\"1207\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Tap card (declined)</text><line x1=\"76\" y1=\"1246\" x2=\"651\" y2=\"1246\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"796\" y=\"1261\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Finalize payment</text><line x1=\"656\" y1=\"1300\" x2=\"936\" y2=\"1300\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"799\" y=\"1315\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Return payment failed status</text><line x1=\"939\" y1=\"1354\" x2=\"659\" y2=\"1354\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"471\" y=\"1369\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Show payment failed</text><line x1=\"654\" y1=\"1408\" x2=\"288\" y2=\"1408\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"468\" y=\"1470\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Cancel session</text><line x1=\"285\" y1=\"1509\" x2=\"651\" y2=\"1509\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"796\" y=\"1524\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">Cancel session</text><line x1=\"656\" y1=\"1563\" x2=\"936\" y2=\"1563\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><text x=\"1116\" y=\"1578\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">callback: ipp.session.cancelled</text><line x1=\"954\" y1=\"1617\" x2=\"1278\" y2=\"1617\" class=\"messageLine1\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"799\" y=\"1632\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-size: 16px; font-weight: 400;\">​</text><line x1=\"939\" y1=\"1627\" x2=\"659\" y2=\"1627\" class=\"messageLine0\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#arrowhead)\" style=\"fill: none;\"></line><g class=\"actor-man actor-bottom\" name=\"Shopper\"><line id=\"actor-man-torso4\" x1=\"75\" y1=\"1692\" x2=\"75\" y2=\"1712\"></line><line id=\"actor-man-arms4\" x1=\"57\" y1=\"1700\" x2=\"93\" y2=\"1700\"></line><line x1=\"57\" y1=\"1727\" x2=\"75\" y2=\"1712\"></line><line x1=\"75\" y1=\"1712\" x2=\"91\" y2=\"1727\"></line><circle cx=\"75\" cy=\"1677\" r=\"15\" width=\"150\" height=\"65\"></circle><text x=\"75\" y=\"1734.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-man\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"75\" dy=\"0\">Shopper</tspan></text></g><g class=\"actor-man actor-bottom\" name=\"Store Clerk\"><line id=\"actor-man-torso4\" x1=\"284\" y1=\"1692\" x2=\"284\" y2=\"1712\"></line><line id=\"actor-man-arms4\" x1=\"266\" y1=\"1700\" x2=\"302\" y2=\"1700\"></line><line x1=\"266\" y1=\"1727\" x2=\"284\" y2=\"1712\"></line><line x1=\"284\" y1=\"1712\" x2=\"300\" y2=\"1727\"></line><circle cx=\"284\" cy=\"1677\" r=\"15\" width=\"150\" height=\"65\"></circle><text x=\"284\" y=\"1734.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-man\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400;\"><tspan x=\"284\" dy=\"0\">Store Clerk</tspan></text></g></svg></div>"},"children":["sequenceDiagram\n    actor Shopper\n    actor Store Clerk\n    participant Kustom POS\n    participant Session API\n    participant Merchant System\n\n    critical Public — authenticated with x-merchant-id\n        Merchant System->>+Session API: POST /ipp/v1/sessions\n        Note over Merchant System,Session API: Session payload\n        Session API->>-Merchant System: 200 if session created successfully\n        Session API-->>Merchant System: callback: ipp.session.created (async)\n    end\n\n    critical Kustom POS gets notified about new session\n        Session API->>Kustom POS: Push notification { sessionId }\n    end\n\n    critical Kustom POS payment flow\n        Kustom POS->>+Session API: Get session details\n        Store Clerk->>Kustom POS: Selects payment method (ex: tap-to-pay)\n        Kustom POS->>+Session API: Attaches payment to session\n        Session API-->>Merchant System: callback: ipp.session.activated\n        Session API->>-Kustom POS: \n\n        Kustom POS->>Store Clerk: Present tap-to-pay screen\n        Store Clerk->>Shopper: Present tap-to-pay\n\n        alt Payment succeeds\n            Shopper->>Kustom POS: Tap card\n            Kustom POS->>+Session API: Finalize payment\n            Session API-->>Merchant System: callback: ipp.session.finalized\n            Session API->>-Kustom POS: \n            Kustom POS->>Store Clerk: Render receipt / QR code\n        else Payment fails — clerk retries\n            Shopper->>Kustom POS: Tap card (declined)\n            Kustom POS->>+Session API: Finalize payment\n            Session API->>-Kustom POS: Return payment failed status\n            Kustom POS->>Store Clerk: Show payment failed\n        else Clerk cancels\n            Store Clerk->>Kustom POS: Cancel session\n            Kustom POS->>+Session API: Cancel session\n            Session API-->>Merchant System: callback: ipp.session.cancelled\n            Session API->>-Kustom POS: \n        end\n    end\n"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"create-a-session-1","__idx":2},"children":["Create a session"]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"createSession","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"createSession"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All amounts are in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["minor units"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["19900"]}," means ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["199.00"]}," in the given currency."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lifecycle callbacks are delivered to the webhook endpoint configured in the Kustom Portal — see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/contents/checkout/in-person-payments/callbacks"},"children":["Receive Callbacks"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your merchant account has multiple locations, pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["location_id"]}," as a query parameter: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ipp/v1/sessions?location_id=<id>"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Store the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session_id"]},". The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ipp.session.created"]}," callback is delivered ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["asynchronously"]}," — the create response is returned first, and the callback fires shortly after. In the edge case where the callback arrives before your system has finished processing the create response, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," to correlate."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"session-lifecycle","__idx":3},"children":["Session lifecycle"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"State"},"children":["State"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Terminal?"},"children":["Terminal?"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["created"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session dispatched, push notification sent to device."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["activated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Clerk selected payment method, tap-to-pay in progress."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["completed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment collected. Order created in Kustom Order Management."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅ Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancelled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancelled by the clerk or by your backend."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅ Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expired"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session TTL elapsed without completion."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["✅ Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"fetch-session-status","__idx":4},"children":["Fetch session status"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Poll this endpoint if you need the current state without waiting for a callback:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"fetch-session-details","__idx":5},"children":["Fetch session details"]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"getSession","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"getSession"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cancel-a-session","__idx":6},"children":["Cancel a session"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can cancel a session from your backend as long as it has not reached a final state:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"cancel-session","__idx":7},"children":["Cancel session"]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"cancelSession","parameters":{},"environments":{}},"children":[]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"oas-contents/api/in-person-payments.json","operationId":"cancelSession"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cancellation is final — no further payment collection is possible on a cancelled session."]}]}]},"headings":[{"value":"Create a Session","id":"create-a-session","depth":1},{"value":"The payment session flow","id":"the-payment-session-flow","depth":2},{"value":"Create a session","id":"create-a-session-1","depth":4},{"value":"Session lifecycle","id":"session-lifecycle","depth":2},{"value":"Fetch session status","id":"fetch-session-status","depth":2},{"value":"Fetch session details","id":"fetch-session-details","depth":4},{"value":"Cancel a session","id":"cancel-a-session","depth":2},{"value":"Cancel session","id":"cancel-session","depth":4}],"frontmatter":{"title":"Create a Session","description":"When a customer is ready to pay in-store, create a payment session targeting a registered device. Kustom dispatches it via push notification to the clerk's terminal instantly.","seo":{"title":"Create a Session"}},"lastModified":"2026-06-10T07:37:02.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/contents/checkout/in-person-payments/create-session","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}