{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/klarna/main/json-schema/klarna-order-schema.json", "title": "order", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/klarna-checkout-api-openapi.yml#/components/schemas/order", "type": "object", "required": [ "locale", "order_amount", "order_lines", "order_tax_amount", "purchase_country", "purchase_currency" ], "properties": { "order_id": { "type": "string", "description": "Unique order ID that will be used for the entire lifecycle of the order. (max 255 characters)", "readOnly": true }, "name": { "type": "string", "description": "The merchant name (max 255 characters).", "readOnly": true }, "purchase_country": { "type": "string", "description": "The purchase country of the merchant's store. The format to be used is ISO 3166 alpha-2. Eg: GB, SE, DE, US, etc. \n\nNote: purchase country and currency need to match the defined merchant configuration. For global configuration see more details [here](https://docs.klarna.com/kco/use-cases/selling-to-multiple-countries/)", "pattern": "^[A-Za-z]{2,2}$" }, "purchase_currency": { "type": "string", "description": "The purchase currency of the merchant's store. The format to be used is ISO 4217. Eg: USD, EUR, SEK, GBP, etc.\n\nNote: purchase country and currency need to match the defined merchant configuration. For global configuration see more details [here](https://docs.klarna.com/kco/use-cases/selling-to-multiple-countries/)", "pattern": "^[A-Za-z]{3,3}$" }, "locale": { "type": "string", "description": "Used to define the language and region of the customer. RFC 1766 customer's locale.", "pattern": "^[A-Za-z]{2,2}(?:-[A-Za-z]{2,2})*$" }, "status": { "type": "string", "description": "The current status of the order. The status will be incomplete until the customer has been successfully authorized." }, "billing_address": { "$ref": "#/$defs/address" }, "shipping_address": { "$ref": "#/$defs/address" }, "order_amount": { "type": "integer", "format": "int64", "description": "Total amount of the order including tax and any available discounts. The value should be in non-negative minor units.\n\nExample: 25 Euros should be 2500.", "minimum": 0 }, "order_tax_amount": { "type": "integer", "format": "int64", "description": "Total tax amount of the order. The value should be in non-negative minor units.\n\nExample: 25 Euros should be 2500.", "minimum": 0 }, "order_lines": { "type": "array", "description": "An array containing list of line items that are part of this order. Maximum of 1000 line items could be processed in a single order.", "items": { "$ref": "#/$defs/order_line" }, "maxItems": 1000, "minItems": 0 }, "customer": { "$ref": "#/$defs/customer" }, "merchant_urls": { "$ref": "#/$defs/merchant_urls" }, "html_snippet": { "type": "string", "description": "The HTML snippet that is used to render the checkout in an iframe.", "readOnly": true }, "merchant_reference1": { "type": "string", "description": "Used for storing merchant's internal order number or other reference. If set, will be shown on the confirmation page as \"order number\" . The value is also available in the settlement files. (max 255 characters).\nExample: \"45aa52f387871e3a210645d4\"", "minLength": 0, "maxLength": 255 }, "merchant_reference2": { "type": "string", "description": "Used for storing merchant's internal order number or other reference. The value is available in the settlement files. (max 255 characters).\nExample: \"45aa52f387871e3a210645d4\"", "minLength": 0, "maxLength": 255 }, "started_at": { "type": "string", "format": "date-time", "description": "ISO 8601 datetime. The date and time when the order has been created. The format will be as follows:\n\"yyyy-mm-ddThh:mm:ssZ\"", "readOnly": true }, "completed_at": { "type": "string", "format": "date-time", "description": "ISO 8601 datetime. The date and time when the order has been completed. The format will be as follows:\n\"yyyy-mm-ddThh:mm:ssZ\"", "readOnly": true }, "last_modified_at": { "type": "string", "format": "date-time", "description": "ISO 8601 datetime. The date and time when the order was last modified. The format will be as follows:\n\"yyyy-mm-ddThh:mm:ssZ\"", "readOnly": true }, "options": { "$ref": "#/$defs/options" }, "attachment": { "$ref": "#/$defs/attachment" }, "external_payment_methods": { "type": "array", "description": "List of external payment methods that will be displayed as part of payment methods in the checkout.", "items": { "$ref": "#/$defs/payment_provider" } }, "external_checkouts": { "type": "array", "description": "List of external checkouts that will be displayed as part of payment methods in the checkout.\nThe image_url is required, and the image size has to be 276x48px", "items": { "$ref": "#/$defs/payment_provider" } }, "shipping_countries": { "type": "array", "description": "List of allowed shipping countries for this order in ISO-3166 alpha-2 format.\n\nIf specified, the customer will be able to change the shipping country in the checkout and you will be notified through address_update callback or the shipping_address_change javascript event. \n\nIf not specified then the default value will be the purchase country.\n\nExample: look at billing_countries example.", "items": { "type": "string" } }, "shipping_options": { "type": "array", "description": "A list of shipping options available for this order.", "items": { "$ref": "#/$defs/shipping_option" } }, "merchant_data": { "type": "string", "description": "Pass through field to send any information about the order to be used later for reference while retrieving the order details (max 6000 characters).", "minLength": 0, "maxLength": 6000 }, "gui": { "$ref": "#/$defs/gui" }, "merchant_requested": { "$ref": "#/$defs/merchant_requested" }, "selected_shipping_option": { "$ref": "#/$defs/shipping_option" }, "recurring": { "type": "boolean", "description": "Indicates whether this purchase will create a token that can be used by the merchant to create recurring purchases. This must be enabled for the merchant to use. Default: false\n\nDepending on specified country, recurring could be used for the following payment methods: Pay Later, Direct Debit, Card." }, "recurring_token": { "type": "string", "description": "Token to be used when creating recurring orders.", "readOnly": true }, "recurring_description": { "type": "string", "description": "Description to be added to the recurring order.", "readOnly": true, "minLength": 0, "maxLength": 255 }, "billing_countries": { "type": "array", "description": "List of allowed billing countries for this order.\nIf specified, the customer will be able to change the billing country in the checkout and you will be notified through country_change callback or the billing_address_change javascript event.\nIf not specified but shipping_countries is specified, will use same values as shipping_countries.\nIf not specified and shipping_countries is not specified, then the default value will be the purchase country.\n\nExample: [\"AD\", \"AE\", \"AG\", \"AI\", \"AL\", \"AM\", \"AQ\", \"AR\", \"AS\", \"AT\", \"AU\", \"AW\", \"AX\", \"AZ\", \"BA\", \"BB\", \"BD\", \"BE\", \"BF\", \"BG\", \"BH\", \"BJ\", \"BL\", \"BM\", \"BN\", \"BO\", \"BQ\", \"BR\", \"BS\", \"BT\", \"BW\", \"BY\", \"BZ\", \"CA\", \"CF\", \"CH\", \"CI\", \"CK\", \"CL\", \"CM\", \"CN\", \"CO\", \"CR\", \"CU\", \"CV\", \"CW\", \"CX\", \"CY\", \"CZ\", \"DE\", \"DJ\", \"DK\", \"DM\", \"DO\", \"DZ\", \"EC\", \"EE\", \"EG\", \"ER\", \"ES\", \"ET\", \"FI\", \"FJ\", \"FK\", \"FM\", \"FO\", \"FR\", \"GA\", \"GB\", \"GD\", \"GE\", \"GF\", \"GG\", \"GH\", \"GI\", \"GL\", \"GM\", \"GN\", \"GP\", \"GR\", \"GS\", \"GT\", \"GU\", \"GY\", \"HK\", \"HN\", \"HR\", \"HU\", \"ID\", \"IE\", \"IL\", \"IM\", \"IN\", \"IS\", \"IT\", \"JE\", \"JM\", \"JO\", \"JP\", \"KE\", \"KG\", \"KI\", \"KM\", \"KN\", \"KR\", \"KW\", \"KY\", \"KZ\", \"LA\", \"LA\", \"LB\", \"LC\", \"LI\", \"LK\", \"LR\", \"LS\", \"LT\", \"LU\", \"LV\", \"MA\", \"MC\", \"MD\", \"ME\", \"MF\", \"MG\", \"MH\", \"MK\", \"MK\", \"ML\", \"MM\", \"MN\", \"MO\", \"MP\", \"MQ\", \"MR\", \"MT\", \"MU\", \"MV\", \"MW\", \"MX\", \"MY\", \"MZ\", \"NA\", \"NC\", \"NE\", \"NF\", \"NG\", \"NI\", \"NL\", \"NO\", \"NP\", \"NR\", \"NU\", \"NZ\", \"OM\", \"PA\", \"PE\", \"PF\", \"PG\", \"PH\", \"PK\", \"PL\", \"PM\", \"PR\", \"PS\", \"PT\", \"PW\", \"PY\", \"QA\", \"RE\", \"RO\", \"RS\", \"RU\", \"RW\", \"SA\", \"SB\", \"SC\", \"SE\", \"SG\", \"SH\", \"SI\", \"SJ\", \"SK\", \"SL\", \"SM\", \"SN\", \"SR\", \"ST\", \"SV\", \"SX\", \"SZ\", \"TC\", \"TF\", \"TG\", \"TH\", \"TJ\", \"TK\", \"TL\", \"TO\", \"TR\", \"TT\", \"TV\", \"TW\", \"TZ\", \"UA\", \"UG\", \"UM\", \"US\", \"UY\", \"UZ\", \"VA\", \"VC\", \"VG\", \"VI\", \"VN\", \"VU\", \"WF\", \"WS\", \"XK\", \"YT\", \"ZA\", \"ZM\", \"ZW\"]\"", "items": { "type": "string" } }, "tags": { "type": "array", "description": "Extra information added to the order.\n\nExample: [\"dangerous_goods\", \"bulky\"]", "items": { "type": "string" } }, "discount_lines": { "type": "array", "description": "List of discounts applied to this order via the KCO discount-service", "items": { "$ref": "#/$defs/discount_line" } } }, "$defs": { "DeliveryDetailsV1": { "type": "object", "properties": { "carrier": { "type": "string", "description": "Carrier product name" }, "class": { "type": "string", "description": "Type of shipping class" }, "product": { "$ref": "#/$defs/ProductV1" }, "timeslot": { "$ref": "#/$defs/TimeslotV1" }, "pickup_location": { "$ref": "#/$defs/PickupLocationV1" } } }, "PickupLocationV1": { "type": "object", "properties": { "id": { "type": "string", "description": "Id" }, "name": { "type": "string", "description": "Name of the location" }, "address": { "$ref": "#/$defs/address" } } }, "ProductV1": { "type": "object", "properties": { "name": { "type": "string", "description": "Carrier product name" }, "identifier": { "type": "string", "description": "Carrier product identifier" } } }, "TimeslotV1": { "type": "object", "properties": { "id": { "type": "string", "description": "Id" }, "start": { "type": "string", "description": "Start time" }, "end": { "type": "string", "description": "End time" } } }, "address": { "type": "object", "properties": { "given_name": { "type": "string", "description": "Given name." }, "family_name": { "type": "string", "description": "Family name." }, "email": { "type": "string", "description": "E-mail address." }, "title": { "type": "string", "description": "Title.
Valid values for UK:
Valid values for DACH:
Valid values for NL: