{"title":"Klarna and RatePay open invoice","category":"default","creationDate":1776961627,"content":"<div class=\"sc-notice warning\"><div>\n<p><strong>Hosted Payment Pages are no longer available<\/strong><\/p>\n<p>To accept payments through an Adyen-hosted page, use our <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Hosted%2BCheckout\">Hosted Checkout<\/a>.<\/p>\n<p>This page is for the classic Hosted Payment Pages (HPP) integration, which has reached end-of-life.  We are no longer processing transactions though HPP.<\/p>\n<\/div><\/div>\n<p>With <em>buy now, pay later<\/em> payment methods such as\u00a0<a href=\"https:\/\/www.klarna.com\/us\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Klarna<\/a> or <a href=\"https:\/\/www.ratepay.com\/en\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">RatePAY<\/a>, the shopper pays after the goods have been delivered, while you get paid at the time of the purchase.<\/p>\n<p>When making a payment, you need to:\u00a0<\/p>\n<ol>\n<li><a href=\"#step-1-make-an-open-invoice-payment\">Provide shopper information<\/a>. This is used by the partner (Klarna or RatePAY) to perform risk checks on the shopper before authorising the payment.\u00a0<\/li>\n<li><a href=\"#invoice-lines\">Provide price and product information about the purchased items<\/a>. This will be included on the invoice sent to the shopper.<\/li>\n<li>\n<p><a href=\"#step-2-capture-the-payment\">Capture<\/a> the payment after the goods have been sent. This triggers the invoice to be sent to the shopper.\u00a0<\/p>\n<div class=\"sc-notice note\"><div>\n<p>Payments made with buy now, pay later payment methods need to be captured manually, even if you have enabled automatic capture for other payment methods. If you want to enable automatic capture for Buy Now Pay Later payment methods, contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>.<\/p>\n<\/div><\/div>\n<\/li>\n<\/ol>\n<p>You will receive the funds even if the shopper did not honor the invoice. Chargebacks can only occur if you didn't comply with the regulations of the partner, for example if you didn't ship the goods on time. For more information about these regulations, contact our\u00a0<a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>.<\/p>\n<p>When using our classic integration, you can accept Klarna and RatePAY payments with our\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\">Hosted Payment Pages (HPP) integration<\/a>. To accept RatePAY, you can also use our\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">Classic API integration<\/a>.\u00a0<\/p>\n<h2 id=\"step-1-make-an-open-invoice-payment\">Step 1: Make a payment<\/h2>\n<p>In your payment request, provide:\u00a0<\/p>\n<ul>\n<li><code>shopperEmail<\/code><\/li>\n<li><code>shopperReference<\/code> (minimum length three characters)<\/li>\n<li><code>additionalData.openinvoicedata<\/code>:\u00a0Price and product information to be included on the invoice sent to the shopper. For more information, refer to\u00a0<a href=\"#invoice-lines\">Invoice lines<\/a>.\u00a0<\/li>\n<\/ul>\n<p>Additional required fields depend on whether you are using HPP or API.<\/p>\n<h3 id=\"hpp-integration-specific-fields\">HPP integration specific fields<\/h3>\n<p>When using our\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\">HPP integration<\/a>\u00a0you can optionally provide the following fields. If you do not include these fields, the shopper will need to enter this information manually in the HPP.\u00a0<\/p>\n<ul>\n<li>\n<p><code>shopper.dateOfBirthDayOfMonth<\/code>: For more information,\u00a0refer to\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\/hpp-additional-fields\">Shopper fields<\/a>.<\/p>\n<\/li>\n<li>\n<p><code>shopper.dateOfBirthMonth<\/code><\/p>\n<\/li>\n<li>\n<p><code>shopper.dateOfBirthYear<\/code><\/p>\n<\/li>\n<li>\n<p><code>shopper.telephoneNumber<\/code><\/p>\n<\/li>\n<li>\n<p><code>socialSecurityNumber<\/code>\u00a0\u2013 required for Sweden, Finland, Norway, and Denmark. Provide either the last four digits, or the full social security number. For more information, refer to\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/payments__reqParam_additionalData-AdditionalDataOpenInvoice-openinvoicedata-numberOfLines\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Open Invoice fields<\/a>.<\/p>\n<\/li>\n<li>\n<p><code>billingAddress<\/code>\u00a0\u2013 this object contains billing address details.<\/p>\n<\/li>\n<li>\n<p><code>deliveryAddress<\/code>\u00a0\u2013 only required if the delivery address is not the same as the billing address.\u00a0This object contains delivery address details.<\/p>\n<\/li>\n<\/ul>\n<p>To\u00a0specify what should be shown to the shopper, use the following fields:\u00a0<\/p>\n<ul>\n<li><code>shopperType<\/code>\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the billing address fields. For more information,\u00a0refer to\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\/hpp-additional-fields\/hpp-shopper-fields\">Shopper fields<\/a>.<\/li>\n<li><code>billingAddressType<\/code>\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the billing address fields. For more information,\u00a0refer to\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\/hpp-additional-fields\/hpp-billing-address-and-avs-fields\">Billing address and AVS fields<\/a>.<\/li>\n<li><code>deliveryAddressType<\/code>\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the delivery address fields. For more information, refer to\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\/hpp-additional-fields\/hpp-risk-fields\">Risk fields<\/a>.<\/li>\n<\/ul>\n<p>Klarna payment request:\u00a0<\/p>\n<pre><code class=\"language-xml\">&lt;html&gt;\n  &lt;body&gt;\n   &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/select.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n      &lt;input type=\"hidden\" name=\"shopperEmail\" value=\"test102@gmail.com\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shopperReference\" value=\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n      &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2014-10-11T10:30:00Z\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shipBeforeDate\" value=\"2014-10-20\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n      &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n      &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n      &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n      &lt;input type=\"hidden\" name=\"recurringContract\" value=\"RECURRING,ONECLICK\" \/&gt;\n&lt;!--Invoice Line Specification --&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.numberOfLines\" value=\"2\" \/&gt; &lt;input type=\"hidden\" name=\"openinvoicedata.refundDescription\" value=\"Refund for testReference\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.numberOfItems\" value=\"1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemAmount\" value=\"3500\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.currencyCode\" value=\"EUR\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemVatAmount\" value=\"665\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemVatPercentage\" value=\"1900\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.vatCategory\" value=\"High\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.description\" value=\"Description 1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.numberOfItems\" value=\"1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemAmount\" value=\"2100\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.currencyCode\" value=\"EUR\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemVatAmount\" value=\"399\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemVatPercentage\" value=\"1900\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.vatCategory\" value=\"Low\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.description\" value=\"Description 2\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.merchantData\" value=\"d2hhdGV2ZXIga2xhcm5hIHJlcXVlc3RzIGZvciBFTUQgY2FuIGJlIHB1dCBoZXJlLg==\" \/&gt;\n&lt;!-- Buttons and offset --&gt;\n      &lt;input type=\"hidden\" name=\"offset\" value=\"0\" \/&gt;\n      &lt;input type=\"submit\" value=\"Send\" \/&gt;\n      &lt;input type=\"reset\" \/&gt;\n   &lt;\/form&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h3 id=\"api-integration-specific-fields\">API integration specific fields<\/h3>\n<p>When using our <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">Classic API integration<\/a>\u00a0to make a RatePAY payment, you need to provide:<\/p>\n<ul>\n<li>\n<p><code>shopperName<\/code>: A container for the shopper information.<\/p>\n<\/li>\n<li>\n<p><code>selectedBrand<\/code>:\u00a0The payment method that the shopper wants to use. Possible values:\u00a0<\/p>\n<ul>\n<li><strong>ratepay<\/strong><\/li>\n<li><strong>afterpay_default<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>dateOfBirth<\/code><\/p>\n<\/li>\n<li>\n<p><code>telephoneNumber<\/code>: The telephone number of the shopper.<\/p>\n<\/li>\n<li>\n<p><code>deviceFingerprint<\/code>: Required for RatePAY only.\u00a0To obtain this value, contact RatePAY.<br \/>\nThe device fingerprint is provided by RatePAY, not Adyen. For more information, see <a href=\"https:\/\/ratepay.gitbook.io\/dfp\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">RatePAY's Device fingerprinting documentation<\/a> or <a href=\"https:\/\/www.ratepay.com\/en\/contact\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">contact RatePAY<\/a>.<\/p>\n<\/li>\n<li>\n<p><code>billingAddress<\/code>: This object contains billing address details.<\/p>\n<\/li>\n<li>\n<p><code>deliveryAddress<\/code>: Only required if the delivery address is not the same as the billing address.\u00a0This object contains delivery address details.<\/p>\n<\/li>\n<\/ul>\n<p>RatePAY payment request:<\/p>\n<pre><code class=\"language-json\">{\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"amount\":{\n      \"currency\":\"EUR\",\n      \"value\":\"1000\"\n   },\n   \"selectedBrand\":\"ratepay\",\n   \"shopperEmail\":\"youremail@email.com\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"shopperIP\":\"8.8.8.8\",\n   \"reference\":\"Test invoice\",\n   \"shopperName\":{\n      \"firstName\":\"Johann\",\n      \"lastName\":\"Strauss\",\n      \"gender\":\"MALE\"\n   },\n   \"dateOfBirth\":\"1941-03-21\",\n   \"telephoneNumber\":\"0765260000\",\n   \"billingAddress\":{\n      \"country\":\"DE\",\n      \"city\":\"Neuss\",\n      \"houseNumberOrName\":\"1\",\n      \"street\":\"Hellersbergstrasse\",\n      \"postalCode\":\"41460\"\n   },\n   \"additionalData\":{\n      \"openinvoicedata.numberOfLines\":\"2\",\n      \"openinvoicedata.line1.currencyCode\":\"EUR\",\n      \"openinvoicedata.line1.description\":\"item 1\",\n      \"openinvoicedata.line1.itemAmount\":\"3000\",\n      \"openinvoicedata.line1.itemVatAmount\":\"0\",\n      \"openinvoicedata.line1.itemVatPercentage\":\"0\",\n      \"openinvoicedata.line1.numberOfItems\":\"1\",\n      \"openinvoicedata.line1.vatCategory\":\"None\",\n      \"openinvoicedata.line2.currencyCode\":\"EUR\",\n      \"openinvoicedata.line2.description\":\"item 2\",\n      \"openinvoicedata.line2.itemAmount\":\"5882\",\n      \"openinvoicedata.line2.numberOfItems\":\"1\",\n      \"openinvoicedata.line2.itemVatPercentage\":\"1900\",\n      \"openinvoicedata.line2.itemVatAmount\":\"1118\",\n      \"openinvoicedata.line2.vatCategory\":\"High\",\n      \"openinvoicedata.merchantData\":\"ZXh0cmEgZGF0YSBoZXJl\"\n   }\n}<\/code><\/pre>\n<h2 id=\"step-2-capture-the-payment\">Step 2: Capture the payment<\/h2>\n<p>Unlike most other payments, payments made with Buy Now Pay Later payment methods have to be\u00a0<a href=\"\/pt\/online-payments\/capture\">captured<\/a>\u00a0in order to be completed. Capturing the payment is what triggers the invoice to be sent to the shopper.\u00a0<\/p>\n<div class=\"sc-notice note\"><div>\n<p>Payments made with Buy Now Pay Later payment methods need to be captured manually, even if you have enabled automatic capture for other payment methods. If you want to enable automatic capture for these payments, contact our\u00a0<a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>.<\/p>\n<\/div><\/div>\n<p>You can capture Buy Now Pay Later payments in the same way as other payments, by making a call to the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/capture\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/capture<\/a>\u00a0endpoint. When partially capturing a Buy Now Pay Later payment, you also need to specify in your\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/capture\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/capture<\/a>\u00a0call the price and product information to be included in the invoice.\u00a0<\/p>\n<div class=\"sc-notice note\"><div>\n<p>It is not possible to do partial captures if there is only one invoice line.<\/p>\n<\/div><\/div>\n<h3 id=\"partial-captures\">Partial captures<\/h3>\n<p>When making a partial capture, you only ask the shopper to pay for some of the goods that they originally purchased. This is useful, for example, when an item is out of stock.<\/p>\n<p>When you partially capture a payment, the remaining amount that you did not capture is automatically cancelled.\u00a0If you do not want this to happen, for example if you want to perform\u00a0<em>multiple<\/em>\u00a0partial captures, contact our\u00a0\u00a0<a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>\u00a0.<\/p>\n<p>For multiple partial captures, Klarna works slightly different than RatePAY:\u00a0<\/p>\n<ul>\n<li><strong>RatePAY:<\/strong> One invoice is created per payment, and the shopper will receive a modified invoice on each capture.<\/li>\n<li><strong>Klarna<\/strong>: A new invoice is created upon every capture.<\/li>\n<\/ul>\n<p>When submitting a partial capture, add invoice lines to the <code>additionalData<\/code> of the capture request, so an invoice can be sent to the shopper containing only captured items.<\/p>\n<p>Partial capture request:<\/p>\n<pre><code class=\"language-json\">{\n  \"merchantAccount\" : \"MyMerchantAccount\",\n  \"modificationAmount\" : {\n    \"currency\" : \"EUR\",\n    \"value\" : \"800\"\n  },\n  \"originalReference\" : \"81234567890123456\",\n  \"additionalData\" : {\n    \"openinvoicedata.line1.currencyCode\" : \"EUR\",\n    \"openinvoicedata.line1.description\" : \"Shoes\",\n    \"openinvoicedata.line1.itemAmount\" : \"661\",\n    \"openinvoicedata.line1.itemVatAmount\" : \"139\",\n    \"openinvoicedata.line1.itemVatPercentage\" : \"2100\",\n    \"openinvoicedata.line1.numberOfItems\" : \"1\",\n    \"openinvoicedata.line1.vatCategory\" : \"High\",\n    \"openinvoicedata.numberOfLines\" : \"1\"\n  }\n}<\/code><\/pre>\n<p>Partial capture response:<\/p>\n<pre><code class=\"language-json\">{\n  \"pspReference\" : \"8515071322806376\",\n  \"response\" : \"[capture-received]\"\n}<\/code><\/pre>\n<h2 id=\"refunds-and-cancellations\">Refunds and cancellations<\/h2>\n<p>When a Buy Now Pay Later payment has not yet been captured, you can\u00a0<a href=\"\/pt\/online-payments\/cancel\">cancel<\/a>\u00a0it by making a request to the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/cancel\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cancel<\/a>\u00a0endpoint as usual.\u00a0 If a Buy Now Pay Later payment has already been captured and you want to return the funds to the shopper, you need to\u00a0<a href=\"\/pt\/online-payments\/refund\">refund<\/a>\u00a0it by using the\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/refund\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/refund<\/a>\u00a0endpoint.<\/p>\n<p>When making a\u00a0<em>partial<\/em>\u00a0refund, for example if the shopper only returned a part of the order, you also need to include in\u00a0the\u00a0<code>additionalData<\/code>\u00a0of your refund request information about the returned items.<\/p>\n<p>Partial refund request:<\/p>\n<pre><code class=\"language-json\">{\n  \"merchantAccount\" : \"MyMerchantAccount\",\n  \"modificationAmount\" : {\n    \"currency\" : \"EUR\",\n    \"value\" : \"800\"\n  },\n  \"originalReference\" : \"81234567890123456\",\n  \"additionalData\" : {\n    \"acquirerReference\" : \"1004567890123\",\n    \"openinvoicedata.line1.currencyCode\" : \"EUR\",\n    \"openinvoicedata.line1.description\" : \"Shoes\",\n    \"openinvoicedata.line1.itemAmount\" : \"661\",\n    \"openinvoicedata.line1.itemVatAmount\" : \"139\",\n    \"openinvoicedata.line1.itemVatPercentage\" : \"2100\",\n    \"openinvoicedata.line1.numberOfItems\" : \"1\",\n    \"openinvoicedata.line1.vatCategory\" : \"High\",\n    \"openinvoicedata.numberOfLines\" : \"1\"\n  }\n}<\/code><\/pre>\n<p>\u00a0Partial refund response:<\/p>\n<pre><code class=\"language-json\">{\n  \"pspReference\" : \"8515071322806376\",\n  \"response\" : \"[refund-received]\"\n}<\/code><\/pre>\n<h2 id=\"invoice-lines\">Invoice lines<\/h2>\n<p>When making a Buy Now Pay Later payment, you need to provide the price and product information, to be included on the invoice sent to the shopper. You can do this using the\u00a0<code>openinvoicedata<\/code>\u00a0fields.\u00a0<\/p>\n<div class=\"sc-notice info\"><div>\n<p>When using\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">API integration<\/a>, the\u00a0<code>openinvoicedata<\/code>\u00a0fields are child elements of\u00a0<code>additionalData<\/code>. Each field represents a key and not a JSON structure.\u00a0<\/p>\n<\/div><\/div>\n<pre><code class=\"language-json\">  \"amount\":{\n      \"currency\":\"SEK\",\n      \"value\":\"1000\"\n   },\n\u00a0\n\"additionalData\":{\n      \"openinvoicedata.numberOfLines\":\"2\",\n      \"openinvoicedata.line1.currencyCode\":\"SEK\",\n      \"openinvoicedata.line1.description\":\"Shoes\",\n      \"openinvoicedata.line1.itemAmount\":\"331\",\n      \"openinvoicedata.line1.itemVatAmount\":\"69\",\n      \"openinvoicedata.line1.itemVatPercentage\":\"2100\",\n      \"openinvoicedata.line1.numberOfItems\":\"1\",\n      \"openinvoicedata.line1.vatCategory\":\"High\",\n      \"openinvoicedata.line2.currencyCode\":\"SEK\",\n      \"openinvoicedata.line2.description\":\"Socks\",\n      \"openinvoicedata.line2.itemAmount\":\"248\",\n      \"openinvoicedata.line2.itemVatAmount\":\"52\",\n      \"openinvoicedata.line2.itemVatPercentage\":\"2100\",\n      \"openinvoicedata.line2.numberOfItems\":\"2\",\n      \"openinvoicedata.line2.vatCategory\":\"High\"\n   }<\/code><\/pre>\n<p>For your request to be successful, the amounts stated in your request need to be correct:\u00a0<\/p>\n<ol>\n<li>\n<p>For each line, the\u00a0tax amount (<code>itemVatAmount<\/code>) has to match the\u00a0tax percentage (<code>itemVatPercentage<\/code>), given the\u00a0amount excluding tax (<code>itemAmount<\/code>):<\/p>\n<div class=\"sc-notice info\"><div>\n<p><code>itemVatAmount<\/code> = (<code>itemAmount<\/code> * <code>itemVatPercentage<\/code>)<\/p>\n<\/div><\/div>\n<p>In the example above, 69 = (331 * 0,21), and 52 = (248 * 0,21).<\/p>\n<\/li>\n<li>\n<p>The\u00a0<code>value<\/code>\u00a0specified in the\u00a0<code>amount<\/code>\u00a0has to match the\u00a0total amount of the invoice lines.\u00a0To calculate the total amount of the invoice lines, refer to the following pseudo-code:\u00a0<\/p>\n<pre><code>total = 0;\n\nfor each (invoiceLine in lineItems) {\n  total += (itemAmount + itemVatAmount) * quantity;\n}\n\ntotalValue = total;<\/code><\/pre>\n<p>In the example above: (331 + 69) * 1 = 400, and (248 + 52) * 2 = 600, so\u00a0<code>totalValue<\/code>\u00a0= 400 + 600 = 1000.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"ratepay-installments\">RatePAY Installments<\/h2>\n<p>RatePAY installments are currently only possible via an\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">API integration<\/a>.<\/p>\n<div class=\"sc-notice warning\"><div>\n<p>Contact RatePAY to discuss installment rates you can offer your shoppers to prevent refusals.<\/p>\n<\/div><\/div>\n<p>Follow the same implementation process as with other Buy Now Pay Later payment methods and add the following:<\/p>\n<ul>\n<li><code>selectedBrand<\/code>\u00a0\u2013 set the value to\u00a0<strong>ratepay<\/strong>\u00a0(there is no separate value for installments).<\/li>\n<li>Add\u00a0the installment object\u00a0to define the number of installments.<\/li>\n<li>\n<p>Add the following items in the\u00a0<code>additionalData<\/code>\u00a0object:<\/p>\n<ul>\n<li><code>ratepay.installmentAmount<\/code>\u00a0- (required) - Amount the customer has to pay each month.<\/li>\n<li><code>ratepay.lastInstallmentAmount<\/code>\u00a0- (required) - Amount of the last installment.<\/li>\n<li><code>ratepay.interestRate<\/code>\u00a0- (required) - Interest rate for this installment.<\/li>\n<li><code>ratepay.paymentFirstday<\/code>\u00a0- (optional) - Calendar day of the first payment. Example value:\u00a0<strong>28<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/payment-methods\/klarna\"\n                        target=\"_self\"\n                        >\n                    Klarna\n                <\/a><\/li><li><a href=\"\/payment-methods\"\n                        target=\"_self\"\n                        >\n                    Payment methods\n                <\/a><\/li><li><a href=\"\/online-payments\"\n                        target=\"_self\"\n                        >\n                    Online payments\n                <\/a><\/li><li><a href=\"\/online-payments\/modify-payments\"\n                        target=\"_self\"\n                        >\n                    Payment modifications\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/klarna-afterpay-and-ratepay-open-invoice","articleFields":{"parameters":{"anchor_new":"<a href=\"\/payment-methods\">buy now, pay later payment methods<\/a>","parent_page":"classic Hosted Payment Pages (HPP)","new_desc":"integrating using our Checkout APIs"},"sitemap":{"priority":0.3},"id":"47489436","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"11-05-2020 12:58"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/klarna-afterpay-and-ratepay-open-invoice","title":"Klarna and RatePay open invoice","content":"\nHosted Payment Pages are no longer available\nTo accept payments through an Adyen-hosted page, use our Hosted Checkout.\nThis page is for the classic Hosted Payment Pages (HPP) integration, which has reached end-of-life.  We are no longer processing transactions though HPP.\n\nWith buy now, pay later payment methods such as\u00a0Klarna or RatePAY, the shopper pays after the goods have been delivered, while you get paid at the time of the purchase.\nWhen making a payment, you need to:\u00a0\n\nProvide shopper information. This is used by the partner (Klarna or RatePAY) to perform risk checks on the shopper before authorising the payment.\u00a0\nProvide price and product information about the purchased items. This will be included on the invoice sent to the shopper.\n\nCapture the payment after the goods have been sent. This triggers the invoice to be sent to the shopper.\u00a0\n\nPayments made with buy now, pay later payment methods need to be captured manually, even if you have enabled automatic capture for other payment methods. If you want to enable automatic capture for Buy Now Pay Later payment methods, contact our Support Team.\n\n\n\nYou will receive the funds even if the shopper did not honor the invoice. Chargebacks can only occur if you didn't comply with the regulations of the partner, for example if you didn't ship the goods on time. For more information about these regulations, contact our\u00a0Support Team.\nWhen using our classic integration, you can accept Klarna and RatePAY payments with our\u00a0Hosted Payment Pages (HPP) integration. To accept RatePAY, you can also use our\u00a0Classic API integration.\u00a0\nStep 1: Make a payment\nIn your payment request, provide:\u00a0\n\nshopperEmail\nshopperReference (minimum length three characters)\nadditionalData.openinvoicedata:\u00a0Price and product information to be included on the invoice sent to the shopper. For more information, refer to\u00a0Invoice lines.\u00a0\n\nAdditional required fields depend on whether you are using HPP or API.\nHPP integration specific fields\nWhen using our\u00a0HPP integration\u00a0you can optionally provide the following fields. If you do not include these fields, the shopper will need to enter this information manually in the HPP.\u00a0\n\n\nshopper.dateOfBirthDayOfMonth: For more information,\u00a0refer to\u00a0Shopper fields.\n\n\nshopper.dateOfBirthMonth\n\n\nshopper.dateOfBirthYear\n\n\nshopper.telephoneNumber\n\n\nsocialSecurityNumber\u00a0\u2013 required for Sweden, Finland, Norway, and Denmark. Provide either the last four digits, or the full social security number. For more information, refer to\u00a0Open Invoice fields.\n\n\nbillingAddress\u00a0\u2013 this object contains billing address details.\n\n\ndeliveryAddress\u00a0\u2013 only required if the delivery address is not the same as the billing address.\u00a0This object contains delivery address details.\n\n\nTo\u00a0specify what should be shown to the shopper, use the following fields:\u00a0\n\nshopperType\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the billing address fields. For more information,\u00a0refer to\u00a0Shopper fields.\nbillingAddressType\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the billing address fields. For more information,\u00a0refer to\u00a0Billing address and AVS fields.\ndeliveryAddressType\u00a0\u2013 Specifies whether the shopper is allowed to view and\/or modify the delivery address fields. For more information, refer to\u00a0Risk fields.\n\nKlarna payment request:\u00a0\n&lt;html&gt;\n  &lt;body&gt;\n   &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/select.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n      &lt;input type=\"hidden\" name=\"shopperEmail\" value=\"test102@gmail.com\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shopperReference\" value=\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n      &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2014-10-11T10:30:00Z\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shipBeforeDate\" value=\"2014-10-20\" \/&gt;\n      &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n      &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n      &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n      &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n      &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n      &lt;input type=\"hidden\" name=\"recurringContract\" value=\"RECURRING,ONECLICK\" \/&gt;\n&lt;!--Invoice Line Specification --&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.numberOfLines\" value=\"2\" \/&gt; &lt;input type=\"hidden\" name=\"openinvoicedata.refundDescription\" value=\"Refund for testReference\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.numberOfItems\" value=\"1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemAmount\" value=\"3500\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.currencyCode\" value=\"EUR\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemVatAmount\" value=\"665\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.itemVatPercentage\" value=\"1900\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.vatCategory\" value=\"High\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line1.description\" value=\"Description 1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.numberOfItems\" value=\"1\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemAmount\" value=\"2100\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.currencyCode\" value=\"EUR\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemVatAmount\" value=\"399\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.itemVatPercentage\" value=\"1900\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.vatCategory\" value=\"Low\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.line2.description\" value=\"Description 2\" \/&gt;\n      &lt;input type=\"hidden\" name=\"openinvoicedata.merchantData\" value=\"d2hhdGV2ZXIga2xhcm5hIHJlcXVlc3RzIGZvciBFTUQgY2FuIGJlIHB1dCBoZXJlLg==\" \/&gt;\n&lt;!-- Buttons and offset --&gt;\n      &lt;input type=\"hidden\" name=\"offset\" value=\"0\" \/&gt;\n      &lt;input type=\"submit\" value=\"Send\" \/&gt;\n      &lt;input type=\"reset\" \/&gt;\n   &lt;\/form&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;\nAPI integration specific fields\nWhen using our Classic API integration\u00a0to make a RatePAY payment, you need to provide:\n\n\nshopperName: A container for the shopper information.\n\n\nselectedBrand:\u00a0The payment method that the shopper wants to use. Possible values:\u00a0\n\nratepay\nafterpay_default\n\n\n\ndateOfBirth\n\n\ntelephoneNumber: The telephone number of the shopper.\n\n\ndeviceFingerprint: Required for RatePAY only.\u00a0To obtain this value, contact RatePAY.\nThe device fingerprint is provided by RatePAY, not Adyen. For more information, see RatePAY's Device fingerprinting documentation or contact RatePAY.\n\n\nbillingAddress: This object contains billing address details.\n\n\ndeliveryAddress: Only required if the delivery address is not the same as the billing address.\u00a0This object contains delivery address details.\n\n\nRatePAY payment request:\n{\n   \"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\n   \"amount\":{\n      \"currency\":\"EUR\",\n      \"value\":\"1000\"\n   },\n   \"selectedBrand\":\"ratepay\",\n   \"shopperEmail\":\"youremail@email.com\",\n   \"shopperReference\":\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n   \"shopperIP\":\"8.8.8.8\",\n   \"reference\":\"Test invoice\",\n   \"shopperName\":{\n      \"firstName\":\"Johann\",\n      \"lastName\":\"Strauss\",\n      \"gender\":\"MALE\"\n   },\n   \"dateOfBirth\":\"1941-03-21\",\n   \"telephoneNumber\":\"0765260000\",\n   \"billingAddress\":{\n      \"country\":\"DE\",\n      \"city\":\"Neuss\",\n      \"houseNumberOrName\":\"1\",\n      \"street\":\"Hellersbergstrasse\",\n      \"postalCode\":\"41460\"\n   },\n   \"additionalData\":{\n      \"openinvoicedata.numberOfLines\":\"2\",\n      \"openinvoicedata.line1.currencyCode\":\"EUR\",\n      \"openinvoicedata.line1.description\":\"item 1\",\n      \"openinvoicedata.line1.itemAmount\":\"3000\",\n      \"openinvoicedata.line1.itemVatAmount\":\"0\",\n      \"openinvoicedata.line1.itemVatPercentage\":\"0\",\n      \"openinvoicedata.line1.numberOfItems\":\"1\",\n      \"openinvoicedata.line1.vatCategory\":\"None\",\n      \"openinvoicedata.line2.currencyCode\":\"EUR\",\n      \"openinvoicedata.line2.description\":\"item 2\",\n      \"openinvoicedata.line2.itemAmount\":\"5882\",\n      \"openinvoicedata.line2.numberOfItems\":\"1\",\n      \"openinvoicedata.line2.itemVatPercentage\":\"1900\",\n      \"openinvoicedata.line2.itemVatAmount\":\"1118\",\n      \"openinvoicedata.line2.vatCategory\":\"High\",\n      \"openinvoicedata.merchantData\":\"ZXh0cmEgZGF0YSBoZXJl\"\n   }\n}\nStep 2: Capture the payment\nUnlike most other payments, payments made with Buy Now Pay Later payment methods have to be\u00a0captured\u00a0in order to be completed. Capturing the payment is what triggers the invoice to be sent to the shopper.\u00a0\n\nPayments made with Buy Now Pay Later payment methods need to be captured manually, even if you have enabled automatic capture for other payment methods. If you want to enable automatic capture for these payments, contact our\u00a0Support Team.\n\nYou can capture Buy Now Pay Later payments in the same way as other payments, by making a call to the\u00a0\/capture\u00a0endpoint. When partially capturing a Buy Now Pay Later payment, you also need to specify in your\u00a0\/capture\u00a0call the price and product information to be included in the invoice.\u00a0\n\nIt is not possible to do partial captures if there is only one invoice line.\n\nPartial captures\nWhen making a partial capture, you only ask the shopper to pay for some of the goods that they originally purchased. This is useful, for example, when an item is out of stock.\nWhen you partially capture a payment, the remaining amount that you did not capture is automatically cancelled.\u00a0If you do not want this to happen, for example if you want to perform\u00a0multiple\u00a0partial captures, contact our\u00a0\u00a0Support Team\u00a0.\nFor multiple partial captures, Klarna works slightly different than RatePAY:\u00a0\n\nRatePAY: One invoice is created per payment, and the shopper will receive a modified invoice on each capture.\nKlarna: A new invoice is created upon every capture.\n\nWhen submitting a partial capture, add invoice lines to the additionalData of the capture request, so an invoice can be sent to the shopper containing only captured items.\nPartial capture request:\n{\n  \"merchantAccount\" : \"MyMerchantAccount\",\n  \"modificationAmount\" : {\n    \"currency\" : \"EUR\",\n    \"value\" : \"800\"\n  },\n  \"originalReference\" : \"81234567890123456\",\n  \"additionalData\" : {\n    \"openinvoicedata.line1.currencyCode\" : \"EUR\",\n    \"openinvoicedata.line1.description\" : \"Shoes\",\n    \"openinvoicedata.line1.itemAmount\" : \"661\",\n    \"openinvoicedata.line1.itemVatAmount\" : \"139\",\n    \"openinvoicedata.line1.itemVatPercentage\" : \"2100\",\n    \"openinvoicedata.line1.numberOfItems\" : \"1\",\n    \"openinvoicedata.line1.vatCategory\" : \"High\",\n    \"openinvoicedata.numberOfLines\" : \"1\"\n  }\n}\nPartial capture response:\n{\n  \"pspReference\" : \"8515071322806376\",\n  \"response\" : \"[capture-received]\"\n}\nRefunds and cancellations\nWhen a Buy Now Pay Later payment has not yet been captured, you can\u00a0cancel\u00a0it by making a request to the\u00a0\/cancel\u00a0endpoint as usual.\u00a0 If a Buy Now Pay Later payment has already been captured and you want to return the funds to the shopper, you need to\u00a0refund\u00a0it by using the\u00a0\/refund\u00a0endpoint.\nWhen making a\u00a0partial\u00a0refund, for example if the shopper only returned a part of the order, you also need to include in\u00a0the\u00a0additionalData\u00a0of your refund request information about the returned items.\nPartial refund request:\n{\n  \"merchantAccount\" : \"MyMerchantAccount\",\n  \"modificationAmount\" : {\n    \"currency\" : \"EUR\",\n    \"value\" : \"800\"\n  },\n  \"originalReference\" : \"81234567890123456\",\n  \"additionalData\" : {\n    \"acquirerReference\" : \"1004567890123\",\n    \"openinvoicedata.line1.currencyCode\" : \"EUR\",\n    \"openinvoicedata.line1.description\" : \"Shoes\",\n    \"openinvoicedata.line1.itemAmount\" : \"661\",\n    \"openinvoicedata.line1.itemVatAmount\" : \"139\",\n    \"openinvoicedata.line1.itemVatPercentage\" : \"2100\",\n    \"openinvoicedata.line1.numberOfItems\" : \"1\",\n    \"openinvoicedata.line1.vatCategory\" : \"High\",\n    \"openinvoicedata.numberOfLines\" : \"1\"\n  }\n}\n\u00a0Partial refund response:\n{\n  \"pspReference\" : \"8515071322806376\",\n  \"response\" : \"[refund-received]\"\n}\nInvoice lines\nWhen making a Buy Now Pay Later payment, you need to provide the price and product information, to be included on the invoice sent to the shopper. You can do this using the\u00a0openinvoicedata\u00a0fields.\u00a0\n\nWhen using\u00a0API integration, the\u00a0openinvoicedata\u00a0fields are child elements of\u00a0additionalData. Each field represents a key and not a JSON structure.\u00a0\n\n  \"amount\":{\n      \"currency\":\"SEK\",\n      \"value\":\"1000\"\n   },\n\u00a0\n\"additionalData\":{\n      \"openinvoicedata.numberOfLines\":\"2\",\n      \"openinvoicedata.line1.currencyCode\":\"SEK\",\n      \"openinvoicedata.line1.description\":\"Shoes\",\n      \"openinvoicedata.line1.itemAmount\":\"331\",\n      \"openinvoicedata.line1.itemVatAmount\":\"69\",\n      \"openinvoicedata.line1.itemVatPercentage\":\"2100\",\n      \"openinvoicedata.line1.numberOfItems\":\"1\",\n      \"openinvoicedata.line1.vatCategory\":\"High\",\n      \"openinvoicedata.line2.currencyCode\":\"SEK\",\n      \"openinvoicedata.line2.description\":\"Socks\",\n      \"openinvoicedata.line2.itemAmount\":\"248\",\n      \"openinvoicedata.line2.itemVatAmount\":\"52\",\n      \"openinvoicedata.line2.itemVatPercentage\":\"2100\",\n      \"openinvoicedata.line2.numberOfItems\":\"2\",\n      \"openinvoicedata.line2.vatCategory\":\"High\"\n   }\nFor your request to be successful, the amounts stated in your request need to be correct:\u00a0\n\n\nFor each line, the\u00a0tax amount (itemVatAmount) has to match the\u00a0tax percentage (itemVatPercentage), given the\u00a0amount excluding tax (itemAmount):\n\nitemVatAmount = (itemAmount * itemVatPercentage)\n\nIn the example above, 69 = (331 * 0,21), and 52 = (248 * 0,21).\n\n\nThe\u00a0value\u00a0specified in the\u00a0amount\u00a0has to match the\u00a0total amount of the invoice lines.\u00a0To calculate the total amount of the invoice lines, refer to the following pseudo-code:\u00a0\ntotal = 0;\n\nfor each (invoiceLine in lineItems) {\n  total += (itemAmount + itemVatAmount) * quantity;\n}\n\ntotalValue = total;\nIn the example above: (331 + 69) * 1 = 400, and (248 + 52) * 2 = 600, so\u00a0totalValue\u00a0= 400 + 600 = 1000.\n\n\nRatePAY Installments\nRatePAY installments are currently only possible via an\u00a0API integration.\n\nContact RatePAY to discuss installment rates you can offer your shoppers to prevent refusals.\n\nFollow the same implementation process as with other Buy Now Pay Later payment methods and add the following:\n\nselectedBrand\u00a0\u2013 set the value to\u00a0ratepay\u00a0(there is no separate value for installments).\nAdd\u00a0the installment object\u00a0to define the number of installments.\n\nAdd the following items in the\u00a0additionalData\u00a0object:\n\nratepay.installmentAmount\u00a0- (required) - Amount the customer has to pay each month.\nratepay.lastInstallmentAmount\u00a0- (required) - Amount of the last installment.\nratepay.interestRate\u00a0- (required) - Interest rate for this installment.\nratepay.paymentFirstday\u00a0- (optional) - Calendar day of the first payment. Example value:\u00a028.\n\n\n\nSee also\n\n\n                    Klarna\n                \n                    Payment methods\n                \n                    Online payments\n                \n                    Payment modifications\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Hosted Payment Pages","lvl4":"Klarna and RatePay open invoice"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages","lvl4":"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/klarna-afterpay-and-ratepay-open-invoice"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Klarna","RatePay","invoice"]}}
