{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/klarna/main/json-schema/klarna-shipping-service-response-schema.json", "title": "shipping_service_response", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/klarna-merchant-urls-address-update-api-openapi.yml#/components/schemas/shipping_service_response", "type": "object", "required": [ "order_amount", "order_lines", "order_tax_amount", "purchase_currency" ], "properties": { "order_amount": { "type": "integer", "format": "int64", "description": "Non-negative, minor units. Total total amount of the order, including tax and any discounts.", "minimum": 0 }, "order_tax_amount": { "type": "integer", "format": "int64", "description": "Non-negative, minor units. The total tax amount of the order.", "minimum": 0 }, "merchant_data": { "type": "string", "description": "Pass through field (max 1024 characters).", "minLength": 0, "maxLength": 1024 }, "order_lines": { "type": "array", "description": "The applicable order lines (max 1000)", "items": { "$ref": "#/$defs/order_line" }, "maxItems": 1000, "minItems": 0 }, "shipping_options": { "type": "array", "description": "A list of shipping options available for this order.", "items": { "$ref": "#/$defs/shipping_option" } }, "attachment": { "$ref": "#/$defs/attachment" }, "purchase_currency": { "type": "string", "description": "ISO 4217 purchase currency.", "pattern": "^[A-Za-z]{3,3}$" }, "locale": { "type": "string", "description": "RFC 1766 customer's locale.", "pattern": "^[A-Za-z]{2,2}(?:-[A-Za-z]{2,2})*$" }, "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" } }, "tags": { "type": "array", "description": "Extra information added to the order.\n\nExample: [\"dangerous_goods\", \"bulky\"]", "items": { "type": "string" } } }, "$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:

