{"title":"Scalapay for API only","category":"default","creationDate":1567783140,"content":"<p>Accept Scalapay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.<\/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 built an <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Web&amp;integration=API%20only\">API-only integration<\/a>. <\/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 Scalapay in your test Customer Area<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices green\">\n<p>Activating Scalapay defaults the pricing to our standard pricing. Adyen offers Enterprise pricing for merchants with sufficient volume. Before activating Scalapay, contact your account manager to verify if you are eligible.<\/p>\n<\/div>\n<h2>Build your payment form for Scalapay<\/h2>\n<p>Include Scalapay in the list of available payment methods.<\/p>\n<p>In your  <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> request, specify:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a>&#58; <span translate=\"no\"><strong>IT<\/strong><\/span>, <span translate=\"no\"><strong>FR<\/strong><\/span>, <span translate=\"no\"><strong>PT<\/strong><\/span> or <span translate=\"no\"><strong>ES<\/strong><\/span><\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a>&#58; <span translate=\"no\"><strong>EUR<\/strong><\/span><\/li>\n<\/ul>\n<h2 id=\"make-payment\">Make a payment<\/h2>\n<p>In your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request, specify:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>paymentMethod.type<\/code><\/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><span translate=\"no\"><strong>scalapay_3x<\/strong><\/span><\/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 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 shopper's two-letter country code: <span translate=\"no\"><strong>IT<\/strong><\/span>, <span translate=\"no\"><strong>FR<\/strong><\/span>, <span translate=\"no\"><strong>PT<\/strong><\/span> or <span translate=\"no\"><strong>ES<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-returnUrl\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">returnUrl<\/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 URL the shopper is redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.<\/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 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 shopper's email address.<\/td>\n<\/tr>\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 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 shopper's name.<\/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 style=\"text-align: center;\"><\/td>\n<td>The shopper's billing address.<\/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 style=\"text-align: center;\"><\/td>\n<td>The delivery address for the goods purchased.<\/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 style=\"text-align: center;\"><\/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-additionalData-AdditionalDataAirline-airline-flight_date\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">airline.flight_date<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Optional for flights: provide the outbound flight date and time. <br>Format: <code>YYYY-MM-DD hh:mm<\/code>. For example <strong>2025-03-11 22:14<\/strong>. <br>Provide either <code>additionalData.airline.flight_date<\/code> or <code>additionalData.lodging.checkInDate<\/code> in the same transaction.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-additionalData-AdditionalDataLodging-lodging-checkInDate\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lodging.checkInDate<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Optional for lodging: provide the check in date for lodging <br>Format: <code>YYYYMMDD<\/code>. For example <strong>20251101<\/strong>. <br>Provide either <code>additionalData.airline.flight_date<\/code> or <code>additionalData.lodging.checkInDate<\/code> in the same transaction.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Sample \/payments request'\" :id=\"'scalapay-payments'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;:\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;countryCode\\&quot;:\\&quot;IT\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;:\\&quot;scalapay_3x\\&quot;\\n  },\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;,\\n    \\&quot;value\\&quot;:1000\\n  },\\n  \\&quot;shopperName\\&quot;: {\\n     \\&quot;firstName\\&quot;:\\&quot;Simone\\&quot;,\\n     \\&quot;lastName\\&quot;:\\&quot;Hopper\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v28.2.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;EUR\\&quot;)\\n  .value(1000L);\\n\\nName name = new Name()\\n  .firstName(\\&quot;Simone\\&quot;)\\n  .lastName(\\&quot;Hopper\\&quot;);\\n\\nPaymentDetails paymentDetails = new PaymentDetails()\\n  .type(PaymentDetails.TypeEnum.SCALAPAY_3X);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n    .countryCode(\\&quot;IT\\&quot;)\\n  .amount(amount)\\n  .shopperName(name)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(paymentDetails))\\n  .returnUrl(\\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, 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 v20.1.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\Name;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\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\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;EUR\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$name = new Name();\\n$name\\n  -&gt;setFirstName(\\&quot;Simone\\&quot;)\\n  -&gt;setLastName(\\&quot;Hopper\\&quot;);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setType(\\&quot;scalapay_3x\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setCountryCode(\\&quot;IT\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setShopperName($name)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setReturnUrl(\\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v19.1.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;EUR\\&quot;,\\n  Value = 1000\\n};\\n\\nName name = new Name\\n{\\n  FirstName = \\&quot;Simone\\&quot;,\\n  LastName = \\&quot;Hopper\\&quot;\\n};\\n\\nPaymentDetails paymentDetails = new PaymentDetails\\n{\\n  Type = PaymentDetails.TypeEnum.Scalapay3x\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  countryCode = \\&quot;IT\\&quot;,\\n  Amount = amount,\\n  ShopperName = name,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(paymentDetails),\\n  ReturnUrl = \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, 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 v19.2.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 paymentRequest = {\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  countryCode: \\&quot;IT\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;scalapay_3x\\&quot;\\n  },\\n  amount: {\\n    currency: \\&quot;EUR\\&quot;,\\n    value: 1000\\n  },\\n  shopperName: {\\n    firstName: \\&quot;Simone\\&quot;,\\n    lastName: \\&quot;Hopper\\&quot;\\n  },\\n  returnUrl: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { 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 v12.1.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;EUR\\&quot;,\\n  Value: 1000,\\n}\\n\\nname := checkout.Name{\\n  FirstName: \\&quot;Simone\\&quot;,\\n  LastName: \\&quot;Hopper\\&quot;,\\n}\\n\\npaymentDetails := checkout.PaymentDetails{\\n  Type: common.PtrString(\\&quot;scalapay_3x\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  countryCode: \\&quot;IT\\&quot;,\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  ShopperName: &amp;name,\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod: checkout.PaymentDetailsAsCheckoutPaymentMethod(&amp;paymentDetails),\\n  ReturnUrl: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(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.7.0\\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;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;IT\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;scalapay_3x\\&quot;\\n  },\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Simone\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Hopper\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(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.7.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; 'YOUR_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :countryCode =&gt; 'IT',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'scalapay_3x'\\n  },\\n  :amount =&gt; {\\n    :currency =&gt; 'EUR',\\n    :value =&gt; 1000\\n  },\\n  :shopperName =&gt; {\\n    :firstName =&gt; 'Simone',\\n    :lastName =&gt; 'Hopper'\\n  },\\n  :returnUrl =&gt; 'https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(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 v19.2.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;EUR\\&quot;,\\n  value: 1000\\n};\\n\\nconst name: Types.checkout.Name = {\\n  firstName: \\&quot;Simone\\&quot;,\\n  lastName: \\&quot;Hopper\\&quot;\\n};\\n\\nconst paymentDetails: Types.checkout.PaymentDetails = {\\n  type: Types.checkout.PaymentDetails.TypeEnum.Scalapay3x\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  countryCode: \\&quot;IT\\&quot;,\\n  amount: amount,\\n  shopperName: name,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  paymentMethod: paymentDetails,\\n  returnUrl: \\&quot;https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>In the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response, check the <code>action<\/code> object for the information that you must use to redirect the shopper.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'\/payments response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\":\\\"RedirectShopper\\\",\\n  \\\"action\\\":{\\n    \\\"paymentMethodType\\\":\\\"scalapay_3x\\\",\\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>Handle the redirect<\/h2>\n<ol>\n<li>\n<p>To complete the payment, redirect the shopper to the <code>action.url<\/code> returned in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response, taking into account the following recommendations:<\/p>\n<ul>\n<li>\n<p><strong>When using the HTTP GET method:<\/strong><br \/>\nFor security reasons, when showing the redirect in the app, we recommend that you use <a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">SFSafariViewController<\/a> for iOS or <a href=\"https:\/\/developer.chrome.com\/multidevice\/android\/customtabs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Chrome Custom Tabs<\/a> for Android, instead of WebView objects. Also refer to the <a href=\"https:\/\/developer.android.com\/topic\/security\/best-practices#webview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">security best practices<\/a> for WebView.<\/p>\n<\/li>\n<li>\n<p><strong>Redirection for mobile integrations:<\/strong><br \/>\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>After the shopper is redirected back to your website, check the payment result by making a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request, specifying:<\/p>\n<ul>\n<li><code>details<\/code>: object that contains the URL-decoded <code>redirectResult<\/code> returned when the shopper was redirected back to your site.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details request'\" :id=\"''\" :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\\\/details \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;details\\&quot;: {\\n      \\&quot;redirectResult\\&quot;: \\&quot;eyJ0cmFuc1N0YXR1cyI6IlkifQ==\\&quot;\\n   }\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the response note the following:<\/p>\n<ul>\n<li><code>resultCode<\/code>: use this to present the result to your shopper.<\/li>\n<li><code>pspReference<\/code>: our unique identifier for the transaction.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"resultCode\\\": \\\"Authorised\\\",\\n   \\\"pspReference\\\": \\\"V4HZ4RBFJGXXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>If the payment was authorized, the payment method type that you specified in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request will be appended with the country code in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response. For example <code>scalapay_3x_IT<\/code>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response including payment method type'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"resultCode\\\": \\\"Authorised\\\",\\n    \\\"pspReference\\\": \\\"V4HZ4RBFJGXXGN82\\\",\\n    \\\"paymentMethod\\\": {\\n        \\\"type\\\": \\\"scalapay_3x_IT\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Show the payment result<\/h2>\n<p>Use the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details#responses-200-resultCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">resultCode<\/a> that you received in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response to show your shopper the payment result.<\/p>\n<p> <\/p>\n<p>The <code>resultCode<\/code> values you can receive for Scalapay are:<\/p>\n<table>\n<thead>\n<tr>\n<th>resultCode<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Authorised<\/strong><\/td>\n<td>The payment was successful.<\/td>\n<td>Inform the shopper that the payment has been successful. <br>Ship the goods after you successfully <a href=\"#capture\">capture<\/a> the payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>Cancelled<\/strong><\/td>\n<td>The shopper cancelled the payment while on their bank's website.<\/td>\n<td>Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>There was an error when the payment was being processed.<\/td>\n<td>Inform the shopper that there was an error processing their payment. You'll receive a <code>refusalReason<\/code> in the same response, indicating the cause of the error.<\/td>\n<\/tr>\n<tr>\n<td><strong>Pending<\/strong> or  <br> <strong>Received<\/strong><\/td>\n<td>The shopper has completed the payment but the final result is not yet known.<\/td>\n<td>Inform the shopper that you have received their order, and are waiting for the payment to be completed. <br> You will receive the final result of the payment in an <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\">AUTHORISATION webhook<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Refused<\/strong><\/td>\n<td>The payment was refused by the shopper's bank.<\/td>\n<td>Ask the shopper to try the payment again using a different payment method.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"webhooks\"><\/a> If the shopper fails to return to your website or app, wait for webhooks to know the outcome of the payment:<\/p>\n<table>\n<thead>\n<tr>\n<th>eventCode<\/th>\n<th>success field<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>false<\/strong><\/td>\n<td>The transaction failed.<\/td>\n<td>Cancel the order and inform the shopper that the payment failed.<\/td>\n<\/tr>\n<tr>\n<td><strong>AUTHORISATION<\/strong><\/td>\n<td><strong>true<\/strong><\/td>\n<td>The shopper successfully completed the payment.<\/td>\n<td>Inform the shopper that the payment is successful and proceed with the order.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"capture\">Capture the payment<\/h2>\n<p>Depending on your <a href=\"\/pt\/online-payments\/capture\">capture<\/a> settings, Scalapay payments are captured manually or automatically, with or without a delay.<\/p>\n<p>If you use <a href=\"\/pt\/online-payments\/capture\/#manual-capture\">manual capture<\/a>, or <a href=\"\/pt\/online-payments\/capture\/#delayed-automatic-capture\">delayed automatic capture<\/a>, make sure to capture authorized Scalapay transactions within <strong>7 days<\/strong>. After this timeframe, the authorization expires.<\/p>\n<p>Before you ship the goods, make sure that the payment is captured successfully.<\/p>\n<p>If you do not intend to capture the payment, <a href=\"\/pt\/online-payments\/cancel\/#cancel-api\">make a request to cancel the payment<\/a> and release the authorized balance amount. This returns the receivable credit back to the shopper.<\/p>\n<h2>Multiple partial captures<\/h2>\n<p>You can multiple partial captures for Scalapay payments.<\/p>\n<div class=\"notices green\">\n<p>To enable 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> and ask to enable it on your account.<\/p>\n<\/div>\n<p>After your account is enabled for multiple partial captures, you can perform <a href=\"\/pt\/online-payments\/capture\">multiple partial captures<\/a>, providing any amount up to the authorized amount.<\/p>\n<p>If you have authorized balance amount left that you do not intend to capture, you must <a href=\"\/pt\/online-payments\/cancel\/#cancel-api\">make a request to cancel the payment<\/a> and release the remaining authorized balance amount. If you do not cancel the payment, this transaction will not settle until the remaining authorized balance amount is released by Scalapay, which can take up to 7 days.<\/p>\n<div class=\"notices yellow\">\n<p>If multiple partial captures are enabled, Scalapay refunds require the <code>capturePspReference<\/code>. To avoid failed requests, make sure to confirm that your integration can send this reference when issuing refunds.<\/p>\n<\/div>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Use the test cards for the test scenarios that are specified on the <a href=\"https:\/\/developers.scalapay.com\/docs\/test-the-order-flow\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Scalapay website<\/a>.<\/p>\n<p>Check the status of Scalapay 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 Scalapay payments, <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for Scalapay<\/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\/api-only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"\/online-payments\/tokenization\"\n                        target=\"_self\"\n                        >\n                    Tokenization for recurring payments\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/scalapay\/api-only","articleFields":{"description":"Add Scalapay to an existing API-only integration.","parameters":{"payment_method_type":"scalapay_3x","return_url":"https:\/\/your-company.example.com\/checkout?shopperOrder=12xy..","integration":"API-only","platform":"Web","payment_method":"Scalapay"},"feedback_component":true,"filters_component":false,"page_id":"374247ed-85fa-43c7-b75e-ac34df21b349","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/scalapay\/api-only","title":"Scalapay for API only","content":"Accept Scalapay payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built an API-only integration. \n\n\nSetup steps\nBefore you begin, add Scalapay in your test Customer Area.\n\n\n\n\nActivating Scalapay defaults the pricing to our standard pricing. Adyen offers Enterprise pricing for merchants with sufficient volume. Before activating Scalapay, contact your account manager to verify if you are eligible.\n\nBuild your payment form for Scalapay\nInclude Scalapay in the list of available payment methods.\nIn your  \/paymentMethods request, specify:\n\n countryCode&#58; IT, FR, PT or ES\n amount.currency&#58; EUR\n\nMake a payment\nIn your  \/payments request, specify:\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\npaymentMethod.type\n\nscalapay_3x\n\n\n countryCode\n\nThe shopper's two-letter country code: IT, FR, PT or ES.\n\n\n returnUrl\n\nThe URL the shopper is redirected back to after they complete the payment. This URL can have a maximum of 1024 characters.\n\n\n shopperEmail\n\nThe shopper's email address.\n\n\n shopperName\n\nThe shopper's name.\n\n\n billingAddress\n\nThe shopper's billing address.\n\n\n deliveryAddress\n\nThe delivery address for the goods purchased.\n\n\n lineItems\n\nPrice and product information about the purchased items.\n\n\n airline.flight_date\n\nOptional for flights: provide the outbound flight date and time. Format: YYYY-MM-DD hh:mm. For example 2025-03-11 22:14. Provide either additionalData.airline.flight_date or additionalData.lodging.checkInDate in the same transaction.\n\n\n lodging.checkInDate\n\nOptional for lodging: provide the check in date for lodging Format: YYYYMMDD. For example 20251101. Provide either additionalData.airline.flight_date or additionalData.lodging.checkInDate in the same transaction.\n\n\n\n\n    \n\nIn the  \/payments response, check the action object for the information that you must use to redirect the shopper.\n\n    \n\nHandle the redirect\n\n\nTo complete the payment, redirect the shopper to the action.url returned in the  \/payments response, taking into account the following recommendations:\n\n\nWhen using the HTTP GET method:\nFor security reasons, when showing the redirect in the app, we recommend that you use SFSafariViewController for iOS or Chrome Custom Tabs for Android, instead of WebView objects. Also refer to the security best practices for WebView.\n\n\nRedirection for mobile integrations:\nFor mobile integrations, we strongly recommended that you redirect the shopper to the default browser of their device. Redirecting to the default browser ensures the best compatibility, handling of multi-factor authentication, app-to-app redirection, and error handling.\n\n\n\n\nAfter the shopper is redirected back to your website, check the payment result by making a POST  \/payments\/details request, specifying:\n\ndetails: object that contains the URL-decoded redirectResult returned when the shopper was redirected back to your site.\n\n\n\n\n\n\nIn the response note the following:\n\nresultCode: use this to present the result to your shopper.\npspReference: our unique identifier for the transaction.\n\n\n\n\nIf the payment was authorized, the payment method type that you specified in the  \/payments request will be appended with the country code in the  \/payments\/details response. For example scalapay_3x_IT.\n\n\n\n\n\nShow the payment result\nUse the  resultCode that you received in the  \/payments\/details response to show your shopper the payment result.\n \nThe resultCode values you can receive for Scalapay are:\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthorised\nThe payment was successful.\nInform the shopper that the payment has been successful. Ship the goods after you successfully capture the payment.\n\n\nCancelled\nThe shopper cancelled the payment while on their bank's website.\nAsk the shopper whether they want to continue with the order, or ask them to select a different payment method.\n\n\nError\nThere was an error when the payment was being processed.\nInform the shopper that there was an error processing their payment. You'll receive a refusalReason in the same response, indicating the cause of the error.\n\n\nPending or   Received\nThe shopper has completed the payment but the final result is not yet known.\nInform the shopper that you have received their order, and are waiting for the payment to be completed.  You will receive the final result of the payment in an AUTHORISATION webhook.\n\n\nRefused\nThe payment was refused by the shopper's bank.\nAsk the shopper to try the payment again using a different payment method.\n\n\n\n If the shopper fails to return to your website or app, wait for webhooks to know the outcome of the payment:\n\n\n\neventCode\nsuccess field\nDescription\nAction to take\n\n\n\n\nAUTHORISATION\nfalse\nThe transaction failed.\nCancel the order and inform the shopper that the payment failed.\n\n\nAUTHORISATION\ntrue\nThe shopper successfully completed the payment.\nInform the shopper that the payment is successful and proceed with the order.\n\n\n\nCapture the payment\nDepending on your capture settings, Scalapay payments are captured manually or automatically, with or without a delay.\nIf you use manual capture, or delayed automatic capture, make sure to capture authorized Scalapay transactions within 7 days. After this timeframe, the authorization expires.\nBefore you ship the goods, make sure that the payment is captured successfully.\nIf you do not intend to capture the payment, make a request to cancel the payment and release the authorized balance amount. This returns the receivable credit back to the shopper.\nMultiple partial captures\nYou can multiple partial captures for Scalapay payments.\n\nTo enable multiple partial captures, contact our Support Team and ask to enable it on your account.\n\nAfter your account is enabled for multiple partial captures, you can perform multiple partial captures, providing any amount up to the authorized amount.\nIf you have authorized balance amount left that you do not intend to capture, you must make a request to cancel the payment and release the remaining authorized balance amount. If you do not cancel the payment, this transaction will not settle until the remaining authorized balance amount is released by Scalapay, which can take up to 7 days.\n\nIf multiple partial captures are enabled, Scalapay refunds require the capturePspReference. To avoid failed requests, make sure to confirm that your integration can send this reference when issuing refunds.\n\nTest and go live\nUse the test cards for the test scenarios that are specified on the Scalapay website.\nCheck the status of Scalapay test payments in your\u00a0Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\nBefore you can accept live Scalapay payments, submit a request for Scalapay in your live Customer Area.\nSee also\n\n\n                    API-only integration guide\n                \n                    Webhooks\n                \n                    Tokenization for recurring payments\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Scalapay","lvl3":"Scalapay 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\/scalapay","lvl3":"\/pt\/payment-methods\/scalapay\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["Scalapay"]}}
