{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-contents/checkout/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Migrating from Vipps Checkout to Kustom Checkout","description":"Explore our documentation and API and start integrating Kustom Checkout","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"migrating-from-vipps-checkout-to-kustom-checkout","__idx":0},"children":["Migrating from Vipps Checkout to Kustom Checkout"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide walks you through replacing a Vipps MobilePay Checkout integration with Kustom Checkout. It covers every call and data point you need to change, in the order you should change them."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Background:"]}," Kustom Checkout is the rebranded Klarna Checkout (KCO). If you previously integrated Klarna Checkout and are now also moving to Kustom-branded endpoints, see the note on base URLs in Step 2 — old ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*.klarna.com"]}," API credentials stopped working on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["March 31, 2026"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"at-a-glance","__idx":1},"children":["At a glance"]},{"$$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":"Dimension"},"children":["Dimension"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Vipps Checkout"},"children":["Vipps Checkout"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Kustom Checkout"},"children":["Kustom Checkout"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Auth method"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Multiple HTTP headers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTTP Basic Auth (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["username:password"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Base URL (test)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://apitest.vipps.no/checkout/v3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["See Merchant Portal for -regionspecific URL"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Base URL (prod)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.vipps.no/checkout/v3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.kustom.co/checkout/v3"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unit created"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reference"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create endpoint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /session"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /orders"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Read status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /session/{reference}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /orders/{order_id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /session/{reference}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /orders/{order_id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Abort"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session expires (1 h TTL)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /orders/{order_id}/abort"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Frontend"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Load SDK + init with token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Inject ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["html_snippet"]}," into DOM"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User redirect"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["returnUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.confirmation"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Server callback"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callbackUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.push"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Country / market"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Implied by MSN header"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase_country"]}," field"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Locale"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]}," param"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]}," field in order body"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order acknowledgment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/acknowledge"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Capture"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Via ePayment API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Via Order Management API"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1--replace-credentials-and-authentication","__idx":2},"children":["Step 1 — Replace credentials and authentication"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-header-based-authentication","__idx":3},"children":["Vipps: header-based authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Vipps requires five or more headers on every request:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"client_id: <your-client-id>\nclient_secret: <your-client-secret>\nOcp-Apim-Subscription-Key: <your-subscription-key>\nMerchant-Serial-Number: <your-msn>\nVipps-System-Name: <your-system-name>\nVipps-System-Version: 3.1.2\nVipps-System-Plugin-Name: <your-plugin-name>\nVipps-System-Plugin-Version: 4.5.6\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-http-basic-auth","__idx":4},"children":["Kustom: HTTP Basic Auth"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Kustom uses standard HTTP Basic Auth. Your credentials are a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["username"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["password"]}," tied to your Kustom Merchant ID."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Encode once and store as a constant\necho -n \"username:password\" | base64\n# pwhcueUff0MmwLShJiBE9JHA==\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Authorization: Basic pwhcueUff0MmwLShJiBE9JHA==\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Get your credentials"]}," from the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.kustom.co"},"children":["Kustom Merchant Portal"]},". Generate separate credentials for test and production — never share them."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What to change in your code:"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Remove all Vipps-specific headers from your HTTP client. Add a single ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: Basic <base64>"]}," header. If you set headers centrally in a middleware or HTTP client factory, this is a one-line change."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2--update-base-urls","__idx":5},"children":["Step 2 — Update base URLs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace the Vipps base URL with the Kustom base URL in your environment config."]},{"$$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":"Environment"},"children":["Environment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Vipps"},"children":["Vipps"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Kustom"},"children":["Kustom"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test (Playground)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://apitest.vipps.no/checkout/v3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.playground.kustom.co/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.vipps.no/checkout/v3"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.kustom.co/"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If you had a previous Klarna Checkout integration"]},", the old ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*.klarna.com"]}," production URLs are still active until ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["March 31, 2026"]},", but the Playground URL must be updated manually. Switch early to avoid disruptions."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3--replace-session-creation-with-order-creation","__idx":6},"children":["Step 3 — Replace session creation with order creation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is the largest change. The two payloads have different structures but map closely to each other."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-post-checkoutv3session","__idx":7},"children":["Vipps: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/session"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"merchantInfo\": {\n    \"callbackUrl\": \"https://example.com/checkout/callback\",\n    \"returnUrl\": \"https://example.com/checkout/result?ref={reference}\",\n    \"callbackAuthorizationToken\": \"538dd1d0-9e7f-4732-8134-dfed7fd0b236\"\n  },\n  \"transaction\": {\n    \"amount\": {\n      \"value\": 49900,\n      \"currency\": \"NOK\"\n    },\n    \"reference\": \"order-abc-123\",\n    \"paymentDescription\": \"Yellow T-Shirt × 5\",\n    \"orderSummary\": {\n      \"orderLines\": [\n        {\n          \"name\": \"Yellow T-Shirt\",\n          \"id\": \"SKU-001\",\n          \"totalAmount\": 49900,\n          \"totalAmountExcludingTax\": 39920,\n          \"totalTaxAmount\": 9980,\n          \"taxRate\": 2500,\n          \"unitInfo\": {\n            \"unitPrice\": 9980,\n            \"quantity\": \"5\",\n            \"quantityUnit\": \"PCS\"\n          },\n          \"discount\": 0,\n          \"productUrl\": \"https://example.com/products/yellow-tshirt\",\n          \"isReturn\": false,\n          \"isShipping\": false\n        },\n        {\n          \"name\": \"Standard delivery\",\n          \"id\": \"shipping-01\",\n          \"totalAmount\": 5000,\n          \"totalAmountExcludingTax\": 5000,\n          \"totalTaxAmount\": 0,\n          \"taxRate\": 0,\n          \"discount\": 0,\n          \"isReturn\": false,\n          \"isShipping\": true\n        }\n      ],\n      \"orderBottomLine\": {\n        \"currency\": \"NOK\"\n      }\n    }\n  },\n  \"configuration\": {\n    \"elements\": \"PaymentAndContactInfo\",\n    \"showOrderSummary\": true\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"token\": \"eyJhbGciOiJSUzI1...\",\n  \"checkoutFrontendUrl\": \"https://checkout.vipps.no/?token=eyJ...\",\n  \"pollingUrl\": \"https://api.vipps.no/checkout/v3/session/order-abc-123\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-post-checkoutv3orders","__idx":8},"children":["Kustom: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/orders"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"purchase_country\": \"NO\",\n  \"purchase_currency\": \"NOK\",\n  \"locale\": \"nb-NO\",\n  \"order_amount\": 54900,\n  \"order_tax_amount\": 9980,\n  \"order_lines\": [\n    {\n      \"type\": \"physical\",\n      \"reference\": \"SKU-001\",\n      \"name\": \"Yellow T-Shirt\",\n      \"quantity\": 5,\n      \"quantity_unit\": \"pcs\",\n      \"unit_price\": 9980,\n      \"tax_rate\": 2500,\n      \"total_amount\": 49900,\n      \"total_discount_amount\": 0,\n      \"total_tax_amount\": 9980\n    },\n    {\n      \"type\": \"shipping_fee\",\n      \"reference\": \"shipping-01\",\n      \"name\": \"Standard delivery\",\n      \"quantity\": 1,\n      \"quantity_unit\": \"pcs\",\n      \"unit_price\": 5000,\n      \"tax_rate\": 0,\n      \"total_amount\": 5000,\n      \"total_discount_amount\": 0,\n      \"total_tax_amount\": 0\n    }\n  ],\n  \"merchant_urls\": {\n    \"terms\": \"https://example.com/terms\",\n    \"checkout\": \"https://example.com/checkout?kustom_order_id={checkout.order.id}\",\n    \"confirmation\": \"https://example.com/confirmation?kustom_order_id={checkout.order.id}\",\n    \"push\": \"https://example.com/api/kustom/push?kustom_order_id={checkout.order.id}\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"order_id\": \"8cf27b55-53e8-6aba-9fb4-7c692e56ddee\",\n  \"status\": \"checkout_incomplete\",\n  \"purchase_country\": \"NO\",\n  \"purchase_currency\": \"NOK\",\n  \"locale\": \"nb-NO\",\n  \"order_amount\": 54900,\n  \"order_tax_amount\": 9980,\n  \"order_lines\": [...],\n  \"merchant_urls\": {...},\n  \"html_snippet\": \"<div id=\\\"klarna-checkout-container\\\">...</div>\",\n  \"options\": {\n    \"allow_separate_shipping_address\": false,\n    \"date_of_birth_mandatory\": false,\n    \"require_validate_callback_success\": false\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Store the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," — you will need it for all subsequent operations."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"field-mapping-reference","__idx":9},"children":["Field mapping reference"]},{"$$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":"Vipps field"},"children":["Vipps field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Kustom field"},"children":["Kustom field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction.amount.value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sum of all ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].total_amount"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction.amount.currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase_currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 4217"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(implied by MSN)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase_country"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO 3166-1 alpha-2"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(SDK param)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BCP 47, e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nb-NO"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["en-GB"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction.reference"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not a request field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom generates ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," in response"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transaction.paymentDescription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not a direct field"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].name"]}," for line descriptions"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantInfo.callbackUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.push"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Push = server-to-server notification"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantInfo.returnUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.confirmation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User browser redirect on success"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantInfo.callbackAuthorizationToken"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not used"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom does not send an auth token in push calls"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].reference"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your SKU or line identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].totalAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].total_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Minor units (integers)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].totalAmountExcludingTax"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(derived)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total_amount - total_tax_amount"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].totalTaxAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].total_tax_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Minor units"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].taxRate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].tax_rate"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Basis points (2500 = 25%)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].unitInfo.unitPrice"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].unit_price"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Minor units"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].unitInfo.quantity"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].quantity"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom is an integer, not a string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].unitInfo.quantityUnit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].quantity_unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pcs"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].isShipping: true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].type: \"shipping_fee\""]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kustom uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," instead of a flag"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].isReturn: true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Handled via Order Management API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credit/return flow is separate in Kustom"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].discount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].total_discount_amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Minor units"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["orderSummary.orderLines[].productUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(no direct field in basic payload)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Can be set via Order Management API"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"order_linestype-values","__idx":10},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].type"]}," values"]},{"$$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":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Use for"},"children":["Use for"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["physical"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tangible goods"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["digital"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Digital products / downloads"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shipping_fee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shipping / delivery charges"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sales_tax"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tax line (if itemised separately)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["discount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order-level discount"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["store_credit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credit applied to the order"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gift_card"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gift card redemption"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4--replace-the-frontend-rendering","__idx":11},"children":["Step 4 — Replace the frontend rendering"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-load-sdk-and-initialise","__idx":12},"children":["Vipps: load SDK and initialise"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<!-- 1. Load the SDK -->\n<script src=\"https://checkout.vipps.no/vippsCheckoutSDK.js\"></script>\n\n<!-- 2. Container div -->\n<div id=\"vipps-checkout-frame\"></div>\n\n<script>\n  // 3. Initialise with token and container\n  const checkout = VippsCheckout({\n    checkoutFrontendUrl: \"https://checkout.vipps.no/?token=eyJ...\",\n    iFrameContainerId: \"vipps-checkout-frame\",\n    token: \"eyJhbGciOiJSUzI1...\",\n    language: \"nb\",  // \"nb\" | \"dk\" | \"fi\" | \"en\"\n    on: {\n      session_status_changed: (data) => {\n        if (data.sessionState === \"PaymentSuccessful\") {\n          window.location.href = \"/order-confirmation\";\n        }\n      }\n    }\n  });\n</script>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-inject-the-html_snippet","__idx":13},"children":["Kustom: inject the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["html_snippet"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<!-- Container div -->\n<div id=\"kustom-checkout-container\"></div>\n\n<script>\n  // Inject the html_snippet returned by POST /checkout/v3/orders\n  // Do this server-side, or pass it to the frontend securely\n  const htmlSnippet = \"<div id=\\\"klarna-checkout-container\\\">...</div>\";\n  document.getElementById(\"kustom-checkout-container\").innerHTML = htmlSnippet;\n\n  // Re-execute any scripts embedded in the snippet\n  const scripts = document\n    .getElementById(\"kustom-checkout-container\")\n    .querySelectorAll(\"script\");\n  scripts.forEach((s) => {\n    const newScript = document.createElement(\"script\");\n    newScript.text = s.text;\n    document.head.appendChild(newScript);\n  });\n</script>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Kustom manages its own iframe lifecycle via the injected snippet. You do not load a separate SDK. The Kustom widget will redirect the user to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.confirmation"]}," on successful payment."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What to remove:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<script src=\"...vippsCheckoutSDK.js\">"]}," tag, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VippsCheckout(...)"]}," call, and any SDK event listeners."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5--update-your-server-side-callback-handler","__idx":14},"children":["Step 5 — Update your server-side callback handler"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-callback-receives-the-full-session-payload","__idx":15},"children":["Vipps: callback receives the full session payload"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Vipps POSTs to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callbackUrl"]}," when the session reaches a terminal state. It includes your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callbackAuthorizationToken"]}," as the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST https://example.com/checkout/callback\nAuthorization: 538dd1d0-9e7f-4732-8134-dfed7fd0b236\nContent-Type: application/json\n"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"sessionState\": \"PaymentSuccessful\",\n  \"reference\": \"order-abc-123\",\n  \"paymentMethod\": \"Card\",\n  \"paymentDetails\": {\n    \"state\": \"AUTHORIZED\",\n    \"amount\": { \"value\": 54900, \"currency\": \"NOK\" }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Respond with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP 200"]},". Vipps retries up to 3 times with exponential backoff on non-2xx responses."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-push-notification--mandatory-acknowledgment","__idx":16},"children":["Kustom: push notification + mandatory acknowledgment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Kustom GETs your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.push"]}," URL when the order is completed. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," is appended as a query parameter."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"GET https://example.com/api/kustom/push?kustom_order_id=8cf27b55-53e8-6aba-9fb4-7c692e56ddee\n"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The push is a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GET"]},", not a POST. There is no authorization header. Treat it as a trigger to fetch order state yourself."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Your push handler should:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Extract ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kustom_order_id"]}," from the query string."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fetch the completed order from the Order Management API."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create the order in your system."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Acknowledge the order"]}," (mandatory — Kustom will not release funds without this)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP 200"]},"."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Step 2 — fetch order\nGET https://api.kustom.co/ordermanagement/v1/orders/{order_id}\nAuthorization: Basic <base64>\n\n# Step 4 — acknowledge\nPOST https://api.kustom.co/ordermanagement/v1/orders/{order_id}/acknowledge\nAuthorization: Basic <base64>\nKlarna-Idempotency-Key: <your-internal-order-reference>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Klarna-Idempotency-Key"]}," is required. Use your own internal order reference. It guarantees the operation is idempotent and is stored as an alternate order identifier in Kustom."]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Important:"]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.confirmation"]}," URL (user redirect) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.push"]}," URL (server notification) both include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{checkout.order.id}"]}," template placeholder. Kustom substitutes the real ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," before calling them. Use this instead of a session cookie to look up the order."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-6--update-order-status-polling","__idx":17},"children":["Step 6 — Update order status polling"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps","__idx":18},"children":["Vipps"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"GET https://api.vipps.no/checkout/v3/session/{reference}\nclient_id: ...\nclient_secret: ...\nOcp-Apim-Subscription-Key: ...\nMerchant-Serial-Number: ...\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Response — check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]},":"]},{"$$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":"sessionState"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionState"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionCreated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session is active, awaiting payment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentInitiated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User has started payment"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSuccessful"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment authorised ✓"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentTerminated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment failed / cancelled"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionExpired"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session TTL (1 h) exceeded"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom","__idx":19},"children":["Kustom"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"GET https://api.kustom.co/checkout/v3/orders/{order_id}\nAuthorization: Basic <base64>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Response — check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},":"]},{"$$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":"status"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout_incomplete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order active, user in checkout"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout_complete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payment authorised ✓"]}]},{"$$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":["Order acknowledged and created"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-7--update-order-modifications","__idx":20},"children":["Step 7 — Update order modifications"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You may need to update the order while the user is still in the checkout (e.g., after they select a shipping option)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-lock-the-sdk-then-patch","__idx":21},"children":["Vipps: lock the SDK, then PATCH"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"// 1. Lock the SDK to pause user interaction\nawait checkout.lock();\n\n// 2. PATCH the session\nawait fetch(`https://api.vipps.no/checkout/v3/session/${reference}`, {\n  method: \"PATCH\",\n  headers: { /* Vipps auth headers */ },\n  body: JSON.stringify({\n    transaction: {\n      amount: { value: newTotal, currency: \"NOK\" }\n    }\n  })\n});\n\n// 3. Unlock\nawait checkout.unlock();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-post-to-the-order","__idx":22},"children":["Kustom: POST to the order"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"POST https://api.kustom.co/checkout/v3/orders/{order_id}\nAuthorization: Basic <base64>\nContent-Type: application/json\n\n{\n  \"order_amount\": 59900,\n  \"order_tax_amount\": 10980,\n  \"order_lines\": [ ... ]\n}\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can only update an order while ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status === \"checkout_incomplete\""]},". Kustom's iframe refreshes automatically after a successful update — no SDK lock/unlock is needed."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-8--update-capture-and-post-payment-operations","__idx":23},"children":["Step 8 — Update capture and post-payment operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-capture-via-the-epayment-api","__idx":24},"children":["Vipps: capture via the ePayment API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After the session reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSuccessful"]},", funds are reserved. You capture via the ePayment API using the session ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reference"]}," as the payment reference."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"POST https://api.vipps.no/epayment/v1/payments/{reference}/capture\nAuthorization: Bearer <access-token>\nOcp-Apim-Subscription-Key: ...\nMerchant-Serial-Number: ...\nContent-Type: application/json\n\n{\n  \"modificationAmount\": {\n    \"value\": 54900,\n    \"currency\": \"NOK\"\n  }\n}\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-capture-via-the-order-management-api","__idx":25},"children":["Kustom: capture via the Order Management API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After acknowledgment, capture via the Order Management API using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"POST https://api.kustom.co/ordermanagement/v1/orders/{order_id}/captures\nAuthorization: Basic <base64>\nKlarna-Idempotency-Key: <capture-reference>\nContent-Type: application/json\n\n{\n  \"captured_amount\": 54900,\n  \"capture_tax_amount\": 9980,\n  \"description\": \"Shipped order #12345\",\n  \"order_lines\": [ ... ]\n}\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"other-order-management-operations","__idx":26},"children":["Other Order Management operations"]},{"$$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":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Vipps"},"children":["Vipps"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Kustom"},"children":["Kustom"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /epayment/v1/payments/{ref}/cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/cancel"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Refund"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /epayment/v1/payments/{ref}/refund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/refunds"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Read order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /checkout/v3/session/{ref}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /ordermanagement/v1/orders/{id}"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-9--handle-the-confirmation-page","__idx":27},"children":["Step 9 — Handle the confirmation page"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"vipps-1","__idx":28},"children":["Vipps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The user is redirected to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["returnUrl"]},". Use the reference you chose at session creation to look up the order in your system."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"kustom-1","__idx":29},"children":["Kustom"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The user is redirected to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant_urls.confirmation"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?kustom_order_id={checkout.order.id}"]}," appended. Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kustom_order_id"]}," query parameter to look up the order."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"// Express.js example\napp.get(\"/confirmation\", async (req, res) => {\n  const orderId = req.query.kustom_order_id;\n\n  // Fetch the completed order from Kustom\n  const order = await fetch(\n    `https://api.kustom.co/checkout/v3/orders/${orderId}`,\n    { headers: { Authorization: `Basic ${KUSTOM_CREDENTIALS}` } }\n  ).then((r) => r.json());\n\n  res.render(\"confirmation\", { order });\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-before-and-after","__idx":30},"children":["Complete before and after"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"before-vipps","__idx":31},"children":["Before (Vipps)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1. Create session\ncurl -X POST https://api.vipps.no/checkout/v3/session \\\n  -H \"Content-Type: application/json\" \\\n  -H \"client_id: $VIPPS_CLIENT_ID\" \\\n  -H \"client_secret: $VIPPS_CLIENT_SECRET\" \\\n  -H \"Ocp-Apim-Subscription-Key: $VIPPS_SUB_KEY\" \\\n  -H \"Merchant-Serial-Number: $VIPPS_MSN\" \\\n  -d '{\n    \"merchantInfo\": {\n      \"callbackUrl\": \"https://example.com/vipps/callback\",\n      \"returnUrl\": \"https://example.com/vipps/result\",\n      \"callbackAuthorizationToken\": \"secret-token\"\n    },\n    \"transaction\": {\n      \"amount\": { \"value\": 54900, \"currency\": \"NOK\" },\n      \"reference\": \"order-abc-123\",\n      \"paymentDescription\": \"Your order\"\n    }\n  }'\n\n# 2. Poll for status\ncurl https://api.vipps.no/checkout/v3/session/order-abc-123 \\\n  -H \"client_id: $VIPPS_CLIENT_ID\" \\\n  -H \"client_secret: $VIPPS_CLIENT_SECRET\" \\\n  -H \"Ocp-Apim-Subscription-Key: $VIPPS_SUB_KEY\" \\\n  -H \"Merchant-Serial-Number: $VIPPS_MSN\"\n\n# 3. Capture (via ePayment API)\ncurl -X POST https://api.vipps.no/epayment/v1/payments/order-abc-123/capture \\\n  -H \"Authorization: Bearer $ACCESS_TOKEN\" \\\n  -H \"Ocp-Apim-Subscription-Key: $VIPPS_SUB_KEY\" \\\n  -H \"Merchant-Serial-Number: $VIPPS_MSN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ \"modificationAmount\": { \"value\": 54900, \"currency\": \"NOK\" } }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"after-kustom","__idx":32},"children":["After (Kustom)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"KUSTOM_AUTH=\"Basic $(echo -n \"$KUSTOM_USER:$KUSTOM_PASS\" | base64)\"\n\n# 1. Create order\ncurl -X POST https://api.kustom.co/checkout/v3/orders \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: $KUSTOM_AUTH\" \\\n  -d '{\n    \"purchase_country\": \"NO\",\n    \"purchase_currency\": \"NOK\",\n    \"locale\": \"nb-NO\",\n    \"order_amount\": 54900,\n    \"order_tax_amount\": 9980,\n    \"order_lines\": [\n      {\n        \"type\": \"physical\",\n        \"reference\": \"SKU-001\",\n        \"name\": \"Your product\",\n        \"quantity\": 1,\n        \"quantity_unit\": \"pcs\",\n        \"unit_price\": 49900,\n        \"tax_rate\": 2500,\n        \"total_amount\": 49900,\n        \"total_discount_amount\": 0,\n        \"total_tax_amount\": 9980\n      },\n      {\n        \"type\": \"shipping_fee\",\n        \"reference\": \"shipping-01\",\n        \"name\": \"Standard delivery\",\n        \"quantity\": 1,\n        \"quantity_unit\": \"pcs\",\n        \"unit_price\": 5000,\n        \"tax_rate\": 0,\n        \"total_amount\": 5000,\n        \"total_discount_amount\": 0,\n        \"total_tax_amount\": 0\n      }\n    ],\n    \"merchant_urls\": {\n      \"terms\": \"https://example.com/terms\",\n      \"checkout\": \"https://example.com/checkout?kustom_order_id={checkout.order.id}\",\n      \"confirmation\": \"https://example.com/confirmation?kustom_order_id={checkout.order.id}\",\n      \"push\": \"https://example.com/api/kustom/push?kustom_order_id={checkout.order.id}\"\n    }\n  }'\n# → returns order_id and html_snippet\n\n# 2. Poll for status\ncurl https://api.kustom.co/checkout/v3/orders/$ORDER_ID \\\n  -H \"Authorization: $KUSTOM_AUTH\"\n\n# 3. Acknowledge (mandatory after payment)\ncurl -X POST https://api.kustom.co/ordermanagement/v1/orders/$ORDER_ID/acknowledge \\\n  -H \"Authorization: $KUSTOM_AUTH\" \\\n  -H \"Klarna-Idempotency-Key: internal-ref-12345\"\n\n# 4. Capture\ncurl -X POST https://api.kustom.co/ordermanagement/v1/orders/$ORDER_ID/captures \\\n  -H \"Authorization: $KUSTOM_AUTH\" \\\n  -H \"Klarna-Idempotency-Key: capture-ref-12345\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"captured_amount\": 54900,\n    \"capture_tax_amount\": 9980,\n    \"description\": \"Shipped\",\n    \"order_lines\": [ ... ]\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-gotchas","__idx":33},"children":["Common gotchas"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Amount validation fails"]}," ","Kustom validates that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_amount"]}," equals the sum of all ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_lines[].total_amount"]},". If these do not match, order creation returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},". Double-check rounding in your line totals."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order not released by Kustom"]}," ","Kustom holds the payment until you acknowledge the order. If you do not POST to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/ordermanagement/v1/orders/{id}/acknowledge"]},", the payment stays in limbo and eventually times out."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Push URL returning 403"]}," ","Some WAF or ModSecurity rules block Kustom's push requests because Kustom sends ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["APIs-Kustom"]}," as the User-Agent header (not a browser user agent). Add an exception in your WAF for this User-Agent, or for your push endpoint path."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Order update rejected"]}," ","You can only update a Kustom order while ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status === \"checkout_incomplete\""]},". If the user has already started payment, the update will fail. Check status before attempting updates."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shipping as an order line"]}," ","Vipps uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isShipping: true"]}," to flag a shipping line. Kustom uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"shipping_fee\""]},". If you set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type: \"physical\""]}," for a shipping line, it will display and calculate incorrectly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quantity"]}," type difference"]}," ","In Vipps, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unitInfo.quantity"]}," is a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["string"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"5\""]},"). In Kustom, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["quantity"]}," is an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["integer"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5"]},"). Passing a string to Kustom will cause a validation error."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["No ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["callbackAuthorizationToken"]}," equivalent"]}," ","Vipps lets you pass a secret token that it sends back in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header of callbacks. Kustom does not support this. If you need to verify that a push notification came from Kustom, validate the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order_id"]}," against your database — if a matching pending order exists, it is legitimate."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Locale format"]}," ","Vipps accepts short locale codes (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"nb\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"en\""]},"). Kustom requires full BCP 47 locale codes (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"nb-NO\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"en-GB\""]},")."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"endpoint-summary","__idx":34},"children":["Endpoint summary"]},{"$$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":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Vipps"},"children":["Vipps"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Kustom"},"children":["Kustom"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create session / order"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/session"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/orders"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Read status"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /checkout/v3/session/{ref}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /checkout/v3/orders/{id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Update"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATCH /checkout/v3/session/{ref}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/orders/{id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Abort"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(session expires)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /checkout/v3/orders/{id}/abort"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Acknowledge"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(not required)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/acknowledge"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Capture"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /epayment/v1/payments/{ref}/capture"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/captures"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT /epayment/v1/payments/{ref}/cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/cancel"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Refund"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /epayment/v1/payments/{ref}/refund"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /ordermanagement/v1/orders/{id}/refunds"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"further-reading","__idx":35},"children":["Further reading"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.kustom.co/contents/api/checkout.md"},"children":["Kustom Checkout API reference"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.kustom.co/contents/api/order-management"},"children":["Kustom Order Management API"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.kustom.co/contents/checkout/integrate-kco-in-your-ecommerce/create-order"},"children":["Kustom: create an order (integration guide)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://docs.kustom.co/contents/checkout/additional-resources/confirm-purchase.md"},"children":["Kustom: confirm purchase"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developer.vippsmobilepay.com/docs/APIs/checkout-api/checkout-api-guide/"},"children":["Vipps Checkout API guide"]}]}]}]},"headings":[{"value":"Migrating from Vipps Checkout to Kustom Checkout","id":"migrating-from-vipps-checkout-to-kustom-checkout","depth":1},{"value":"At a glance","id":"at-a-glance","depth":2},{"value":"Step 1 — Replace credentials and authentication","id":"step-1--replace-credentials-and-authentication","depth":2},{"value":"Vipps: header-based authentication","id":"vipps-header-based-authentication","depth":3},{"value":"Kustom: HTTP Basic Auth","id":"kustom-http-basic-auth","depth":3},{"value":"Step 2 — Update base URLs","id":"step-2--update-base-urls","depth":2},{"value":"Step 3 — Replace session creation with order creation","id":"step-3--replace-session-creation-with-order-creation","depth":2},{"value":"Vipps: POST /checkout/v3/session","id":"vipps-post-checkoutv3session","depth":3},{"value":"Kustom: POST /checkout/v3/orders","id":"kustom-post-checkoutv3orders","depth":3},{"value":"Field mapping reference","id":"field-mapping-reference","depth":3},{"value":"order_lines[].type values","id":"order_linestype-values","depth":4},{"value":"Step 4 — Replace the frontend rendering","id":"step-4--replace-the-frontend-rendering","depth":2},{"value":"Vipps: load SDK and initialise","id":"vipps-load-sdk-and-initialise","depth":3},{"value":"Kustom: inject the html_snippet","id":"kustom-inject-the-html_snippet","depth":3},{"value":"Step 5 — Update your server-side callback handler","id":"step-5--update-your-server-side-callback-handler","depth":2},{"value":"Vipps: callback receives the full session payload","id":"vipps-callback-receives-the-full-session-payload","depth":3},{"value":"Kustom: push notification + mandatory acknowledgment","id":"kustom-push-notification--mandatory-acknowledgment","depth":3},{"value":"Step 6 — Update order status polling","id":"step-6--update-order-status-polling","depth":2},{"value":"Vipps","id":"vipps","depth":3},{"value":"Kustom","id":"kustom","depth":3},{"value":"Step 7 — Update order modifications","id":"step-7--update-order-modifications","depth":2},{"value":"Vipps: lock the SDK, then PATCH","id":"vipps-lock-the-sdk-then-patch","depth":3},{"value":"Kustom: POST to the order","id":"kustom-post-to-the-order","depth":3},{"value":"Step 8 — Update capture and post-payment operations","id":"step-8--update-capture-and-post-payment-operations","depth":2},{"value":"Vipps: capture via the ePayment API","id":"vipps-capture-via-the-epayment-api","depth":3},{"value":"Kustom: capture via the Order Management API","id":"kustom-capture-via-the-order-management-api","depth":3},{"value":"Other Order Management operations","id":"other-order-management-operations","depth":3},{"value":"Step 9 — Handle the confirmation page","id":"step-9--handle-the-confirmation-page","depth":2},{"value":"Vipps","id":"vipps-1","depth":3},{"value":"Kustom","id":"kustom-1","depth":3},{"value":"Complete before and after","id":"complete-before-and-after","depth":2},{"value":"Before (Vipps)","id":"before-vipps","depth":3},{"value":"After (Kustom)","id":"after-kustom","depth":3},{"value":"Common gotchas","id":"common-gotchas","depth":2},{"value":"Endpoint summary","id":"endpoint-summary","depth":2},{"value":"Further reading","id":"further-reading","depth":2}],"frontmatter":{"seo":{"title":"Migrating from Vipps Checkout to Kustom Checkout"}},"lastModified":"2026-04-09T12:59:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/contents/checkout/guides/vipps-checkout-to-kustom-checkout","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}