" }, "street_address": { "type": "string", "description": "Street address, first line. (Street name and number)" }, "street_address2": { "type": "string", "description": "Street address, second line. (Apartment number, suite, etc.)" }, "street_name": { "type": "string", "description": "Street name. Only applicable in DE/AT/NL. Do not combine with street_address. See streetNumber." }, "street_number": { "type": "string", "description": "Street number. Only applicable in DE/AT/NL. Do not combine with street_address. See streetName." }, "house_extension": { "type": "string", "description": "House extension. Only applicable in NL" }, "postal_code": { "type": "string", "description": "Postal/post code." }, "city": { "type": "string", "description": "City." }, "region": { "type": "string", "description": "State or Region." }, "phone": { "type": "string", "description": "Phone number." }, "country": { "type": "string", "description": "ISO 3166 alpha-2. Country." }, "care_of": { "type": "string", "description": "Care of." } } }, "attachment": { "type": "object", "required": [ "body", "content_type" ], "properties": { "body": { "type": "string", "description": "The content of the extra merchant data which should be presented as a string inside this property. The body should be an object containing any of the keys and sub objects described below serialised to JSON. More information on that object can be found [here](https://docs.klarna.com/api/extra-merchant-data/)." }, "content_type": { "type": "string", "description": "The content type of the body. It is usually represented as \"application/vnd.klarna.internal.emd-v2+json\"" } } }, "dimensions": { "type": "object", "properties": { "height": { "type": "integer", "format": "int64", "description": "The product's height as used in the merchant's webshop. Non-negative. Measured in millimeters." }, "width": { "type": "integer", "format": "int64", "description": "The product's width as used in the merchant's webshop. Non-negative. Measured in millimeters." }, "length": { "type": "integer", "format": "int64", "description": "The product's length as used in the merchant's webshop. Non-negative. Measured in millimeters." } } }, "order_line": { "type": "object", "required": [ "name", "quantity", "tax_rate", "total_amount", "total_tax_amount", "unit_price" ], "properties": { "type": { "type": "string", "description": "Type of the order line item. The possible values are:" }, "reference": { "type": "string", "description": "Article number, SKU or similar. (max 255 characters)", "minLength": 0, "maxLength": 255 }, "name": { "type": "string", "description": "Descriptive name of the order line item (max 255 characters)", "minLength": 1, "maxLength": 255 }, "quantity": { "type": "integer", "format": "int64", "description": "Non-negative number. Quantity of the order line item.", "minimum": 0 }, "subscription": { "$ref": "#/$defs/subscription" }, "quantity_unit": { "type": "string", "description": "Unit used to describe the quantity, e.g. kg, pcs... If defined has to be 1-8 characters" }, "unit_price": { "type": "integer", "format": "int64", "description": "Minor units. Includes tax, excludes discount. (max value: 100000000).\n\nExample: 100 Euros should be 10000.", "maximum": 100000000 }, "tax_rate": { "type": "integer", "format": "int64", "description": "Non-negative value. The percentage value is represented with two implicit decimals. (max 10000)\n\nExample: 25% should be 2500.", "maximum": 10000 }, "total_amount": { "type": "integer", "format": "int64", "description": "Minor units. Includes tax and discount. \n\nExample: 25 euros should be 2500\nValue = (quantity x unit_price) - total_discount_amount.\n(max value: 100000000)", "maximum": 100000000 }, "total_discount_amount": { "type": "integer", "format": "int64", "description": "Non-negative minor units. Includes tax.\n\nExample: 25 euros should be 2500", "minimum": 0 }, "total_tax_amount": { "type": "integer", "format": "int64", "description": "Must be within �1 of total_amount - total_amount \\* 10000 / (10000 + tax_rate). Negative when type is discount." }, "merchant_data": { "type": "string", "description": "Property used to store additional metadata per item that will be returned whenever an order is read from Klarna. Pass through field. (max 1024 characters).", "minLength": 0, "maxLength": 1024 }, "product_url": { "type": "string", "description": "URL to the product page that can be later embedded in communications between Klarna and the customer. (max 1024 characters)", "minLength": 0, "maxLength": 1024 }, "image_url": { "type": "string", "description": "URL to an image that can be later embedded in communications between Klarna and the customer. (max 1024 characters)\n\nImproves post-purchase customer experiences.", "minLength": 0, "maxLength": 1024 }, "product_identifiers": { "$ref": "#/$defs/product_identifiers" }, "shipping_attributes": { "$ref": "#/$defs/shipping_attributes" } } }, "payment_provider": { "type": "object", "required": [ "name", "redirect_url" ], "properties": { "name": { "type": "string", "description": "The name of the payment provider. (max 255 characters)", "minLength": 0, "maxLength": 255 }, "fee": { "type": "integer", "format": "int64", "description": "Minor units. Includes tax." }, "description": { "type": "string", "description": "Short description of the payment method. This is displayed below the selected payment method. (max 500 characters)", "minLength": 0, "maxLength": 500 }, "countries": { "type": "array", "description": "If specified, limits the method to the listed countries (alpha 2 codes).", "items": { "type": "string" } }, "label": { "type": "string", "description": "Controls label of buy button" }, "redirect_url": { "type": "string", "description": "URL to redirect to. (must be https, min 7, max 2000 characters)", "minLength": 7, "maxLength": 2000 }, "image_url": { "type": "string", "description": "URL to an image to display. (must be https, max 2000 characters)", "minLength": 0, "maxLength": 2000 } } }, "product_identifiers": { "type": "object", "properties": { "brand": { "type": "string", "description": "The product's brand name as generally recognized by consumers. If no brand is available for a product, do not supply any value.", "minLength": 0, "maxLength": 70 }, "color": { "type": "string", "description": "Color to be shown to the end customer (max 64 characters).", "minLength": 0, "maxLength": 64 }, "category_path": { "type": "string", "description": "The product's category path as used in the merchant's webshop. Include the full and most detailed category and separate the segments with ' > '. (max 750 characters)\n\nExample: \"Electronics Store > Computers & Tablets > Desktops\"", "minLength": 0, "maxLength": 750 }, "global_trade_item_number": { "type": "string", "description": "The product's Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. Exclude dashes and spaces, where possible", "minLength": 0, "maxLength": 50 }, "manufacturer_part_number": { "type": "string", "description": "The product's Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible", "minLength": 0, "maxLength": 70 }, "size": { "type": "string", "description": "Size to be shown to the end customer (max 64 characters).", "minLength": 0, "maxLength": 64 } } }, "selected_addon": { "type": "object", "properties": { "type": { "type": "string" }, "price": { "type": "integer", "format": "int64" }, "external_id": { "type": "string" }, "user_input": { "type": "string" } } }, "shipping_attributes": { "type": "object", "properties": { "weight": { "type": "integer", "format": "int64", "description": "The product's weight as used in the merchant's webshop. Non-negative. Measured in grams." }, "dimensions": { "$ref": "#/$defs/dimensions" }, "tags": { "type": "array", "description": "The product's extra features, example [\"dangerous_goods\", \"bulky\"]", "items": { "type": "string" } } } }, "shipping_option": { "type": "object", "required": [ "id", "name", "price", "tax_amount", "tax_rate" ], "properties": { "id": { "type": "string", "description": "id" }, "name": { "type": "string", "description": "Name.", "minLength": 1, "maxLength": 255 }, "description": { "type": "string", "description": "Description." }, "promo": { "type": "string", "description": "Promotion name. To be used if this shipping option is promotional." }, "price": { "type": "integer", "format": "int64", "description": "Price including tax." }, "preselected": { "type": "boolean", "description": "If true, this option will be preselected when checkout loads. Default: false" }, "tax_amount": { "type": "integer", "format": "int64", "description": "Tax amount." }, "tax_rate": { "type": "integer", "format": "int64", "description": "Non-negative. In percent, two implicit decimals. I.e 2500 = 25%." }, "shipping_method": { "type": "string", "description": "Shipping method. Possible values: If DHLPackstation is selected the correct form will be displayed." }, "delivery_details": { "$ref": "#/$defs/DeliveryDetailsV1" }, "tms_reference": { "type": "string", "description": "TMS reference. Required to map completed orders to shipments reserved in TMS." }, "selected_addons": { "type": "array", "items": { "$ref": "#/$defs/selected_addon" } } } }, "subscription": { "type": "object", "required": [ "interval", "interval_count" ], "properties": { "name": { "type": "string", "description": "The name of the subscription product.\n\nExample: \"Premium Account\"" }, "interval": { "type": "string", "description": "The cadence unit for this.\n\nExample: \"DAY\"", "enum": [ "DAY", "WEEK", "MONTH", "YEAR" ] }, "interval_count": { "type": "integer", "format": "int32", "description": "The number of intervals.\n\nExample: 30", "minimum": 1 } } } } }