{"title":"Clearpay for API only","category":"default","creationDate":1776961628,"content":"<p>You can add Clearpay to your existing integration. The following instructions show only what you must add to your integration specifically for Clearpay.<\/p>\n<p>If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.<\/p>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have an existing <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\">API-only integration<\/a>.<\/td>\n<td> <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Redirect handling<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your existing integration is set up to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#handle-the-redirect\">handle the redirect<\/a>. <br>  <code>action.type<\/code>: <strong>redirect<\/strong>.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\"> Before you begin, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add Clearpay in your Customer Area<\/a>. <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>The shopper selects Clearpay as the payment method.<\/li>\n<li>The shopper enters their details in the <a href=\"#build-your-payment-form\">payment form that you build<\/a>.<\/li>\n<li>When you make the payment request, you <a href=\"#additional-parameters-payments\">include additional information about the items that the shopper intends to purchase<\/a>.<\/li>\n<li>Your existing integration setup will <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#handle-the-redirect\">handle the redirect<\/a>.<\/li>\n<li>You <a href=\"#capture-the-payment\">capture the payment<\/a>.<\/li>\n<li>Clearpay starts the repayment period for the shopper.<\/li>\n<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include  Clearpay in the list of available payment methods.<\/p>\n<p>To perform risk checks, Clearpay requires you to collect the following shopper details:<\/p>\n<ul>\n<li>Full name<\/li>\n<li>Email address<\/li>\n<li>Billing address and delivery address<\/li>\n<\/ul>\n<div class=\"notices green\">\n<p>You can <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%2Bonly&amp;version=71#downloading-logos\">download the logo for Clearpay<\/a> to use in your form.<\/p>\n<\/div>\n<h2>Get Clearpay as an available payment method<\/h2>\n<p>When you make the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#get-available-payment-methods\">get available payment methods<\/a>, specify the following so that Clearpay is included in the response.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><strong>GB<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/td>\n<td><strong>GBP<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for available payment methods'\" :id=\"'payment-methods-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/paymentMethods \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;countryCode\\&quot;: \\&quot;GB\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;GBP\\&quot;,\\n\\t  \\&quot;value\\&quot;: 1000\\n   },\\n   \\&quot;shopperLocale\\&quot;: \\&quot;gb-GB\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with Clearpay available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"Clearpay\\\",\\n            \\\"type\\\": \\\"clearpay\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"additional-parameters-payments\">Add additional parameters to your \/payments request<\/h2>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#make-a-payment\">make a payment<\/a>, add the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>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-shopperName\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperName<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The shopper's full name.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperEmail\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperEmail<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The shopper's email address.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperReference\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperReference<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>A unique reference to identify the shopper. Minimum length: three characters.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The shopper's country\/region.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-billingAddress\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">billingAddress<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The postal address to be included on the invoice.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-deliveryAddress\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">deliveryAddress<\/a><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The postal address where the goods will be shipped.<\/td>\n<\/tr>\n<tr>\n<td> <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><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Price and product information about the purchased items.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-telephoneNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">telephoneNumber<\/a><\/td>\n<td><\/td>\n<td>The shopper's telephone number, if provided.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for Clearpay'\" :id=\"'payments-request'\" :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 \\\\\\n-H 'x-API-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST\\n-d '{\\n  \\&quot;paymentMethod\\&quot;:{\\n     \\&quot;type\\&quot;:\\&quot;clearpay\\&quot;\\n  },\\n  \\&quot;amount\\&quot;:{\\n     \\&quot;value\\&quot;:1000,\\n     \\&quot;currency\\&quot;:\\&quot;GBP\\&quot;\\n  },\\n  \\&quot;shopperName\\&quot;:{\\n     \\&quot;firstName\\&quot;:\\&quot;Simon\\&quot;,\\n     \\&quot;lastName\\&quot;:\\&quot;Hopper\\&quot;\\n  },\\n  \\&quot;shopperEmail\\&quot;:\\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;shopperReference\\&quot;:\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_REFERENCE\\&quot;,\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;countryCode\\&quot;:\\&quot;GB\\&quot;,\\n  \\&quot;telephoneNumber\\&quot;:\\&quot;+44 203 936 4029\\&quot;,\\n  \\&quot;billingAddress\\&quot;:{\\n     \\&quot;city\\&quot;:\\&quot;London\\&quot;,\\n     \\&quot;country\\&quot;:\\&quot;GB\\&quot;,\\n     \\&quot;houseNumberOrName\\&quot;:\\&quot;8-10\\&quot;,\\n     \\&quot;postalCode\\&quot;:\\&quot;SW1H 0BG\\&quot;,\\n     \\&quot;stateOrProvince\\&quot;:\\&quot;Westminster\\&quot;,\\n     \\&quot;street\\&quot;:\\&quot;Broadway\\&quot;\\n  },\\n  \\&quot;deliveryAddress\\&quot;:{\\n     \\&quot;city\\&quot;:\\&quot;London\\&quot;,\\n     \\&quot;country\\&quot;:\\&quot;GB\\&quot;,\\n     \\&quot;houseNumberOrName\\&quot;:\\&quot;8-10\\&quot;,\\n     \\&quot;postalCode\\&quot;:\\&quot;SW1H 0BG\\&quot;,\\n     \\&quot;stateOrProvince\\&quot;:\\&quot;Westminster\\&quot;,\\n     \\&quot;street\\&quot;:\\&quot;Broadway\\&quot;\\n  },\\n  \\&quot;lineItems\\&quot;:[\\n     {\\n        \\&quot;description\\&quot;:\\&quot;Shoes\\&quot;,\\n        \\&quot;quantity\\&quot;:\\&quot;1\\&quot;,\\n        \\&quot;amountIncludingTax\\&quot;:\\&quot;400\\&quot;,\\n        \\&quot;amountExcludingTax\\&quot;: \\&quot;331\\&quot;,\\n        \\&quot;taxAmount\\&quot;: \\&quot;69\\&quot;,\\n        \\&quot;id\\&quot;:\\&quot;Item #1\\&quot;\\n     },\\n     {\\n        \\&quot;description\\&quot;:\\&quot;Socks\\&quot;,\\n        \\&quot;quantity\\&quot;:\\&quot;2\\&quot;,\\n        \\&quot;amountIncludingTax\\&quot;:\\&quot;300\\&quot;,\\n        \\&quot;amountExcludingTax\\&quot;: \\&quot;248\\&quot;,\\n        \\&quot;taxAmount\\&quot;: \\&quot;52\\&quot;,\\n        \\&quot;id\\&quot;:\\&quot;Item #2\\&quot;\\n     }\\n  ]\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The response includes the <code>action.type<\/code>: <strong><strong>redirect<\/strong><\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with an additional action'\" :id=\"'payments-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"resultCode\\\":\\\"RedirectShopper\\\",\\n    \\\"action\\\":{\\n        \\\"paymentMethodType\\\":\\\"clearpay\\\",\\n        \\\"method\\\":\\\"GET\\\",\\n        \\\"url\\\":\\\"https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/checkoutPaymentRedirect?redirectData=...\\\",\\n        \\\"type\\\":\\\"redirect\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"capture-the-payment\">Capture the payment<\/h2>\n<p>Depending on your merchant account configuration, Clearpay payments are captured automatically after authorisation, or manually captured. If you prefer to capture the payment after the goods have been sent, you need to set up a <a href=\"\/pt\/online-payments\/capture#delayed-automatic-capture\">capture delay<\/a> or use <a href=\"\/pt\/online-payments\/capture#capture-a-payment\">manual capture<\/a>. To partially capture a payment, you also need to use manual capture.<\/p>\n<p>Clearpay payments have to be captured within 13 days after authorisation.<\/p>\n<p>During authorisation, the shopper is charged for the first installment. If the payment is not captured within 13 days, before the second installment, Clearpay cancels the payment and refunds the first installment to the shopper.<\/p>\n<div class=\"notices blue\">\n<p>For testing purposes, Clearpay authorisations expire in one day. When you use manual capture, you need to capture test Clearpay payments within one day after authorisation.<\/p>\n<\/div>\n<h3 id=\"partial-captures\">Full or partial manual captures<\/h3>\n<p>When you use manual capture, in your  <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 specify:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures#request-amount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a>: the full or partial amount that the shopper should pay.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>: (optional) price and product information for the items that the shopper should pay for.<\/li>\n<\/ul>\n<p>Any unclaimed amount that is left over after partially capturing a payment is automatically cancelled. When your account is enabled for <em>multiple<\/em> partial captures, the unclaimed amount after an initial capture is not automatically cancelled.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>To set up multiple partial captures, 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>. Multiple partial captures will create a new invoice for each capture.<\/p>\n<\/div><\/div>\n<h2>Refunds and cancellations<\/h2>\n<p>If a payment has not yet been captured, you can <a href=\"\/pt\/online-payments\/cancel\">cancel<\/a> it. If a payment has already been captured and you want to return the funds to the shopper, you need to <a href=\"\/pt\/online-payments\/refund\">refund<\/a> the payment.<\/p>\n<h3 id=\"partial-refunds\">Full or partial refunds<\/h3>\n<p>To fully or partially refund a payment, in your  <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> request specify:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds#request-amount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a>: the full or partial amount to be refunded to the shopper.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>: (optional) price and product information about the refunded items.<\/li>\n<\/ul>\n<h2>Discounts<\/h2>\n<p>To offer discounts, your payment request must include the negative amount to be added to the original price. The following example shows how to specify a discount of 1 GBP on Item #2:<\/p>\n<pre><code class=\"language-json\">{\n  \"amount\":{\n     \"value\":800,\n     \"currency\":\"GBP\"\n  },\n  ...\n  \"lineItems\":[\n\n     {\n        \"description\":\"Test Clearpay 1\",\n        \"quantity\":\"1\",\n        \"amountIncludingTax\":\"400\",\n        \"id\":\"Item #1\"\n     },\n     {\n        \"description\":\"Test Clearpay 2\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"300\",\n        \"id\":\"Item #2\"\n     }\n\n     {\n        \"description\":\"Discount\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"-100\",\n        \"id\":\"Item #2 Discount\"\n     }\n  ]\n}<\/code><\/pre>\n<h2>Test and go live<\/h2>\n<p>To test Clearpay payments, you need to use the Clearpay sandbox environment and create a test Clearpay shopper account. Clearpay offers separate sandbox environments and test details based on country and region.<br \/>\nFollow the links to the Clearpay developer documentation for more details.<\/p>\n<table>\n<thead>\n<tr>\n<th>Clearpay developer documentation<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/developers.clearpay.co.uk\/v-2\/messaging-implementation#sandbox-testing\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Test Environment (Sandbox)<\/a><\/td>\n<td>More information about how to get access to the sandbox environment.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developers.clearpay.co.uk\/merchant-portal\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Accounts<\/a><\/td>\n<td>Learn how to create a test Clearpay shopper account.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/developers.clearpay.co.uk\/v-2\/guides\/api-development\/test-environments#test-credit-cards\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Test cards<\/a><\/td>\n<td>List of available Clearpay test cards to test different payment flows.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices yellow\">\n<p>In the Clearpay sandbox environment, you will see Adyen as the merchant name. When you go live, this will change to your own merchant name.<\/p>\n<\/div>\n<p>When you have set up your sandbox environment, and created your Clearpay test shopper account, you can make a test payment. You can check the status of test payments in your\u00a0<a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>\u00a0&gt;\u00a0<strong>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<p>Before you can accept live Clearpay payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for Clearpay<\/a> in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/clearpay\/api-only","articleFields":{"description":"Add Clearpay to your API-only integration.","never_cache_twig":true,"parameters":{"flow":"Advanced","integration_guide_url":"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&integration=API%20only","payment_method":"Clearpay","payment_method_type":"clearpay","payment_method_type_capitalized":"Clearpay","tx_variant":"clearpay","tx_variant_capitalized":"Clearpay","country_codes":"<strong>GB<\/strong>","currency_codes":"<strong>GBP<\/strong>","additional_api":"true","api_version":"none","action_type":"<strong>redirect<\/strong>","pm_directory":"clearpay","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/clearpay\/api-only","title":"Clearpay for API only","content":"You can add Clearpay to your existing integration. The following instructions show only what you must add to your integration specifically for Clearpay.\nIf an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have an existing API-only integration.\n \n\n\nRedirect handling\nMake sure that your existing integration is set up to handle the redirect.   action.type: redirect.\n\n\n\nSetup steps\n Before you begin, add Clearpay in your Customer Area. \n\n\n\nHow it works\n\nThe shopper selects Clearpay as the payment method.\nThe shopper enters their details in the payment form that you build.\nWhen you make the payment request, you include additional information about the items that the shopper intends to purchase.\nYour existing integration setup will handle the redirect.\nYou capture the payment.\nClearpay starts the repayment period for the shopper.\n\nBuild your payment form\nInclude  Clearpay in the list of available payment methods.\nTo perform risk checks, Clearpay requires you to collect the following shopper details:\n\nFull name\nEmail address\nBilling address and delivery address\n\n\nYou can download the logo for Clearpay to use in your form.\n\nGet Clearpay as an available payment method\nWhen you make the  \/paymentMethods to get available payment methods, specify the following so that Clearpay is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nGB\n\n\n amount.currency\nGBP\n\n\n\n\n    \n\n\n    \n\nAdd additional parameters to your \/payments request\nWhen you make a payment, add the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n shopperName\n\nThe shopper's full name.\n\n\n shopperEmail\n\nThe shopper's email address.\n\n\n shopperReference\n\nA unique reference to identify the shopper. Minimum length: three characters.\n\n\n countryCode\n\nThe shopper's country\/region.\n\n\n billingAddress\n\nThe postal address to be included on the invoice.\n\n\n deliveryAddress\n\nThe postal address where the goods will be shipped.\n\n\n lineItems\n\nPrice and product information about the purchased items.\n\n\n telephoneNumber\n\nThe shopper's telephone number, if provided.\n\n\n\n\n    \n\nThe response includes the action.type: redirect.\n\n    \n\nCapture the payment\nDepending on your merchant account configuration, Clearpay payments are captured automatically after authorisation, or manually captured. If you prefer to capture the payment after the goods have been sent, you need to set up a capture delay or use manual capture. To partially capture a payment, you also need to use manual capture.\nClearpay payments have to be captured within 13 days after authorisation.\nDuring authorisation, the shopper is charged for the first installment. If the payment is not captured within 13 days, before the second installment, Clearpay cancels the payment and refunds the first installment to the shopper.\n\nFor testing purposes, Clearpay authorisations expire in one day. When you use manual capture, you need to capture test Clearpay payments within one day after authorisation.\n\nFull or partial manual captures\nWhen you use manual capture, in your  \/payments\/{paymentPspReference}\/captures request specify:\n\n amount.value: the full or partial amount that the shopper should pay.\n lineItems: (optional) price and product information for the items that the shopper should pay for.\n\nAny unclaimed amount that is left over after partially capturing a payment is automatically cancelled. When your account is enabled for multiple partial captures, the unclaimed amount after an initial capture is not automatically cancelled.\n\nTo set up multiple partial captures, contact our Support Team. Multiple partial captures will create a new invoice for each capture.\n\nRefunds and cancellations\nIf a payment has not yet been captured, you can cancel it. If a payment has already been captured and you want to return the funds to the shopper, you need to refund the payment.\nFull or partial refunds\nTo fully or partially refund a payment, in your  \/payments\/{paymentPspReference}\/refunds request specify:\n\n amount.value: the full or partial amount to be refunded to the shopper.\n lineItems: (optional) price and product information about the refunded items.\n\nDiscounts\nTo offer discounts, your payment request must include the negative amount to be added to the original price. The following example shows how to specify a discount of 1 GBP on Item #2:\n{\n  \"amount\":{\n     \"value\":800,\n     \"currency\":\"GBP\"\n  },\n  ...\n  \"lineItems\":[\n\n     {\n        \"description\":\"Test Clearpay 1\",\n        \"quantity\":\"1\",\n        \"amountIncludingTax\":\"400\",\n        \"id\":\"Item #1\"\n     },\n     {\n        \"description\":\"Test Clearpay 2\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"300\",\n        \"id\":\"Item #2\"\n     }\n\n     {\n        \"description\":\"Discount\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"-100\",\n        \"id\":\"Item #2 Discount\"\n     }\n  ]\n}\nTest and go live\nTo test Clearpay payments, you need to use the Clearpay sandbox environment and create a test Clearpay shopper account. Clearpay offers separate sandbox environments and test details based on country and region.\nFollow the links to the Clearpay developer documentation for more details.\n\n\n\nClearpay developer documentation\nDescription\n\n\n\n\nTest Environment (Sandbox)\nMore information about how to get access to the sandbox environment.\n\n\nCustomer Accounts\nLearn how to create a test Clearpay shopper account.\n\n\nTest cards\nList of available Clearpay test cards to test different payment flows.\n\n\n\n\nIn the Clearpay sandbox environment, you will see Adyen as the merchant name. When you go live, this will change to your own merchant name.\n\nWhen you have set up your sandbox environment, and created your Clearpay test shopper account, you can make a test payment. You can check the status of test payments in your\u00a0Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\nBefore you can accept live Clearpay payments, you need to submit a request for Clearpay in your live Customer Area.\nSee also\n\n\n                    API-only integration guide\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Clearpay","lvl3":"Clearpay for API only"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/clearpay","lvl3":"\/pt\/payment-methods\/clearpay\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["Clearpay"]},"articleFiles":{"payment-methods-response.json":"<p alt=\"\">payment-methods-response.json<\/p>","payments-response.json":"<p alt=\"\">payments-response.json<\/p>"}}
