{"title":"PayPo for API only","category":"default","creationDate":1776961628,"content":"<p>You can add PayPo to your existing integration. The following instructions show only what you must add to your integration specifically for PayPo.<\/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>Action 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#additional-action\">handle the additional action<\/a>. <br> <code>action.type<\/code>: <span translate=\"no\"><strong>redirect<\/strong><\/span>.<\/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 PayPo 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 PayPo 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<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include PayPo in the list of <a href=\"#get-methods\">available payment methods<\/a>.<\/p>\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 PayPo<\/a> to use in your form.<\/p>\n<\/div>\n<h2 id=\"get-methods\">Get PayPo 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 PayPo 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><span translate=\"no\"><strong>PL<\/strong><\/span><\/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><span translate=\"no\"><strong>PLN<\/strong><\/span><\/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;curl&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;PL\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;,\\n\\t  \\&quot;value\\&quot;: 1000\\n   },\\n   \\&quot;shopperLocale\\&quot;: \\&quot;pl-PL\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v40.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentMethodsResponse response = service.paymentMethods(paymentMethodsRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v28.3.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;paymentMethods($paymentMethodsRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .NET API Library v32.2.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also 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)\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.PaymentMethods(paymentMethodsRequest, 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 v30.0.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentMethodsRequest = {\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;PL\\&quot;,\\n  amount: {\\n    currency: \\&quot;PLN\\&quot;,\\n    value: 1000\\n  },\\n  shopperLocale: \\&quot;pl-PL\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { 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 v21.1.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also 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)\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentMethodsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentMethodsRequest(paymentMethodsRequest)\\nres, httpRes, err := service.PaymentsApi.PaymentMethods(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;PL\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperLocale\\&quot;: \\&quot;pl-PL\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payment_methods(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 v11.0.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :countryCode =&gt; 'PL',\\n  :amount =&gt; {\\n    :currency =&gt; 'PLN',\\n    :value =&gt; 1000\\n  },\\n  :shopperLocale =&gt; 'pl-PL'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payment_methods(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 v30.0.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&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 PayPo available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"PayPo\\\",\\n            \\\"type\\\": \\\"paypo\\\"\\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><code>paymentMethod.type<\/code><\/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><strong>paypo<\/strong><\/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><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-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 <code>firstName<\/code> and <code>lastName<\/code>.<\/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><\/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><\/td>\n<td>The delivery address for the goods purchased.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for PayPo'\" :id=\"'payments-request'\" :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 '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;paypo\\&quot;\\n  },\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;PLN\\&quot;,\\n    \\&quot;value\\&quot;:1000\\n  },\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;:\\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;shopperEmail\\&quot;:\\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;shopperName\\&quot;: {\\n        \\&quot;firstName\\&quot;:\\&quot;Simon\\&quot;,\\n        \\&quot;lastName\\&quot;:\\&quot;Hopper\\&quot;\\n  }\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v40.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also 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;PLN\\&quot;)\\n  .value(1000L);\\n\\nShopperName shopperName = new ShopperName()\\n  .firstName(\\&quot;Simon\\&quot;)\\n  .lastName(\\&quot;Hopper\\&quot;);\\n\\nPaymentDetails paymentDetails = new PaymentDetails()\\n  .type(PaymentDetails.TypeEnum.PAYPO);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .shopperName(shopperName)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(paymentDetails))\\n  .shopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.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;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v28.3.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\ShopperName;\\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, also 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;PLN\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$shopperName = new ShopperName();\\n$shopperName\\n  -&gt;setFirstName(\\&quot;Simon\\&quot;)\\n  -&gt;setLastName(\\&quot;Hopper\\&quot;);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setType(\\&quot;paypo\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setShopperName($shopperName)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.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 v32.2.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also 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;PLN\\&quot;,\\n  Value = 1000\\n};\\n\\nShopperName shopperName = new ShopperName\\n{\\n  FirstName = \\&quot;Simon\\&quot;,\\n  LastName = \\&quot;Hopper\\&quot;\\n};\\n\\nPaymentDetails paymentDetails = new PaymentDetails\\n{\\n  Type = PaymentDetails.TypeEnum.Paypo\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  ShopperName = shopperName,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(paymentDetails),\\n  ShopperEmail = \\&quot;s.hopper@example.com\\&quot;,\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.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 v30.0.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  paymentMethod: {\\n    type: \\&quot;paypo\\&quot;\\n  },\\n  amount: {\\n    currency: \\&quot;PLN\\&quot;,\\n    value: 1000\\n  },\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  shopperName: {\\n    firstName: \\&quot;Simon\\&quot;,\\n    lastName: \\&quot;Hopper\\&quot;\\n  }\\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 v21.1.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also 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;PLN\\&quot;,\\n  Value: 1000,\\n}\\n\\nshopperName := checkout.ShopperName{\\n  FirstName: \\&quot;Simon\\&quot;,\\n  LastName: \\&quot;Hopper\\&quot;,\\n}\\n\\npaymentDetails := checkout.PaymentDetails{\\n  Type: common.PtrString(\\&quot;paypo\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  ShopperName: &amp;shopperName,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod: checkout.PaymentDetailsAsCheckoutPaymentMethod(&amp;paymentDetails),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@example.com\\&quot;),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.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 v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also 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;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paypo\\&quot;\\n  },\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Simon\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Hopper\\&quot;\\n  }\\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 v11.0.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'paypo'\\n  },\\n  :amount =&gt; {\\n    :currency =&gt; 'PLN',\\n    :value =&gt; 1000\\n  },\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.com\\\/checkout?shopperOrder=12xy..',\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :shopperEmail =&gt; 's.hopper@example.com',\\n  :shopperName =&gt; {\\n    :firstName =&gt; 'Simon',\\n    :lastName =&gt; 'Hopper'\\n  }\\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 v30.0.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;PLN\\&quot;,\\n  value: 1000\\n};\\n\\nconst shopperName: Types.checkout.ShopperName = {\\n  firstName: \\&quot;Simon\\&quot;,\\n  lastName: \\&quot;Hopper\\&quot;\\n};\\n\\nconst paymentDetails: Types.checkout.PaymentDetails = {\\n  type: Types.checkout.PaymentDetails.TypeEnum.Paypo\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  shopperName: shopperName,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  paymentMethod: paymentDetails,\\n  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.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>The response includes the <code>action.type<\/code>: <span translate=\"no\"><strong>redirect<\/strong><\/span>.<\/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\\\":\\\"paypo\\\",\\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>Capture the payment<\/h2>\n<p>When a payment is made, but not yet authorized, the offer will be available for up to 72 hours. Therefore, the shopper can use the link to the payment for up to 72 hours.<\/p>\n<p>When the payment is accepted by the shopper, its status will change to <strong>Authorised<\/strong>. The shopper has 30 days to pay according to the terms of PayPo. This is different to some other payment methods where the payment term usually starts after the capture, not after the authorization.<\/p>\n<p>After the payment is authorized, you also have to capture the payment.<\/p>\n<ul>\n<li>It is only possible to capture the full amount of the authorized payment.<\/li>\n<li>It is possible to configure an automatic capture, which executes immediately after authorization. Configure automatic capture when adding PayPo in your live Customer Area.<\/li>\n<li>The merchant does not have to wait for the shopper to complete their payment to PayPo to be funded for the transaction. After the payment is captured, the merchant is funded the full amount of the payment. This is because the capture is only possible for the full amount.<\/li>\n<li>\n<p>To perform the capture, send a request to  <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> using the PSP Reference of the original payment:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/captures 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\\\/CLB738LDH8PQ7RT5\\\/captures \\\\\\n-H \\&quot;x-API-key: ADYEN_API_KEY\\&quot; \\\\\\n-H \\&quot;content-type: application\\\/json\\&quot; \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;value\\&quot;: 1000,\\n        \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;\\n    },\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_UNIQUE_REFERENCE\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\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<\/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 PayPo 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> You will receive the funds in 2-3 days.<\/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>Capture the payment<\/h2>\n<p>When a payment is made, but not yet authorized, the offer will be available for up to 72 hours. Therefore, the shopper can use the link to the payment for up to 72 hours.<\/p>\n<p>When the payment is accepted by the shopper, its status will change to <strong>Authorised<\/strong>. The shopper has 30 days to pay according to the terms of PayPo. This is different to some other payment methods where the payment term usually starts after the capture, not after the authorization.<\/p>\n<p>After the payment is authorized, you also have to capture the payment.<\/p>\n<ul>\n<li>It is only possible to capture the full amount of the authorized payment.<\/li>\n<li>It is possible to configure an automatic capture, which executes immediately after authorization. Configure automatic capture when adding PayPo in your live Customer Area.<\/li>\n<li>The merchant does not have to wait for the shopper to complete their payment to PayPo to be funded for the transaction. After the payment is captured, the merchant is funded the full amount of the payment. This is because the capture is only possible for the full amount.<\/li>\n<li>\n<p>To perform the capture, send a request to  <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> using the PSP Reference of the original payment:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/captures 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\\\/CLB738LDH8PQ7RT5\\\/captures \\\\\\n-H \\&quot;x-API-key: ADYEN_API_KEY\\&quot; \\\\\\n-H \\&quot;content-type: application\\\/json\\&quot; \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;value\\&quot;: 1000,\\n        \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;\\n    },\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_UNIQUE_REFERENCE\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\n<h2>Cancel a payment<\/h2>\n<p>When a payment is authorized, PayPo opens a credit line for the shopper. The shopper is expected to pay PayPo's invoice within 30 days. If you cannot fulfill the order, you are advised to cancel the payment.<\/p>\n<p>To cancel an authorized payment, perform a <a href=\"https:\/\/docs.adyen.com\/online-payments\/cancel\/#cancel-api\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">cancel request<\/a> using the <code>pspReference<\/code> of the original payment.<\/p>\n<h2>Test and go live<\/h2>\n<p>When you test PayPo in your test environment, use the following values for the required parameters:<\/p>\n<p><code>firstName<\/code>: name<br \/>\n<code>lastName<\/code>: surname<br \/>\n<code>shopperEmail<\/code>: email@gmail.com<\/p>\n<p>When you are redirected to PayPo and asked for a verification code, use 123456.<\/p>\n<p>Check the status of PayPo 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 PayPo payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for PayPo<\/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\/paypo\/api-only","articleFields":{"description":"Add PayPo 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":"PayPo","payment_method_type":"paypo","payment_method_type_capitalized":"Paypo","tx_variant":"paypo","tx_variant_capitalized":"Paypo","country_codes":"<span translate=\"no\"><strong>PL<\/strong><\/span>","currency_codes":"<span translate=\"no\"><strong>PLN<\/strong><\/span>","additional_api":"true","api_version":"none","action_type":"<span translate=\"no\"><strong>redirect<\/strong><\/span>","pm_directory":"paypo","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/paypo\/api-only","title":"PayPo for API only","content":"You can add PayPo to your existing integration. The following instructions show only what you must add to your integration specifically for PayPo.\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\nAction handling\nMake sure that your existing integration is set up to handle the additional action.  action.type: redirect.\n\n\n\nSetup steps\n Before you begin, add PayPo in your Customer Area. \n\n\n\nHow it works\n\nThe shopper selects PayPo 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.\n\nBuild your payment form\nInclude PayPo in the list of available payment methods.\n\nYou can download the logo for PayPo to use in your form.\n\nGet PayPo as an available payment method\nWhen you make the  \/paymentMethods to get available payment methods, specify the following so that PayPo is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nPL\n\n\n amount.currency\nPLN\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\npaymentMethod.type\n\npaypo\n\n\n shopperName\n\nThe shopper's email address.\n\n\n shopperEmail\n\nThe shopper's firstName and lastName.\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\n\n    \n\nThe response includes the action.type: redirect.\n\n    \n\nCapture the payment\nWhen a payment is made, but not yet authorized, the offer will be available for up to 72 hours. Therefore, the shopper can use the link to the payment for up to 72 hours.\nWhen the payment is accepted by the shopper, its status will change to Authorised. The shopper has 30 days to pay according to the terms of PayPo. This is different to some other payment methods where the payment term usually starts after the capture, not after the authorization.\nAfter the payment is authorized, you also have to capture the payment.\n\nIt is only possible to capture the full amount of the authorized payment.\nIt is possible to configure an automatic capture, which executes immediately after authorization. Configure automatic capture when adding PayPo in your live Customer Area.\nThe merchant does not have to wait for the shopper to complete their payment to PayPo to be funded for the transaction. After the payment is captured, the merchant is funded the full amount of the payment. This is because the capture is only possible for the full amount.\n\nTo perform the capture, send a request to  \/payments\/{paymentPspReference}\/captures using the PSP Reference of the original payment:\n\n\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\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 PayPo 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.  You will receive the funds in 2-3 days.\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\nWhen a payment is made, but not yet authorized, the offer will be available for up to 72 hours. Therefore, the shopper can use the link to the payment for up to 72 hours.\nWhen the payment is accepted by the shopper, its status will change to Authorised. The shopper has 30 days to pay according to the terms of PayPo. This is different to some other payment methods where the payment term usually starts after the capture, not after the authorization.\nAfter the payment is authorized, you also have to capture the payment.\n\nIt is only possible to capture the full amount of the authorized payment.\nIt is possible to configure an automatic capture, which executes immediately after authorization. Configure automatic capture when adding PayPo in your live Customer Area.\nThe merchant does not have to wait for the shopper to complete their payment to PayPo to be funded for the transaction. After the payment is captured, the merchant is funded the full amount of the payment. This is because the capture is only possible for the full amount.\n\nTo perform the capture, send a request to  \/payments\/{paymentPspReference}\/captures using the PSP Reference of the original payment:\n\n\n\n\n\nCancel a payment\nWhen a payment is authorized, PayPo opens a credit line for the shopper. The shopper is expected to pay PayPo's invoice within 30 days. If you cannot fulfill the order, you are advised to cancel the payment.\nTo cancel an authorized payment, perform a cancel request using the pspReference of the original payment.\nTest and go live\nWhen you test PayPo in your test environment, use the following values for the required parameters:\nfirstName: name\nlastName: surname\nshopperEmail: email@gmail.com\nWhen you are redirected to PayPo and asked for a verification code, use 123456.\nCheck the status of PayPo test payments in your\u00a0Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\nBefore you can accept live PayPo payments, you need to submit a request for PayPo 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":"PayPo","lvl3":"PayPo 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\/paypo","lvl3":"\/pt\/payment-methods\/paypo\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["PayPo"]},"articleFiles":{"payment-methods-request.js":"<p alt=\"\">payment-methods-request.js<\/p>","payment-methods-response.json":"<p alt=\"\">payment-methods-response.json<\/p>","payments-request.js":"<p alt=\"\">payments-request.js<\/p>","payments-response.json":"<p alt=\"\">payments-response.json<\/p>"}}
