{"title":"Specifying invoice lines and discounts","category":"default","creationDate":1756968660,"content":"<p>When making Klarna payments, you need to specify price and product information when:<\/p>\n<ul>\n<li><a href=\"#payment-request\">Making a payment request<\/a>.<\/li>\n<li><a href=\"#partial-capture\">Making a partial capture request<\/a>.<\/li>\n<li><a href=\"#partial-refund\">Making a partial refund request<\/a>.<\/li>\n<li><a href=\"#discount-lines\">Applying a discount<\/a>.<\/li>\n<li><a href=\"#adjust-auth\">Adjusting an authorization<\/a>.<\/li>\n<\/ul>\n<h2 id=\"payment-request\">Make a payment request<\/h2>\n<p>For any payment request, include price and product information in  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>.<\/p>\n<p>When adding price and product information, note that:<\/p>\n<ul>\n<li>Klarna will only approve the payment if the total amount specified in <code>lineItems<\/code> matches the <code>amount.value<\/code>.<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>lineItems<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-quantity\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.quantity<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The number of items.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-amountExcludingTax\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.amountExcludingTax<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The price for one item, without the tax, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxPercentage\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxPercentage<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The tax percentage, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-description\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.description<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The description of the line item.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-id\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.id<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The ID of the line item.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxAmount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxAmount<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The tax amount for one item, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-amountIncludingTax\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.amountIncludingTax<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The price for one item, with the tax amount included, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-productUrl\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.productUrl<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Link to the purchased item.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-imageUrl\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.imageUrl<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Link to the picture of the purchased item.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Line items in a payments request'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"amount\\\":{\\n      \\\"currency\\\":\\\"EUR\\\",\\n      \\\"value\\\":\\\"1000\\\"\\n   },\\n   \\\"lineItems\\\":[\\n      {\\n         \\\"quantity\\\":\\\"1\\\",\\n         \\\"amountExcludingTax\\\":\\\"331\\\",\\n         \\\"taxPercentage\\\":\\\"2100\\\",\\n         \\\"description\\\":\\\"Shoes\\\",\\n         \\\"id\\\":\\\"Item #1\\\",\\n         \\\"taxAmount\\\":\\\"69\\\",\\n         \\\"amountIncludingTax\\\":\\\"400\\\",\\n         \\\"productUrl\\\": \\\"URL_TO_PURCHASED_ITEM\\\",\\n         \\\"imageUrl\\\": \\\"URL_TO_PICTURE_OF_PURCHASED_ITEM\\\"\\n      },\\n      {\\n         \\\"quantity\\\":\\\"2\\\",\\n         \\\"amountExcludingTax\\\":\\\"248\\\",\\n         \\\"taxPercentage\\\":\\\"2100\\\",\\n         \\\"description\\\":\\\"Socks\\\",\\n         \\\"id\\\":\\\"Item #2\\\",\\n         \\\"taxAmount\\\":\\\"52\\\",\\n         \\\"amountIncludingTax\\\":\\\"300\\\",\\n         \\\"productUrl\\\": \\\"URL_TO_PURCHASED_ITEM\\\",\\n         \\\"imageUrl\\\": \\\"URL_TO_PICTURE_OF_PURCHASED_ITEM\\\"\\n      }\\n   ]\\n...\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"partial-capture\">Make a partial capture request<\/h2>\n<p>Include the following <code>lineItems<\/code> parameters when making a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/captures<\/a> request.<\/p>\n<table>\n<thead>\n<tr>\n<th>lineItems<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-quantity\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.quantity<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The number of items.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-amountExcludingTax\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.amountExcludingTax<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The price for one item, without the tax, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxPercentage\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxPercentage<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The tax percentage, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxAmount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxAmount<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The tax amount for one item, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-description\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.description<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The description of the line item.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Line items in partial capture request'\" :id=\"'payments-partial-capture'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/{paymentPspReference}\\\/captures \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_CAPTURE_REFERENCE\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: \\&quot;7400\\&quot;,\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;lineItems\\&quot;: [\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: \\&quot;3058\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;taxAmount\\&quot;: \\&quot;642\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Socks\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;3700\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    },\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: \\&quot;3058\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;taxAmount\\&quot;: \\&quot;642\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;3700\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    }\\n  ]\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You will receive a response containing a <code>pspReference<\/code>. Once we have processed your request, you will also receive a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/CAPTURE\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">CAPTURE<\/a> webhook.<\/p>\n<h2 id=\"partial-refund\">Make a partial refund request<\/h2>\n<p>Include the following <code>lineItems<\/code> parameters when making a POST request to the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/refunds<\/a> endpoint, where <code>paymentPspReference<\/code> is the <code>pspReference<\/code> of the authorization you want to refund.<\/p>\n<table>\n<thead>\n<tr>\n<th>lineItems<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-quantity\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.quantity<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The number of items.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-amountExcludingTax\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.amountExcludingTax<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The price for one item, without the tax, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxPercentage\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxPercentage<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The tax percentage, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-taxAmount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.taxAmount<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The tax amount for one item, in minor units.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems-description\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.description<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The description of the line item.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Line items in partial refund request'\" :id=\"'payments-partial-refund'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/{paymentPspReference}\\\/refunds \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_REFUND_REFERENCE\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: \\&quot;7400\\&quot;,\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;lineItems\\&quot;: [\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: \\&quot;3058\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;taxAmount\\&quot;: \\&quot;642\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Socks\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;3700\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    },\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: \\&quot;3058\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;taxAmount\\&quot;: \\&quot;642\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;3700\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    }\\n  ]\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You will receive a response containing a <code>pspReference<\/code>. Once we have processed your request, you will also receive a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/REFUND\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">REFUND<\/a> webhook.<\/p>\n<h2 id=\"discount-lines\">Apply a discount<\/h2>\n<p>There are several ways to apply a discount to the invoice:<\/p>\n<ul>\n<li><a href=\"#discounted-amounts\">Apply a discount to individual line items<\/a>.<\/li>\n<li><a href=\"#discount-line-incl-vat\">Apply a discount to the whole purchase<\/a>.<\/li>\n<li><a href=\"#no-discount-line\">Let Adyen add a discount line for you<\/a>. This is the fallback option in case the other methods do not work for you.<\/li>\n<\/ul>\n<p>The examples below apply a 30% discount to the shopper's basket, which contains:<\/p>\n<ul>\n<li>One pair of shoes, original price EUR&nbsp;12.00 including 20% VAT<\/li>\n<li>Two pairs of socks, original price EUR&nbsp;4.50 including 20% VAT<\/li>\n<\/ul>\n<h3 id=\"discounted-amounts\">Apply a discount to individual line items<\/h3>\n<p>With this method of applying a discount, you reduce the cost of the applicable line items instead of discounting the basket as a whole. To apply a discount to individual line items:<\/p>\n<ol>\n<li>Calculate the reduced amount of each line item you want to discount.<\/li>\n<li>Send a payment request in which each line item specifies the discounted amounts:\n<ul>\n<li><code>amountExcludingTax<\/code><\/li>\n<li><code>taxAmount<\/code><\/li>\n<li><code>amountIncludingTax<\/code><\/li>\n<\/ul><\/li>\n<\/ol>\n<table>\n    <caption>Sample basket with discounts applied to individual items<\/caption>\n    <thead>\n        <tr>\n            <th>Product<\/th>\n            <th>Quantity<\/th>\n            <th>Item Price (EUR)<\/th>\n            <th>VAT (EUR)<\/th>\n            <th>Total price (EUR)<\/th>\n        <\/tr>\n    <\/thead>\n    <tbody>\n        <tr>\n            <td>Shoes (with 30% discount)<\/td>\n            <td style=\"text-align:right\">1<\/td>\n            <td style=\"text-align:right\">7,00<\/td>\n            <td style=\"text-align:right\">1,40<\/td>\n            <td style=\"text-align:right\">8,40<\/td>\n        <\/tr>\n        <tr>\n            <td>Socks (with 30% discount)<\/td>\n            <td style=\"text-align:right\">2<\/td>\n            <td style=\"text-align:right\">2,63<\/td>\n            <td style=\"text-align:right\">0,52<\/td>\n            <td style=\"text-align:right\">6,30<\/td>\n        <\/tr>\n        <tr>\n            <td>Purchase amount<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">12,26<\/td>\n        <\/tr>\n        <tr>\n            <td>VAT<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">2,44<\/td>\n        <\/tr>\n        <tr>\n            <td>TOTAL<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">14,70<\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Apply discount to individual line items'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"amount\\\" : {\\n    \\\"currency\\\" : \\\"EUR\\\",\\n    \\\"value\\\" : \\\"1470\\\"\\n  },\\n  \\\"lineItems\\\" : [\\n    {\\n      \\\"quantity\\\" : \\\"1\\\",\\n      \\\"amountExcludingTax\\\" : \\\"700\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Shoes (with discount)\\\",\\n      \\\"id\\\" : \\\"Item #1\\\",\\n      \\\"taxAmount\\\" : \\\"140\\\",\\n      \\\"amountIncludingTax\\\" : \\\"840\\\"\\n    },\\n    {\\n      \\\"quantity\\\" : \\\"2\\\",\\n      \\\"amountExcludingTax\\\" : \\\"263\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Socks (with discount)\\\",\\n      \\\"id\\\" : \\\"Item #2\\\",\\n      \\\"taxAmount\\\" : \\\"52\\\",\\n      \\\"amountIncludingTax\\\" : \\\"315\\\"\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"discount-line-incl-vat\">Apply a discount to the whole purchase<\/h3>\n<p>With this method of applying a discount, you specify the line items with their original price and then apply a discount to the basket as a whole by adding a discount line.<\/p>\n<p>To apply a discount to the entire basket:<\/p>\n<ol>\n<li>Calculate the discount to the product total and the VAT.<\/li>\n<li>In your payments request, send each fully priced line item, plus a line Item to specify the discount with the following parameters:\n<ul>\n<li><code>id<\/code>: <span translate=\"no\"><strong>Discount<\/strong><\/span><\/li>\n<li><code>description<\/code>: <span translate=\"no\"><strong>Discount<\/strong><\/span><\/li>\n<li><code>amountExcludingTax<\/code>: The discount amount, preceded by a minus sign<\/li>\n<li><code>taxAmount<\/code>: The discount amount, preceded by a minus sign<\/li>\n<li><code>amountIncludingTax<\/code>: The discount amount, preceded by a minus sign<\/li>\n<\/ul><\/li>\n<\/ol>\n<table>\n    <caption>Sample basket with a discount applied to the entire basket<\/caption>\n    <thead>\n        <tr>\n            <th>Product<\/th>\n            <th>Quantity<\/th>\n            <th>Item Price (EUR)<\/th>\n            <th>VAT (EUR)<\/th>\n            <th>Total price (EUR)<\/th>\n        <\/tr>\n    <\/thead>\n    <tbody>\n        <tr>\n            <td>Shoes<\/td>\n            <td style=\"text-align:right\">1<\/td>\n            <td style=\"text-align:right\">10,00<\/td>\n            <td style=\"text-align:right\">2,00<\/td>\n            <td style=\"text-align:right\">12,00<\/td>\n        <\/tr>\n        <tr>\n            <td>Socks<\/td>\n            <td style=\"text-align:right\">2<\/td>\n            <td style=\"text-align:right\">3,75<\/td>\n            <td style=\"text-align:right\">0,75<\/td>\n            <td style=\"text-align:right\">9,00<\/td>\n        <\/tr>\n        <tr>\n            <td>Total before discount<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">21,00<\/td>\n        <\/tr>\n        <tr>\n            <td>Product discount<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">5,25<\/td>\n        <\/tr>\n        <tr>\n            <td>VAT discount<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">1,05<\/td>\n        <\/tr>\n        <tr>\n            <td>Total discount (30%)<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">6,30<\/td>\n        <\/tr>\n        <tr>\n            <td>TOTAL<\/td>\n            <td colspan=\"4\" style=\"text-align:right\">14,70<\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Apply discount to entire purchase'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"amount\\\" : {\\n    \\\"currency\\\" : \\\"EUR\\\",\\n    \\\"value\\\" : \\\"1470\\\"\\n  },\\n  \\\"lineItems\\\" : [\\n    {\\n      \\\"quantity\\\" : \\\"1\\\",\\n      \\\"amountExcludingTax\\\" : \\\"1000\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Shoes\\\",\\n      \\\"id\\\" : \\\"Item #1\\\",\\n      \\\"taxAmount\\\" : \\\"200\\\",\\n      \\\"amountIncludingTax\\\" : \\\"1200\\\"\\n    },\\n    {\\n      \\\"quantity\\\" : \\\"2\\\",\\n      \\\"amountExcludingTax\\\" : \\\"375\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Socks\\\",\\n      \\\"id\\\" : \\\"Item #2\\\",\\n      \\\"taxAmount\\\" : \\\"75\\\",\\n      \\\"amountIncludingTax\\\" : \\\"450\\\"\\n    },\\n    \\\/\\\/ The following line item specifies the discount\\n    {\\n      \\\"quantity\\\" : \\\"1\\\",\\n      \\\"amountExcludingTax\\\" : \\\"-525\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Discount\\\",\\n      \\\"id\\\" : \\\"Discount\\\",\\n      \\\"taxAmount\\\" : \\\"-105\\\",\\n      \\\"amountIncludingTax\\\" : \\\"-630\\\"\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"no-discount-line\">Let Adyen add a discount line for you<\/h3>\n<p>With this method of applying a discount, Adyen calculates that <code>amount.value<\/code> is less than the total value of the line items, so a discount must have been applied. In this case, Adyen adds a line item for the discount before sending to Klarna.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Adyen applies discount line'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"amount\\\" : {\\n    \\\"currency\\\" : \\\"EUR\\\",\\n    \\\"value\\\" : \\\"1470\\\"\\n  },\\n  \\\"lineItems\\\" : [\\n    {\\n      \\\"quantity\\\" : \\\"1\\\",\\n      \\\"amountExcludingTax\\\" : \\\"1000\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Shoes\\\",\\n      \\\"id\\\" : \\\"Item #1\\\",\\n      \\\"taxAmount\\\" : \\\"200\\\",\\n      \\\"amountIncludingTax\\\" : \\\"1200\\\"\\n    },\\n    {\\n      \\\"quantity\\\" : \\\"2\\\",\\n      \\\"amountExcludingTax\\\" : \\\"375\\\",\\n      \\\"taxPercentage\\\" : \\\"2000\\\",\\n      \\\"description\\\" : \\\"Socks\\\",\\n      \\\"id\\\" : \\\"Item #2\\\",\\n      \\\"taxAmount\\\" : \\\"75\\\",\\n      \\\"amountIncludingTax\\\" : \\\"450\\\"\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Adjust an authorization<\/h2>\n<p>If you want to adjust an authorized payment that has not yet been fully captured, your API request must specify all captured and refunded <code>lineItems<\/code>. See <a href=\"\/pt\/online-payments\/adjust-authorisation\/adjust-with-preauth\" target=\"_blank\">Adjust an authorization<\/a> for detailed instructions. This is available for Klarna with Checkout API v70 and later.<\/p>\n<p>Below are two examples of adjusting an authorized payment:<\/p>\n<ul>\n<li><a href=\"#cancel-before-capture\">Cancel part of the authorization before capture<\/a><\/li>\n<li><a href=\"#add-product-partial-capture\">Add a new product to a partially captured order<\/a><\/li>\n<\/ul>\n<p>These examples are based on the following order:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'klarna-sessions'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v70\\\/sessions \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;SEK\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperLocale\\&quot;: \\&quot;en_US\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;SE\\&quot;,\\n  \\&quot;telephoneNumber\\&quot;: \\&quot;+46 840 839 298\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;youremail@email.com\\&quot;,\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Testperson-se\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Approved\\&quot;\\n  },\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;billingAddress\\&quot;: {\\n    \\&quot;city\\&quot;: \\&quot;Ankeborg\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;SE\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;12345\\&quot;,\\n    \\&quot;street\\&quot;: \\&quot;Stargatan\\&quot;\\n  },\\n  \\&quot;deliveryAddress\\&quot;: {\\n    \\&quot;city\\&quot;: \\&quot;Ankeborg\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;SE\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;12345\\&quot;,\\n    \\&quot;street\\&quot;: \\&quot;Stargatan\\&quot;\\n  },\\n  \\&quot;dateOfBirth\\&quot;: \\&quot;1996-09-04\\&quot;,\\n  \\&quot;socialSecurityNumber\\&quot;: \\&quot;0108\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;lineItems\\&quot;: [\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;400\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    },\\n    {\\n      \\&quot;quantity\\&quot;: \\&quot;2\\&quot;,\\n      \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n      \\&quot;description\\&quot;: \\&quot;Socks\\&quot;,\\n      \\&quot;id\\&quot;: \\&quot;Item #2\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: \\&quot;300\\&quot;,\\n      \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n      \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n    }\\n  ]\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;SEK\\&quot;)\\n  .value(1000L);\\n\\nLineItem lineItem1 = new LineItem()\\n  .quantity(1L)\\n  .taxPercentage(2100L)\\n  .imageUrl(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;)\\n  .description(\\&quot;Shoes\\&quot;)\\n  .id(\\&quot;Item #1\\&quot;)\\n  .amountIncludingTax(400L)\\n  .productUrl(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;);\\n\\nLineItem lineItem2 = new LineItem()\\n  .quantity(2L)\\n  .taxPercentage(2100L)\\n  .imageUrl(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;)\\n  .description(\\&quot;Socks\\&quot;)\\n  .id(\\&quot;Item #2\\&quot;)\\n  .amountIncludingTax(300L)\\n  .productUrl(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;);\\n\\nName name = new Name()\\n  .firstName(\\&quot;Testperson-se\\&quot;)\\n  .lastName(\\&quot;Approved\\&quot;);\\n\\nDeliveryAddress deliveryAddress = new DeliveryAddress()\\n  .country(\\&quot;SE\\&quot;)\\n  .city(\\&quot;Ankeborg\\&quot;)\\n  .houseNumberOrName(\\&quot;1\\&quot;)\\n  .street(\\&quot;Stargatan\\&quot;)\\n  .postalCode(\\&quot;12345\\&quot;);\\n\\nBillingAddress billingAddress = new BillingAddress()\\n  .country(\\&quot;SE\\&quot;)\\n  .city(\\&quot;Ankeborg\\&quot;)\\n  .houseNumberOrName(\\&quot;1\\&quot;)\\n  .street(\\&quot;Stargatan\\&quot;)\\n  .postalCode(\\&quot;12345\\&quot;);\\n\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\n  .amount(amount)\\n  .telephoneNumber(\\&quot;+46 840 839 298\\&quot;)\\n  .socialSecurityNumber(\\&quot;0108\\&quot;)\\n  .shopperEmail(\\&quot;youremail@email.com\\&quot;)\\n  .reference(\\&quot;YOUR_ORDER_REFERENCE\\&quot;)\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\n  .shopperName(name)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .deliveryAddress(deliveryAddress)\\n  .countryCode(\\&quot;SE\\&quot;)\\n  .shopperLocale(\\&quot;en_US\\&quot;)\\n  .billingAddress(billingAddress)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  .shopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nCreateCheckoutSessionResponse response = service.sessions(createCheckoutSessionRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\LineItem;\\nuse Adyen\\\\Model\\\\Checkout\\\\Name;\\nuse Adyen\\\\Model\\\\Checkout\\\\DeliveryAddress;\\nuse Adyen\\\\Model\\\\Checkout\\\\BillingAddress;\\nuse Adyen\\\\Model\\\\Checkout\\\\CreateCheckoutSessionRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;SEK\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$lineItem1 = new LineItem();\\n$lineItem1\\n  -&gt;setQuantity(1)\\n  -&gt;setTaxPercentage(2100)\\n  -&gt;setImageUrl(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;)\\n  -&gt;setDescription(\\&quot;Shoes\\&quot;)\\n  -&gt;setId(\\&quot;Item #1\\&quot;)\\n  -&gt;setAmountIncludingTax(400)\\n  -&gt;setProductUrl(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;);\\n\\n$lineItem2 = new LineItem();\\n$lineItem2\\n  -&gt;setQuantity(2)\\n  -&gt;setTaxPercentage(2100)\\n  -&gt;setImageUrl(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;)\\n  -&gt;setDescription(\\&quot;Socks\\&quot;)\\n  -&gt;setId(\\&quot;Item #2\\&quot;)\\n  -&gt;setAmountIncludingTax(300)\\n  -&gt;setProductUrl(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;);\\n\\n$name = new Name();\\n$name\\n  -&gt;setFirstName(\\&quot;Testperson-se\\&quot;)\\n  -&gt;setLastName(\\&quot;Approved\\&quot;);\\n\\n$deliveryAddress = new DeliveryAddress();\\n$deliveryAddress\\n  -&gt;setCountry(\\&quot;SE\\&quot;)\\n  -&gt;setCity(\\&quot;Ankeborg\\&quot;)\\n  -&gt;setHouseNumberOrName(\\&quot;1\\&quot;)\\n  -&gt;setStreet(\\&quot;Stargatan\\&quot;)\\n  -&gt;setPostalCode(\\&quot;12345\\&quot;);\\n\\n$billingAddress = new BillingAddress();\\n$billingAddress\\n  -&gt;setCountry(\\&quot;SE\\&quot;)\\n  -&gt;setCity(\\&quot;Ankeborg\\&quot;)\\n  -&gt;setHouseNumberOrName(\\&quot;1\\&quot;)\\n  -&gt;setStreet(\\&quot;Stargatan\\&quot;)\\n  -&gt;setPostalCode(\\&quot;12345\\&quot;);\\n\\n$createCheckoutSessionRequest = new CreateCheckoutSessionRequest();\\n$createCheckoutSessionRequest\\n  -&gt;setAmount($amount)\\n  -&gt;setTelephoneNumber(\\&quot;+46 840 839 298\\&quot;)\\n  -&gt;setSocialSecurityNumber(\\&quot;0108\\&quot;)\\n  -&gt;setShopperEmail(\\&quot;youremail@email.com\\&quot;)\\n  -&gt;setReference(\\&quot;YOUR_ORDER_REFERENCE\\&quot;)\\n  -&gt;setLineItems(array($lineItem1, $lineItem2))\\n  -&gt;setShopperName($name)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setDeliveryAddress($deliveryAddress)\\n  -&gt;setCountryCode(\\&quot;SE\\&quot;)\\n  -&gt;setShopperLocale(\\&quot;en_US\\&quot;)\\n  -&gt;setBillingAddress($billingAddress)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  -&gt;setShopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;sessions($createCheckoutSessionRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;SEK\\&quot;,\\n  Value = 1000\\n};\\n\\nLineItem lineItem1 = new LineItem\\n{\\n  Quantity = 1,\\n  TaxPercentage = 2100,\\n  ImageUrl = \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;,\\n  Description = \\&quot;Shoes\\&quot;,\\n  Id = \\&quot;Item #1\\&quot;,\\n  AmountIncludingTax = 400,\\n  ProductUrl = \\&quot;URL_TO_PURCHASED_ITEM\\&quot;\\n};\\n\\nLineItem lineItem2 = new LineItem\\n{\\n  Quantity = 2,\\n  TaxPercentage = 2100,\\n  ImageUrl = \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;,\\n  Description = \\&quot;Socks\\&quot;,\\n  Id = \\&quot;Item #2\\&quot;,\\n  AmountIncludingTax = 300,\\n  ProductUrl = \\&quot;URL_TO_PURCHASED_ITEM\\&quot;\\n};\\n\\nName name = new Name\\n{\\n  FirstName = \\&quot;Testperson-se\\&quot;,\\n  LastName = \\&quot;Approved\\&quot;\\n};\\n\\nDeliveryAddress deliveryAddress = new DeliveryAddress\\n{\\n  Country = \\&quot;SE\\&quot;,\\n  City = \\&quot;Ankeborg\\&quot;,\\n  HouseNumberOrName = \\&quot;1\\&quot;,\\n  Street = \\&quot;Stargatan\\&quot;,\\n  PostalCode = \\&quot;12345\\&quot;\\n};\\n\\nBillingAddress billingAddress = new BillingAddress\\n{\\n  Country = \\&quot;SE\\&quot;,\\n  City = \\&quot;Ankeborg\\&quot;,\\n  HouseNumberOrName = \\&quot;1\\&quot;,\\n  Street = \\&quot;Stargatan\\&quot;,\\n  PostalCode = \\&quot;12345\\&quot;\\n};\\n\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest\\n{\\n  Amount = amount,\\n  TelephoneNumber = \\&quot;+46 840 839 298\\&quot;,\\n  SocialSecurityNumber = \\&quot;0108\\&quot;,\\n  ShopperEmail = \\&quot;youremail@email.com\\&quot;,\\n  Reference = \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  LineItems = new List&lt;LineItem&gt;{ lineItem1, lineItem2 },\\n  ShopperName = name,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  DeliveryAddress = deliveryAddress,\\n  CountryCode = \\&quot;SE\\&quot;,\\n  ShopperLocale = \\&quot;en_US\\&quot;,\\n  BillingAddress = billingAddress,\\n  AdditionalData = new Dictionary&lt;string, string&gt;\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference = \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Sessions(createCheckoutSessionRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst createCheckoutSessionRequest = {\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  amount: {\\n    currency: \\&quot;SEK\\&quot;,\\n    value: 1000\\n  },\\n  shopperLocale: \\&quot;en_US\\&quot;,\\n  countryCode: \\&quot;SE\\&quot;,\\n  telephoneNumber: \\&quot;+46 840 839 298\\&quot;,\\n  shopperEmail: \\&quot;youremail@email.com\\&quot;,\\n  shopperName: {\\n    firstName: \\&quot;Testperson-se\\&quot;,\\n    lastName: \\&quot;Approved\\&quot;\\n  },\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  billingAddress: {\\n    city: \\&quot;Ankeborg\\&quot;,\\n    country: \\&quot;SE\\&quot;,\\n    houseNumberOrName: \\&quot;1\\&quot;,\\n    postalCode: \\&quot;12345\\&quot;,\\n    street: \\&quot;Stargatan\\&quot;\\n  },\\n  deliveryAddress: {\\n    city: \\&quot;Ankeborg\\&quot;,\\n    country: \\&quot;SE\\&quot;,\\n    houseNumberOrName: \\&quot;1\\&quot;,\\n    postalCode: \\&quot;12345\\&quot;,\\n    street: \\&quot;Stargatan\\&quot;\\n  },\\n  dateOfBirth: new Date(\\&quot;1996-09-04\\&quot;),\\n  socialSecurityNumber: \\&quot;0108\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  lineItems: [ {\\n    quantity: \\&quot;1\\&quot;,\\n    taxPercentage: \\&quot;2100\\&quot;,\\n    description: \\&quot;Shoes\\&quot;,\\n    id: \\&quot;Item #1\\&quot;,\\n    amountIncludingTax: \\&quot;400\\&quot;,\\n    productUrl: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n    imageUrl: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n  }, {\\n    quantity: \\&quot;2\\&quot;,\\n    taxPercentage: \\&quot;2100\\&quot;,\\n    description: \\&quot;Socks\\&quot;,\\n    id: \\&quot;Item #2\\&quot;,\\n    amountIncludingTax: \\&quot;300\\&quot;,\\n    productUrl: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n    imageUrl: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n  } ],\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := checkout.Amount{\\n  Currency: \\&quot;SEK\\&quot;,\\n  Value: 1000,\\n}\\n\\nlineItem1 := checkout.LineItem{\\n  Quantity: common.PtrInt64(1),\\n  TaxPercentage: common.PtrInt64(2100),\\n  ImageUrl: common.PtrString(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;),\\n  Description: common.PtrString(\\&quot;Shoes\\&quot;),\\n  Id: common.PtrString(\\&quot;Item #1\\&quot;),\\n  AmountIncludingTax: common.PtrInt64(400),\\n  ProductUrl: common.PtrString(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;),\\n}\\n\\nlineItem2 := checkout.LineItem{\\n  Quantity: common.PtrInt64(2),\\n  TaxPercentage: common.PtrInt64(2100),\\n  ImageUrl: common.PtrString(\\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;),\\n  Description: common.PtrString(\\&quot;Socks\\&quot;),\\n  Id: common.PtrString(\\&quot;Item #2\\&quot;),\\n  AmountIncludingTax: common.PtrInt64(300),\\n  ProductUrl: common.PtrString(\\&quot;URL_TO_PURCHASED_ITEM\\&quot;),\\n}\\n\\nname := checkout.Name{\\n  FirstName: \\&quot;Testperson-se\\&quot;,\\n  LastName: \\&quot;Approved\\&quot;,\\n}\\n\\ndeliveryAddress := checkout.DeliveryAddress{\\n  Country: \\&quot;SE\\&quot;,\\n  City: \\&quot;Ankeborg\\&quot;,\\n  HouseNumberOrName: \\&quot;1\\&quot;,\\n  Street: \\&quot;Stargatan\\&quot;,\\n  PostalCode: \\&quot;12345\\&quot;,\\n}\\n\\nbillingAddress := checkout.BillingAddress{\\n  Country: \\&quot;SE\\&quot;,\\n  City: \\&quot;Ankeborg\\&quot;,\\n  HouseNumberOrName: \\&quot;1\\&quot;,\\n  Street: \\&quot;Stargatan\\&quot;,\\n  PostalCode: \\&quot;12345\\&quot;,\\n}\\n\\ncreateCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{\\n  Amount: amount,\\n  TelephoneNumber: common.PtrString(\\&quot;+46 840 839 298\\&quot;),\\n  SocialSecurityNumber: common.PtrString(\\&quot;0108\\&quot;),\\n  ShopperEmail: common.PtrString(\\&quot;youremail@email.com\\&quot;),\\n  Reference: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  LineItems: []checkout.LineItem{\\n      lineItem1, lineItem2,\\n  },\\n  ShopperName: &amp;name,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  DeliveryAddress: &amp;deliveryAddress,\\n  CountryCode: common.PtrString(\\&quot;SE\\&quot;),\\n  ShopperLocale: common.PtrString(\\&quot;en_US\\&quot;),\\n  BillingAddress: &amp;billingAddress,\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference: common.PtrString(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.SessionsInput().IdempotencyKey(\\&quot;UUID\\&quot;).CreateCheckoutSessionRequest(createCheckoutSessionRequest)\\nres, httpRes, err := service.PaymentsApi.Sessions(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;SEK\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperLocale\\&quot;: \\&quot;en_US\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;SE\\&quot;,\\n  \\&quot;telephoneNumber\\&quot;: \\&quot;+46 840 839 298\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;youremail@email.com\\&quot;,\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Testperson-se\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Approved\\&quot;\\n  },\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;billingAddress\\&quot;: {\\n    \\&quot;city\\&quot;: \\&quot;Ankeborg\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;SE\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;12345\\&quot;,\\n    \\&quot;street\\&quot;: \\&quot;Stargatan\\&quot;\\n  },\\n  \\&quot;deliveryAddress\\&quot;: {\\n    \\&quot;city\\&quot;: \\&quot;Ankeborg\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;SE\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;12345\\&quot;,\\n    \\&quot;street\\&quot;: \\&quot;Stargatan\\&quot;\\n  },\\n  \\&quot;dateOfBirth\\&quot;: \\&quot;1996-09-04\\&quot;,\\n  \\&quot;socialSecurityNumber\\&quot;: \\&quot;0108\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;lineItems\\&quot;: [ {\\n    \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n    \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n    \\&quot;amountIncludingTax\\&quot;: \\&quot;400\\&quot;,\\n    \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n    \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n  }, {\\n    \\&quot;quantity\\&quot;: \\&quot;2\\&quot;,\\n    \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;Socks\\&quot;,\\n    \\&quot;id\\&quot;: \\&quot;Item #2\\&quot;,\\n    \\&quot;amountIncludingTax\\&quot;: \\&quot;300\\&quot;,\\n    \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n    \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n  } ]\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.sessions(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_REFERENCE',\\n  :amount =&gt; {\\n    :currency =&gt; 'SEK',\\n    :value =&gt; 1000\\n  },\\n  :shopperLocale =&gt; 'en_US',\\n  :countryCode =&gt; 'SE',\\n  :telephoneNumber =&gt; '+46 840 839 298',\\n  :shopperEmail =&gt; 'youremail@email.com',\\n  :shopperName =&gt; {\\n    :firstName =&gt; 'Testperson-se',\\n    :lastName =&gt; 'Approved'\\n  },\\n  :shopperReference =&gt; 'YOUR_UNIQUE_SHOPPER_ID',\\n  :billingAddress =&gt; {\\n    :city =&gt; 'Ankeborg',\\n    :country =&gt; 'SE',\\n    :houseNumberOrName =&gt; '1',\\n    :postalCode =&gt; '12345',\\n    :street =&gt; 'Stargatan'\\n  },\\n  :deliveryAddress =&gt; {\\n    :city =&gt; 'Ankeborg',\\n    :country =&gt; 'SE',\\n    :houseNumberOrName =&gt; '1',\\n    :postalCode =&gt; '12345',\\n    :street =&gt; 'Stargatan'\\n  },\\n  :dateOfBirth =&gt; '1996-09-04',\\n  :socialSecurityNumber =&gt; '0108',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..',\\n  :lineItems =&gt; [ {\\n    :quantity =&gt; '1',\\n    :taxPercentage =&gt; '2100',\\n    :description =&gt; 'Shoes',\\n    :id =&gt; 'Item #1',\\n    :amountIncludingTax =&gt; '400',\\n    :productUrl =&gt; 'URL_TO_PURCHASED_ITEM',\\n    :imageUrl =&gt; 'URL_TO_PICTURE_OF_PURCHASED_ITEM'\\n  }, {\\n    :quantity =&gt; '2',\\n    :taxPercentage =&gt; '2100',\\n    :description =&gt; 'Socks',\\n    :id =&gt; 'Item #2',\\n    :amountIncludingTax =&gt; '300',\\n    :productUrl =&gt; 'URL_TO_PURCHASED_ITEM',\\n    :imageUrl =&gt; 'URL_TO_PICTURE_OF_PURCHASED_ITEM'\\n  } ]\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.sessions(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;SEK\\&quot;,\\n  value: 1000\\n};\\n\\nconst lineItem1: Types.checkout.LineItem = {\\n  quantity: 1,\\n  taxPercentage: 2100,\\n  imageUrl: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;,\\n  description: \\&quot;Shoes\\&quot;,\\n  id: \\&quot;Item #1\\&quot;,\\n  amountIncludingTax: 400,\\n  productUrl: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;\\n};\\n\\nconst lineItem2: Types.checkout.LineItem = {\\n  quantity: 2,\\n  taxPercentage: 2100,\\n  imageUrl: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;,\\n  description: \\&quot;Socks\\&quot;,\\n  id: \\&quot;Item #2\\&quot;,\\n  amountIncludingTax: 300,\\n  productUrl: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;\\n};\\n\\nconst name: Types.checkout.Name = {\\n  firstName: \\&quot;Testperson-se\\&quot;,\\n  lastName: \\&quot;Approved\\&quot;\\n};\\n\\nconst deliveryAddress: Types.checkout.DeliveryAddress = {\\n  country: \\&quot;SE\\&quot;,\\n  city: \\&quot;Ankeborg\\&quot;,\\n  houseNumberOrName: \\&quot;1\\&quot;,\\n  street: \\&quot;Stargatan\\&quot;,\\n  postalCode: \\&quot;12345\\&quot;\\n};\\n\\nconst billingAddress: Types.checkout.BillingAddress = {\\n  country: \\&quot;SE\\&quot;,\\n  city: \\&quot;Ankeborg\\&quot;,\\n  houseNumberOrName: \\&quot;1\\&quot;,\\n  street: \\&quot;Stargatan\\&quot;,\\n  postalCode: \\&quot;12345\\&quot;\\n};\\n\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\n  amount: amount,\\n  telephoneNumber: \\&quot;+46 840 839 298\\&quot;,\\n  socialSecurityNumber: \\&quot;0108\\&quot;,\\n  shopperEmail: \\&quot;youremail@email.com\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  lineItems: [lineItem1, lineItem2],\\n  shopperName: name,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  deliveryAddress: deliveryAddress,\\n  countryCode: \\&quot;SE\\&quot;,\\n  shopperLocale: \\&quot;en_US\\&quot;,\\n  billingAddress: billingAddress,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"cancel-before-capture\">Cancel part of the authorization before capture<\/h3>\n<p>If you want to cancel or adjust the authorization before capturing, you can declare the new amount and associated <code>lineitems<\/code>.<\/p>\n<p>The following example removes <span translate=\"no\"><strong>Item #2<\/strong><\/span> from <a href=\"\/pt\/payment-methods\/klarna\/invoice-lines#klarna-sessions\">the above order<\/a> by declaring the new basket composition and amount.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Cancel part of an auth before capture'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;json&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https: \\\/\\\/checkout-test.adyen.com\\\/checkout\\\/v72\\\/payments\\\/{paymentPspReference}\\\/amountUpdates \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n        \\&quot;value\\&quot;: 400\\n    },\\n    \\&quot;lineItems\\&quot;: [\\n        {\\n            \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n            \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n            \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n            \\&quot;amountIncludingTax\\&quot;: \\&quot;400\\&quot;,\\n            \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n            \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n        }\\n    ]\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"add-product-partial-capture\">Add a product from a partially captured order<\/h3>\n<p>If you want to add products to a partially captured or refunded order, you must include the already captured or refunded <code>lineItems<\/code> in the update request, in addition to the new order content.<\/p>\n<p>In the following example, <span translate=\"no\"><strong>Item #1<\/strong><\/span> from <a href=\"\/pt\/payment-methods\/klarna\/invoice-lines#klarna-sessions\">the above order<\/a> is captured, and we add a third item to the order:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Add product to partially captured order'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;json&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https: \\\/\\\/checkout-test.adyen.com\\\/checkout\\\/v72\\\/payments\\\/{paymentPspReference}\\\/amountUpdates \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n        \\&quot;value\\&quot;: 1300\\n    },\\n    \\&quot;lineItems\\&quot;: [\\n        {\\n            \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n            \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;Shoes\\&quot;,\\n            \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n            \\&quot;amountIncludingTax\\&quot;: \\&quot;400\\&quot;,\\n            \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n            \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n        },\\n        {\\n            \\&quot;quantity\\&quot;: \\&quot;2\\&quot;,\\n            \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;Socks\\&quot;,\\n            \\&quot;id\\&quot;: \\&quot;Item #2\\&quot;,\\n            \\&quot;amountIncludingTax\\&quot;: \\&quot;300\\&quot;,\\n            \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n            \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n        },\\n        {\\n            \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n            \\&quot;taxPercentage\\&quot;: \\&quot;2100\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;Hat\\&quot;,\\n            \\&quot;id\\&quot;: \\&quot;Item #3\\&quot;,\\n            \\&quot;amountIncludingTax\\&quot;: \\&quot;300\\&quot;,\\n            \\&quot;productUrl\\&quot;: \\&quot;URL_TO_PURCHASED_ITEM\\&quot;,\\n            \\&quot;imageUrl\\&quot;: \\&quot;URL_TO_PICTURE_OF_PURCHASED_ITEM\\&quot;\\n        }\\n    ]\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/klarna\/invoice-lines","articleFields":{"description":"Include information about purchased items in your API requests and apply discounts.","parameters":{"payment_method":"Klarna"},"section_icon":"payment-methods.svg","id":"24216679","type":"page","feedback_component":true,"filters_component":false,"decision_tree":"[]","page_id":"6bd64558-ae7d-42a9-b5cc-7ae47e4e151a","last_edit_on":"04-09-2025 08:51"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/klarna\/invoice-lines","title":"Specifying invoice lines and discounts","content":"When making Klarna payments, you need to specify price and product information when:\n\nMaking a payment request.\nMaking a partial capture request.\nMaking a partial refund request.\nApplying a discount.\nAdjusting an authorization.\n\nMake a payment request\nFor any payment request, include price and product information in  lineItems.\nWhen adding price and product information, note that:\n\nKlarna will only approve the payment if the total amount specified in lineItems matches the amount.value.\n\n\n\n\nlineItems\nRequired\nDescription\n\n\n\n\n lineItems.quantity\n\nThe number of items.\n\n\n lineItems.amountExcludingTax\n\nThe price for one item, without the tax, in minor units.\n\n\n lineItems.taxPercentage\n\nThe tax percentage, in minor units.\n\n\n lineItems.description\n\nThe description of the line item.\n\n\n lineItems.id\n\nThe ID of the line item.\n\n\n lineItems.taxAmount\n\nThe tax amount for one item, in minor units.\n\n\n lineItems.amountIncludingTax\n\nThe price for one item, with the tax amount included, in minor units.\n\n\n lineItems.productUrl\n\nLink to the purchased item.\n\n\n lineItems.imageUrl\n\nLink to the picture of the purchased item.\n\n\n\n\n    \n\nMake a partial capture request\nInclude the following lineItems parameters when making a  \/payments\/{paymentPspReference}\/captures request.\n\n\n\nlineItems\nRequired\nDescription\n\n\n\n\n lineItems.quantity\n\nThe number of items.\n\n\n lineItems.amountExcludingTax\n\nThe price for one item, without the tax, in minor units.\n\n\n lineItems.taxPercentage\n\nThe tax percentage, in minor units.\n\n\n lineItems.taxAmount\n\nThe tax amount for one item, in minor units.\n\n\n lineItems.description\n\nThe description of the line item.\n\n\n\n\n    \n\nYou will receive a response containing a pspReference. Once we have processed your request, you will also receive a  CAPTURE webhook.\nMake a partial refund request\nInclude the following lineItems parameters when making a POST request to the  \/payments\/{paymentPspReference}\/refunds endpoint, where paymentPspReference is the pspReference of the authorization you want to refund.\n\n\n\nlineItems\nRequired\nDescription\n\n\n\n\n lineItems.quantity\n\nThe number of items.\n\n\n lineItems.amountExcludingTax\n\nThe price for one item, without the tax, in minor units.\n\n\n lineItems.taxPercentage\n\nThe tax percentage, in minor units.\n\n\n lineItems.taxAmount\n\nThe tax amount for one item, in minor units.\n\n\n lineItems.description\n\nThe description of the line item.\n\n\n\n\n    \n\nYou will receive a response containing a pspReference. Once we have processed your request, you will also receive a  REFUND webhook.\nApply a discount\nThere are several ways to apply a discount to the invoice:\n\nApply a discount to individual line items.\nApply a discount to the whole purchase.\nLet Adyen add a discount line for you. This is the fallback option in case the other methods do not work for you.\n\nThe examples below apply a 30% discount to the shopper's basket, which contains:\n\nOne pair of shoes, original price EUR&nbsp;12.00 including 20% VAT\nTwo pairs of socks, original price EUR&nbsp;4.50 including 20% VAT\n\nApply a discount to individual line items\nWith this method of applying a discount, you reduce the cost of the applicable line items instead of discounting the basket as a whole. To apply a discount to individual line items:\n\nCalculate the reduced amount of each line item you want to discount.\nSend a payment request in which each line item specifies the discounted amounts:\n\namountExcludingTax\ntaxAmount\namountIncludingTax\n\n\n\n    Sample basket with discounts applied to individual items\n    \n        \n            Product\n            Quantity\n            Item Price (EUR)\n            VAT (EUR)\n            Total price (EUR)\n        \n    \n    \n        \n            Shoes (with 30% discount)\n            1\n            7,00\n            1,40\n            8,40\n        \n        \n            Socks (with 30% discount)\n            2\n            2,63\n            0,52\n            6,30\n        \n        \n            Purchase amount\n            12,26\n        \n        \n            VAT\n            2,44\n        \n        \n            TOTAL\n            14,70\n        \n    \n\n\n    \n\nApply a discount to the whole purchase\nWith this method of applying a discount, you specify the line items with their original price and then apply a discount to the basket as a whole by adding a discount line.\nTo apply a discount to the entire basket:\n\nCalculate the discount to the product total and the VAT.\nIn your payments request, send each fully priced line item, plus a line Item to specify the discount with the following parameters:\n\nid: Discount\ndescription: Discount\namountExcludingTax: The discount amount, preceded by a minus sign\ntaxAmount: The discount amount, preceded by a minus sign\namountIncludingTax: The discount amount, preceded by a minus sign\n\n\n\n    Sample basket with a discount applied to the entire basket\n    \n        \n            Product\n            Quantity\n            Item Price (EUR)\n            VAT (EUR)\n            Total price (EUR)\n        \n    \n    \n        \n            Shoes\n            1\n            10,00\n            2,00\n            12,00\n        \n        \n            Socks\n            2\n            3,75\n            0,75\n            9,00\n        \n        \n            Total before discount\n            21,00\n        \n        \n            Product discount\n            5,25\n        \n        \n            VAT discount\n            1,05\n        \n        \n            Total discount (30%)\n            6,30\n        \n        \n            TOTAL\n            14,70\n        \n    \n\n\n    \n\nLet Adyen add a discount line for you\nWith this method of applying a discount, Adyen calculates that amount.value is less than the total value of the line items, so a discount must have been applied. In this case, Adyen adds a line item for the discount before sending to Klarna.\n\n    \n\nAdjust an authorization\nIf you want to adjust an authorized payment that has not yet been fully captured, your API request must specify all captured and refunded lineItems. See Adjust an authorization for detailed instructions. This is available for Klarna with Checkout API v70 and later.\nBelow are two examples of adjusting an authorized payment:\n\nCancel part of the authorization before capture\nAdd a new product to a partially captured order\n\nThese examples are based on the following order:\n\n    \n\nCancel part of the authorization before capture\nIf you want to cancel or adjust the authorization before capturing, you can declare the new amount and associated lineitems.\nThe following example removes Item #2 from the above order by declaring the new basket composition and amount.\n\n    \n\nAdd a product from a partially captured order\nIf you want to add products to a partially captured or refunded order, you must include the already captured or refunded lineItems in the update request, in addition to the new order content.\nIn the following example, Item #1 from the above order is captured, and we add a third item to the order:\n\n    \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Klarna","lvl3":"Specifying invoice lines and discounts"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/klarna","lvl3":"\/pt\/payment-methods\/klarna\/invoice-lines"},"levels":4,"category":"Payment method","category_color":"green","tags":["Specifying","invoice","lines","discounts"]},"articleFiles":{"basket.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/08.payment-methods\/42.klarna\/12.invoice-lines\/basket.png\" \/>","basket1.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/08.payment-methods\/42.klarna\/12.invoice-lines\/basket1.png\" \/>","0289821492.js":"<p alt=\"\">0289821492.js<\/p>","1430900391.js":"<p alt=\"\">1430900391.js<\/p>","1955271693.js":"<p alt=\"\">1955271693.js<\/p>","3741293479.js":"<p alt=\"\">3741293479.js<\/p>"}}
