{"title":"Pix for API only","category":"default","creationDate":1776961628,"content":"<p>You can add Pix to your existing integration. The following instructions show only what you must add to your integration specifically for Pix.<\/p>\n<p>If an instruction on this page corresponds with a step in the main integration guide, it includes a link to the 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>: <strong>qrCode<\/strong>.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\"> Before you begin, <a href=\"\/pt\/payment-methods\/add-payment-methods\">add Pix 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 Pix 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 <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#additional-action\">integration setup<\/a> enables you to present a QR code to the shopper to complete the payment.<\/li>\n<li>You <a href=\"#additional-parameters-payments\">capture the payment<\/a>.<\/li>\n<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include fields to collect the following information from your shopper in the payment form.<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span translate=\"no\"><strong>Name<\/strong><\/span><\/td>\n<td>The first and last name of the shopper.<\/td>\n<\/tr>\n<tr>\n<td><span translate=\"no\"><strong>CPF\/CNPJ<\/strong><\/span><\/td>\n<td>CPF\/CNPJ is a unique identifier similar to a social security number. The shopper can provide their <span translate=\"no\"><strong>CPF<\/strong><\/span> (Cadastro de Pessoas F\u00edsicas) number or their <span translate=\"no\"><strong>CNPJ<\/strong><\/span> (Cadastro Nacional da Pessoa Jur\u00eddica) number.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Pass the collected data from the front end to your server because you need to submit both Name and CPF\/CNPJ 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. Show this information to the shopper together with the QR code to help identify the payment.<\/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 Pix<\/a> to use in your form.<\/p>\n<\/div>\n<h2>Get Pix 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> request 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 Pix is included in the response.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><strong>BR<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/td>\n<td><strong>BRL<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for available payment methods'\" :id=\"'payment-methods-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;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;BR\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;BRL\\&quot;,\\n\\t  \\&quot;value\\&quot;: 10000\\n   },\\n   \\&quot;shopperLocale\\&quot;: \\&quot;br-BR\\&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)\\nAmount amount = new Amount()\\n  .currency(\\&quot;BRL\\&quot;)\\n  .value(10000L);\\n\\nPaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest()\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .countryCode(\\&quot;BR\\&quot;)\\n  .shopperLocale(\\&quot;br-BR\\&quot;);\\n\\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\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentMethodsRequest;\\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;BRL\\&quot;)\\n  -&gt;setValue(10000);\\n\\n$paymentMethodsRequest = new PaymentMethodsRequest();\\n$paymentMethodsRequest\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setCountryCode(\\&quot;BR\\&quot;)\\n  -&gt;setShopperLocale(\\&quot;br-BR\\&quot;);\\n\\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)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;BRL\\&quot;,\\n  Value = 10000\\n};\\n\\nPaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest\\n{\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode = \\&quot;BR\\&quot;,\\n  ShopperLocale = \\&quot;br-BR\\&quot;\\n};\\n\\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;BR\\&quot;,\\n  amount: {\\n    currency: \\&quot;BRL\\&quot;,\\n    value: 10000\\n  },\\n  shopperLocale: \\&quot;br-BR\\&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)\\namount := checkout.Amount{\\n  Currency: \\&quot;BRL\\&quot;,\\n  Value: 10000,\\n}\\n\\npaymentMethodsRequest := checkout.PaymentMethodsRequest{\\n  Amount: &amp;amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode: common.PtrString(\\&quot;BR\\&quot;),\\n  ShopperLocale: common.PtrString(\\&quot;br-BR\\&quot;),\\n}\\n\\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 v13.6.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;BR\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;BRL\\&quot;,\\n    \\&quot;value\\&quot;: 10000\\n  },\\n  \\&quot;shopperLocale\\&quot;: \\&quot;br-BR\\&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; 'BR',\\n  :amount =&gt; {\\n    :currency =&gt; 'BRL',\\n    :value =&gt; 10000\\n  },\\n  :shopperLocale =&gt; 'br-BR'\\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)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;BRL\\&quot;,\\n  value: 10000\\n};\\n\\nconst paymentMethodsRequest: Types.checkout.PaymentMethodsRequest = {\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;BR\\&quot;,\\n  shopperLocale: \\&quot;br-BR\\&quot;\\n};\\n\\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 Pix available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"Pix\\\",\\n            \\\"type\\\": \\\"pix\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"additional-parameters-payments\">Add additional parameters to your \/payments request<\/h2>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#make-a-payment\">make a payment<\/a>, add the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod<\/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 <code>state.data.paymentMethod<\/code> from the <code>onSubmit<\/code> event from your front end.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_amount\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount<\/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 final price of the purchase.<\/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><\/td>\n<td>Shopper's first name and last name.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_socialSecurityNumber\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">socialSecurityNumber<\/a><\/td>\n<td><\/td>\n<td>The shopper's CPF or CNPJ number. This will be shown to the shopper on the Pix payment form.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_shopperStatement\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperStatement<\/a><\/td>\n<td><\/td>\n<td>Free-text field that will be shown to the shopper. By default this contains the message: <em>$merchantName - Este pagamento PIX para $merchantName \u00e9 processado por Adyen.<\/em> If you provide any value, keep the length under 60 characters.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_sessionValidity\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">sessionValidity<\/a><\/td>\n<td><\/td>\n<td>The expiration date of the Pix payment. Default: 1 hour (Checkout API v71 or earlier) or 24 hours (Checkout API v72 or later). Maximum: 5 days, in <a href=\"https:\/\/www.w3.org\/TR\/NOTE-datetime\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 8601<\/a> format. Example: 2020-07-18T15:42:40.428+01:00<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_lineItems-id\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.id<\/a><\/td>\n<td><\/td>\n<td>The name of the purchased item. Maximum 50 characters.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/post\/payments__reqParam_lineItems-amountIncludingTax\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems.amountIncludingTax<\/a><\/td>\n<td><\/td>\n<td>The price of the purchased item including tax. Maximum 200 characters.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice info\"><div>\n<p>It is advisable to send both <code>shopperName<\/code> and <code>socialSecurityNumber<\/code>, because this information will be shown to the shopper to help identify the payment.<\/p>\n<\/div><\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for Pix'\" :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;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;BRL\\&quot;,\\n    \\&quot;value\\&quot;: 10000\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;BR\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;pix\\&quot;\\n  },\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Jose\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Silva\\&quot;\\n  },\\n  \\&quot;socialSecurityNumber\\&quot;: \\&quot;01234567890\\&quot;,\\n  \\&quot;shopperStatement\\&quot;: \\&quot;Your message to the shopper\\&quot;,\\n  \\&quot;sessionValidity\\&quot;: \\&quot;2025-10-01T10:00:00+02:00\\&quot;,\\n  \\&quot;lineItems\\&quot;: [\\n    {\\n      \\&quot;id\\&quot;: \\&quot;item1\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: 5000\\n    },\\n    {\\n      \\&quot;id\\&quot;: \\&quot;item2\\&quot;,\\n      \\&quot;amountIncludingTax\\&quot;: 5000\\n    }\\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)\\nLineItem lineItem1 = new LineItem()\\n  .id(\\&quot;item1\\&quot;)\\n  .amountIncludingTax(5000L);\\n\\nLineItem lineItem2 = new LineItem()\\n  .id(\\&quot;item2\\&quot;)\\n  .amountIncludingTax(5000L);\\n\\nAmount amount = new Amount()\\n  .currency(\\&quot;BRL\\&quot;)\\n  .value(10000L);\\n\\nShopperName shopperName = new ShopperName()\\n  .firstName(\\&quot;Jose\\&quot;)\\n  .lastName(\\&quot;Silva\\&quot;);\\n\\nPixDetails pixDetails = new PixDetails()\\n  .type(PixDetails.TypeEnum.PIX);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\n  .amount(amount)\\n  .shopperName(shopperName)\\n  .sessionValidity(\\&quot;2025-10-01T10:00:00+02:00\\&quot;)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  .countryCode(\\&quot;BR\\&quot;)\\n  .socialSecurityNumber(\\&quot;01234567890\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(pixDetails))\\n  .returnUrl(\\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;)\\n  .shopperStatement(\\&quot;Your message to the shopper\\&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\\\\LineItem;\\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$lineItem1 = new LineItem();\\n$lineItem1\\n  -&gt;setId(\\&quot;item1\\&quot;)\\n  -&gt;setAmountIncludingTax(5000);\\n\\n$lineItem2 = new LineItem();\\n$lineItem2\\n  -&gt;setId(\\&quot;item2\\&quot;)\\n  -&gt;setAmountIncludingTax(5000);\\n\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;BRL\\&quot;)\\n  -&gt;setValue(10000);\\n\\n$shopperName = new ShopperName();\\n$shopperName\\n  -&gt;setFirstName(\\&quot;Jose\\&quot;)\\n  -&gt;setLastName(\\&quot;Silva\\&quot;);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setType(\\&quot;pix\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  -&gt;setLineItems(array($lineItem1, $lineItem2))\\n  -&gt;setAmount($amount)\\n  -&gt;setShopperName($shopperName)\\n  -&gt;setSessionValidity(\\&quot;2025-10-01T10:00:00+02:00\\&quot;)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setCountryCode(\\&quot;BR\\&quot;)\\n  -&gt;setSocialSecurityNumber(\\&quot;01234567890\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setReturnUrl(\\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;)\\n  -&gt;setShopperStatement(\\&quot;Your message to the shopper\\&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)\\nLineItem lineItem1 = new LineItem\\n{\\n  Id = \\&quot;item1\\&quot;,\\n  AmountIncludingTax = 5000\\n};\\n\\nLineItem lineItem2 = new LineItem\\n{\\n  Id = \\&quot;item2\\&quot;,\\n  AmountIncludingTax = 5000\\n};\\n\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;BRL\\&quot;,\\n  Value = 10000\\n};\\n\\nShopperName shopperName = new ShopperName\\n{\\n  FirstName = \\&quot;Jose\\&quot;,\\n  LastName = \\&quot;Silva\\&quot;\\n};\\n\\nPixDetails pixDetails = new PixDetails\\n{\\n  Type = PixDetails.TypeEnum.Pix\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  LineItems = new List&lt;LineItem&gt;{ lineItem1, lineItem2 },\\n  Amount = amount,\\n  ShopperName = shopperName,\\n  SessionValidity = \\&quot;2025-10-01T10:00:00+02:00\\&quot;,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode = \\&quot;BR\\&quot;,\\n  SocialSecurityNumber = \\&quot;01234567890\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(pixDetails),\\n  ReturnUrl = \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  ShopperStatement = \\&quot;Your message to the shopper\\&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  amount: {\\n    currency: \\&quot;BRL\\&quot;,\\n    value: 10000\\n  },\\n  countryCode: \\&quot;BR\\&quot;,\\n  returnUrl: \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;pix\\&quot;\\n  },\\n  shopperName: {\\n    firstName: \\&quot;Jose\\&quot;,\\n    lastName: \\&quot;Silva\\&quot;\\n  },\\n  socialSecurityNumber: \\&quot;01234567890\\&quot;,\\n  shopperStatement: \\&quot;Your message to the shopper\\&quot;,\\n  sessionValidity: \\&quot;2025-10-01T10:00:00+02:00\\&quot;,\\n  lineItems: [ {\\n    id: \\&quot;item1\\&quot;,\\n    amountIncludingTax: 5000\\n  }, {\\n    id: \\&quot;item2\\&quot;,\\n    amountIncludingTax: 5000\\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)\\nlineItem1 := checkout.LineItem{\\n  Id: common.PtrString(\\&quot;item1\\&quot;),\\n  AmountIncludingTax: common.PtrInt64(5000),\\n}\\n\\nlineItem2 := checkout.LineItem{\\n  Id: common.PtrString(\\&quot;item2\\&quot;),\\n  AmountIncludingTax: common.PtrInt64(5000),\\n}\\n\\namount := checkout.Amount{\\n  Currency: \\&quot;BRL\\&quot;,\\n  Value: 10000,\\n}\\n\\nshopperName := checkout.ShopperName{\\n  FirstName: \\&quot;Jose\\&quot;,\\n  LastName: \\&quot;Silva\\&quot;,\\n}\\n\\npixDetails := checkout.PixDetails{\\n  Type: common.PtrString(\\&quot;pix\\&quot;),\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  LineItems: []checkout.LineItem{\\n      lineItem1, lineItem2,\\n  },\\n  Amount: amount,\\n  ShopperName: &amp;shopperName,\\n  SessionValidity: common.PtrString(\\&quot;2025-10-01T10:00:00+02:00\\&quot;),\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode: common.PtrString(\\&quot;BR\\&quot;),\\n  SocialSecurityNumber: common.PtrString(\\&quot;01234567890\\&quot;),\\n  PaymentMethod: checkout.PixDetailsAsCheckoutPaymentMethod(&amp;pixDetails),\\n  ReturnUrl: \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  ShopperStatement: common.PtrString(\\&quot;Your message to the shopper\\&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 v13.6.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;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;BRL\\&quot;,\\n    \\&quot;value\\&quot;: 10000\\n  },\\n  \\&quot;countryCode\\&quot;: \\&quot;BR\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;pix\\&quot;\\n  },\\n  \\&quot;shopperName\\&quot;: {\\n    \\&quot;firstName\\&quot;: \\&quot;Jose\\&quot;,\\n    \\&quot;lastName\\&quot;: \\&quot;Silva\\&quot;\\n  },\\n  \\&quot;socialSecurityNumber\\&quot;: \\&quot;01234567890\\&quot;,\\n  \\&quot;shopperStatement\\&quot;: \\&quot;Your message to the shopper\\&quot;,\\n  \\&quot;sessionValidity\\&quot;: \\&quot;2025-10-01T10:00:00+02:00\\&quot;,\\n  \\&quot;lineItems\\&quot;: [ {\\n    \\&quot;id\\&quot;: \\&quot;item1\\&quot;,\\n    \\&quot;amountIncludingTax\\&quot;: 5000\\n  }, {\\n    \\&quot;id\\&quot;: \\&quot;item2\\&quot;,\\n    \\&quot;amountIncludingTax\\&quot;: 5000\\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  :amount =&gt; {\\n    :currency =&gt; 'BRL',\\n    :value =&gt; 10000\\n  },\\n  :countryCode =&gt; 'BR',\\n  :returnUrl =&gt; 'adyencheckout:\\\/\\\/your.package.name',\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_PAYMENT_REFERENCE',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'pix'\\n  },\\n  :shopperName =&gt; {\\n    :firstName =&gt; 'Jose',\\n    :lastName =&gt; 'Silva'\\n  },\\n  :socialSecurityNumber =&gt; '01234567890',\\n  :shopperStatement =&gt; 'Your message to the shopper',\\n  :sessionValidity =&gt; '2025-10-01T10:00:00+02:00',\\n  :lineItems =&gt; [ {\\n    :id =&gt; 'item1',\\n    :amountIncludingTax =&gt; 5000\\n  }, {\\n    :id =&gt; 'item2',\\n    :amountIncludingTax =&gt; 5000\\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 lineItem1: Types.checkout.LineItem = {\\n  id: \\&quot;item1\\&quot;,\\n  amountIncludingTax: 5000\\n};\\n\\nconst lineItem2: Types.checkout.LineItem = {\\n  id: \\&quot;item2\\&quot;,\\n  amountIncludingTax: 5000\\n};\\n\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;BRL\\&quot;,\\n  value: 10000\\n};\\n\\nconst shopperName: Types.checkout.ShopperName = {\\n  firstName: \\&quot;Jose\\&quot;,\\n  lastName: \\&quot;Silva\\&quot;\\n};\\n\\nconst pixDetails: Types.checkout.PixDetails = {\\n  type: Types.checkout.PixDetails.TypeEnum.Pix\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  lineItems: [lineItem1, lineItem2],\\n  amount: amount,\\n  shopperName: shopperName,\\n  sessionValidity: \\&quot;2025-10-01T10:00:00+02:00\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;BR\\&quot;,\\n  socialSecurityNumber: \\&quot;01234567890\\&quot;,\\n  paymentMethod: pixDetails,\\n  returnUrl: \\&quot;adyencheckout:\\\/\\\/your.package.name\\&quot;,\\n  shopperStatement: \\&quot;Your message to the shopper\\&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>: <strong>qrCode<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with an additional action'\" :id=\"'payments-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"additionalData\\\": {\\n        \\\"pix.expirationDate\\\": \\\"2021-12-21T13:00:00-03:00\\\",\\n        \\\"acquirerReference\\\": \\\"00000000008815658961765250\\\",\\n        \\\"acquirerAccountCode\\\": \\\"PixBTGAcquirerAccount\\\"\\n    },\\n    \\\"pspReference\\\": \\\"8815658961765250\\\",\\n    \\\"resultCode\\\": \\\"Pending\\\",\\n    \\\"action\\\": {\\n        \\\"paymentData\\\": \\\"Ab02b4c0!BQABAgA...\\\",\\n        \\\"paymentMethodType\\\": \\\"pix\\\",\\n        \\\"type\\\": \\\"qrCode\\\",\\n        \\\"qrCodeData\\\": \\\"DMhpN90TFR2e7TzwHYRFkhw4brxm2wHBg\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>Example webhook:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'std-notification'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n    \\\"live\\\":\\\"false\\\",\\n    \\\"notificationItems\\\": [\\n        {\\n            \\\"NotificationRequestItem\\\": {\\n                \\\"additionalData\\\": {\\n                    ...\\n                    \\\"pix.originalAmountValue\\\":\\\"100000\\\",\\n                    \\\"pix.originalAmountCurrency\\\":\\\"BRL\\\"\\n                },\\n                \\\"amount\\\": {\\n                    \\\"currency\\\":\\\"BRL\\\",\\n                    \\\"value\\\":100000\\n                },\\n                \\\"eventCode\\\":\\\"AUTHORISATION\\\",\\n                \\\"eventDate\\\":\\\"2021-12-21T20:49:23-03:00\\\",\\n                \\\"merchantAccountCode\\\":\\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n                \\\"merchantReference\\\":\\\"YOUR_REFERENCE\\\",\\n                \\\"paymentMethod\\\":\\\"pix\\\",\\n                \\\"pspReference\\\":\\\"991607125682053H\\\",\\n                \\\"success\\\":\\\"true\\\",\\n                ...\\n            }\\n        }\\n    ]\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&lt;?xml version=\\\"1.0\\\"?&gt;\\n&lt;soap:Envelope xmlns:soap=\\\"http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\\"  xmlns:xsd=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\\" xmlns:xsi=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema-instance\\\"&gt;\\n  &lt;soap:Body&gt;\\n    &lt;ns1:sendNotification xmlns:ns1=\\\"http:\\\/\\\/notification.services.adyen.com\\\"&gt;\\n      &lt;ns1:Notification&gt;\\n        &lt;live xmlns=\\\"http:\\\/\\\/notification.services.adyen.com\\\"&gt;false&lt;\\\/live&gt;\\n        &lt;notificationItems xmlns=\\\"http:\\\/\\\/notification.services.adyen.com\\\"&gt;\\n          &lt;NotificationRequestItem&gt;\\n            &lt;additionalData&gt;\\n              &lt;pix.originalAmountCurrency&gt;BRL&lt;\\\/pix.originalAmountCurrency&gt;\\n              &lt;pix.originalAmountValue&gt;100000&lt;\\\/pix.originalAmountValue&gt;\\n            &lt;\\\/additionalData&gt;\\n            &lt;amount&gt;\\n              &lt;currency xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;BRL&lt;\\\/currency&gt;\\n              &lt;value xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;100000&lt;\\\/value&gt;\\n            &lt;\\\/amount&gt;\\n            &lt;eventCode&gt;AUTHORISATION&lt;\\\/eventCode&gt;\\n            &lt;eventDate&gt;2021-12-21T20:49:23-03:00&lt;\\\/eventDate&gt;\\n            &lt;merchantAccountCode&gt;YOUR_MERCHANT_ACCOUNT&lt;\\\/merchantAccountCode&gt;\\n            &lt;merchantReference&gt;YOUR_TRANSACTION_REFERENCE&lt;\\\/merchantReference&gt;\\n            &lt;paymentMethod&gt;pix&lt;\\\/paymentMethod&gt;\\n            &lt;pspReference&gt;991607125682053H&lt;\\\/pspReference&gt;\\n            &lt;success&gt;true&lt;\\\/success&gt;\\n          &lt;\\\/NotificationRequestItem&gt;\\n        &lt;\\\/notificationItems&gt;\\n      &lt;\\\/ns1:Notification&gt;\\n    &lt;\\\/ns1:sendNotification&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>For more information, see <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\">Webhooks<\/a>.<\/p>\n<p>You can include the following fields in your payment confirmation:<\/p>\n<ul>\n<li><code>pix.payer.bankName<\/code><\/li>\n<li><code>pix.payer.isbp<\/code><\/li>\n<li><code>pix.payer.name<\/code><\/li>\n<li><code>pix.payer.taxId<\/code><\/li>\n<\/ul>\n<p>To add these fields to your notifications:<\/p>\n<ol>\n<li>Log in to your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a>.<\/li>\n<li>Select <strong>Developers<\/strong> &gt; <strong>Webhooks<\/strong>.<\/li>\n<li>Select the edit icon <i class=\"adl-icon-edit\"><\/i> next to the name of the webhook.<\/li>\n<li>Under <strong>Additional settings<\/strong> &gt; <strong>Payment<\/strong>, select <strong>Include Pix Payer info<\/strong>.<\/li>\n<\/ol>\n<h2 id=\"refunds\">Refunds<\/h2>\n<p>You can refund a payment within 90 days after the payment in the <a href=\"\/pt\/account\/manage-payments#refund-a-payment\">Customer Area<\/a> or via the <a href=\"\/pt\/online-payments\/refund\">Refund API<\/a>.<\/p>\n<h2>Test and go live<\/h2>\n<p>Pix is an asynchronous payment method. In the test environment, you can simulate a Pix payment by promoting the pending payment to a sale.<\/p>\n<ol>\n<li>Log in to your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a>.<\/li>\n<li>Go to <strong>Transactions<\/strong> &gt; <strong>Offers<\/strong>.<\/li>\n<li>Select the <strong>PSP reference<\/strong> of the pending Pix payment.<\/li>\n<li>Select the <strong>Promote this offer to a sale<\/strong> button.<\/li>\n<\/ol>\n<p>Pix payments that have been paid (including test offers that you manually promoted to sale) are under <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p>Test the reconciliation process by promoting test payments from offer to sale in your test Customer Area.<\/p>\n<p>Before you can accept live Pix payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for Pix<\/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><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\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\/pix\/api-only","articleFields":{"description":"Add Pix 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":"Pix","payment_method_type":"pix","payment_method_type_capitalized":"Pix","tx_variant":"pix","tx_variant_capitalized":"Pix","country_codes":"<strong>BR<\/strong>","currency_codes":"<strong>BRL<\/strong>","additional_api":"true","api_version":"none","action_type":"<strong>qrCode<\/strong>","pm_directory":"pix","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/pix\/api-only","title":"Pix for API only","content":"You can add Pix to your existing integration. The following instructions show only what you must add to your integration specifically for Pix.\nIf an instruction on this page corresponds with a step in the main integration guide, it includes a link to the 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: qrCode.\n\n\n\nSetup steps\n Before you begin, add Pix in your Customer Area. \n\n\n\nHow it works\n\nThe shopper selects Pix 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 enables you to present a QR code to the shopper to complete the payment.\nYou capture the payment.\n\nBuild your payment form\nInclude fields to collect the following information from your shopper in the payment form.\n\n\n\nField\nDescription\n\n\n\n\nName\nThe first and last name of the shopper.\n\n\nCPF\/CNPJ\nCPF\/CNPJ is a unique identifier similar to a social security number. The shopper can provide their CPF (Cadastro de Pessoas F\u00edsicas) number or their CNPJ (Cadastro Nacional da Pessoa Jur\u00eddica) number.\n\n\n\nPass the collected data from the front end to your server because you need to submit both Name and CPF\/CNPJ in the  \/payments request. Show this information to the shopper together with the QR code to help identify the payment.\n\nYou can download the logo for Pix to use in your form.\n\nGet Pix as an available payment method\nWhen you make the  \/paymentMethods request to get available payment methods, specify the following so that Pix is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nBR\n\n\n amount.currency\nBRL\n\n\n\n\n    \n\n\n    \n\nAdd additional parameters to your \/payments request\nWhen you make a payment, add the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n paymentMethod\n\nThe state.data.paymentMethod from the onSubmit event from your front end.\n\n\namount\n\nThe final price of the purchase.\n\n\n shopperName\n\nShopper's first name and last name.\n\n\nsocialSecurityNumber\n\nThe shopper's CPF or CNPJ number. This will be shown to the shopper on the Pix payment form.\n\n\nshopperStatement\n\nFree-text field that will be shown to the shopper. By default this contains the message: $merchantName - Este pagamento PIX para $merchantName \u00e9 processado por Adyen. If you provide any value, keep the length under 60 characters.\n\n\nsessionValidity\n\nThe expiration date of the Pix payment. Default: 1 hour (Checkout API v71 or earlier) or 24 hours (Checkout API v72 or later). Maximum: 5 days, in ISO 8601 format. Example: 2020-07-18T15:42:40.428+01:00\n\n\nlineItems.id\n\nThe name of the purchased item. Maximum 50 characters.\n\n\nlineItems.amountIncludingTax\n\nThe price of the purchased item including tax. Maximum 200 characters.\n\n\n\n\nIt is advisable to send both shopperName and socialSecurityNumber, because this information will be shown to the shopper to help identify the payment.\n\n\n    \n\nThe response includes the action.type: qrCode.\n\n    \n\nExample webhook:\n\n    \n\nFor more information, see Webhooks.\nYou can include the following fields in your payment confirmation:\n\npix.payer.bankName\npix.payer.isbp\npix.payer.name\npix.payer.taxId\n\nTo add these fields to your notifications:\n\nLog in to your test Customer Area.\nSelect Developers &gt; Webhooks.\nSelect the edit icon  next to the name of the webhook.\nUnder Additional settings &gt; Payment, select Include Pix Payer info.\n\nRefunds\nYou can refund a payment within 90 days after the payment in the Customer Area or via the Refund API.\nTest and go live\nPix is an asynchronous payment method. In the test environment, you can simulate a Pix payment by promoting the pending payment to a sale.\n\nLog in to your test Customer Area.\nGo to Transactions &gt; Offers.\nSelect the PSP reference of the pending Pix payment.\nSelect the Promote this offer to a sale button.\n\nPix payments that have been paid (including test offers that you manually promoted to sale) are under Transactions &gt; Payments.\nTest the reconciliation process by promoting test payments from offer to sale in your test Customer Area.\nBefore you can accept live Pix payments, you need to submit a request for Pix in your live Customer Area.\nSee also\n\n\n                    API-only integration guide\n                \n                    Webhooks\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Pix","lvl3":"Pix 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\/pix","lvl3":"\/pt\/payment-methods\/pix\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":[]},"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>","std-notification.json":"<p alt=\"\">std-notification.json<\/p>"}}
