--- title: "Pix for API only" description: "Add Pix to your API-only integration." url: "https://docs.adyen.com/payment-methods/pix/api-only" source_url: "https://docs.adyen.com/payment-methods/pix/api-only.md" canonical: "https://docs.adyen.com/payment-methods/pix/api-only" last_modified: "2026-05-24T12:54:31+02:00" language: "en" --- # Pix for API only Add Pix to your API-only integration. [View source](/payment-methods/pix/api-only.md) You can add Pix to your existing integration. The following instructions show only what you must add to your integration specifically for Pix. 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. ## Requirements | Requirement | Description | | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | **Integration type** | Make sure that you have an existing [API-only integration](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only). | | | **Action handling** | Make sure that your existing integration is set up to [handle the additional action](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#additional-action). `action.type`: **qrCode**. | | | **Setup steps** | Before you begin, [add Pix in your Customer Area](/payment-methods/add-payment-methods). | | ## How it works 1. The shopper selects Pix as the payment method. 2. The shopper enters their details in the [payment form that you build](#build-your-payment-form). 3. When you make the payment request, you [include additional information about the items that the shopper intends to purchase](#additional-parameters-payments). 4. Your existing [integration setup](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#additional-action) enables you to present a QR code to the shopper to complete the payment. 5. You [capture the payment](#additional-parameters-payments). ## Build your payment form Include fields to collect the following information from your shopper in the payment form. | Field | Description | | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Name** | The first and last name of the shopper. | | **CPF/CNPJ** | CPF/CNPJ is a unique identifier similar to a social security number. The shopper can provide their **CPF** (Cadastro de Pessoas Físicas) number or their **CNPJ** (Cadastro Nacional da Pessoa Jurídica) number. | Pass the collected data from the front end to your server because you need to submit both Name and CPF/CNPJ in the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request. Show this information to the shopper together with the QR code to help identify the payment. You can [download the logo for Pix](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%2Bonly\&version=71#downloading-logos) to use in your form. ## Get Pix as an available payment method When you make the [/paymentMethods](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods) request to [get available payment methods](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#get-available-payment-methods), specify the following so that Pix is included in the response. | Parameter | Values | | ------------------------------------------------------------------------------------------------------------------ | ------- | | [countryCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-countryCode) | **BR** | | [amount.currency](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods#request-amount-currency) | **BRL** | **Example request for available payment methods** #### curl ```bash curl https://checkout-test.adyen.com/v72/paymentMethods \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "countryCode": "BR", "amount": { "currency": "BRL", "value": 10000 }, "shopperLocale": "br-BR" }' ``` #### Java ```java // Adyen Java API Library v40.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) Amount amount = new Amount() .currency("BRL") .value(10000L); PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest() .amount(amount) .merchantAccount("ADYEN_MERCHANT_ACCOUNT") .countryCode("BR") .shopperLocale("br-BR"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentMethodsResponse response = service.paymentMethods(paymentMethodsRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $amount = new Amount(); $amount ->setCurrency("BRL") ->setValue(10000); $paymentMethodsRequest = new PaymentMethodsRequest(); $paymentMethodsRequest ->setAmount($amount) ->setMerchantAccount("ADYEN_MERCHANT_ACCOUNT") ->setCountryCode("BR") ->setShopperLocale("br-BR"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->paymentMethods($paymentMethodsRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v32.2.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Amount amount = new Amount { Currency = "BRL", Value = 10000 }; PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest { Amount = amount, MerchantAccount = "ADYEN_MERCHANT_ACCOUNT", CountryCode = "BR", ShopperLocale = "br-BR" }; // Send the request var service = new PaymentsService(client); var response = service.PaymentMethods(paymentMethodsRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentMethodsRequest = { merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "BR", amount: { currency: "BRL", value: 10000 }, shopperLocale: "br-BR" } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) amount := checkout.Amount{ Currency: "BRL", Value: 10000, } paymentMethodsRequest := checkout.PaymentMethodsRequest{ Amount: &amount, MerchantAccount: "ADYEN_MERCHANT_ACCOUNT", CountryCode: common.PtrString("BR"), ShopperLocale: common.PtrString("br-BR"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentMethodsInput().IdempotencyKey("UUID").PaymentMethodsRequest(paymentMethodsRequest) res, httpRes, err := service.PaymentsApi.PaymentMethods(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.6.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "countryCode": "BR", "amount": { "currency": "BRL", "value": 10000 }, "shopperLocale": "br-BR" } # Send the request result = adyen.checkout.payments_api.payment_methods(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :merchantAccount => 'ADYEN_MERCHANT_ACCOUNT', :countryCode => 'BR', :amount => { :currency => 'BRL', :value => 10000 }, :shopperLocale => 'br-BR' } # Send the request result = adyen.checkout.payments_api.payment_methods(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const amount: Types.checkout.Amount = { currency: "BRL", value: 10000 }; const paymentMethodsRequest: Types.checkout.PaymentMethodsRequest = { amount: amount, merchantAccount: "ADYEN_MERCHANT_ACCOUNT", countryCode: "BR", shopperLocale: "br-BR" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.paymentMethods(paymentMethodsRequest, { idempotencyKey: "UUID" }); ``` **Example response with Pix available** ```json { "paymentMethods": [ { "name": "Pix", "type": "pix" } ] } ``` ## Add additional parameters to your /payments request When you [make a payment](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only#make-a-payment), add the following parameters: | Parameter | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [paymentMethod](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-paymentMethod) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The `state.data.paymentMethod` from the `onSubmit` event from your front end. | | [amount](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_amount) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The final price of the purchase. | | [shopperName](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#request-shopperName) | | Shopper's first name and last name. | | [socialSecurityNumber](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_socialSecurityNumber) | | The shopper's CPF or CNPJ number. This will be shown to the shopper on the Pix payment form. | | [shopperStatement](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperStatement) | | Free-text field that will be shown to the shopper. By default this contains the message: *$merchantName - Este pagamento PIX para $merchantName é processado por Adyen.* If you provide any value, keep the length under 60 characters. | | [sessionValidity](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_sessionValidity) | | The expiration date of the Pix payment. Default: 1 hour (Checkout API v71 or earlier) or 24 hours (Checkout API v72 or later). | | [lineItems.id](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_lineItems-id) | | The name of the purchased item. Maximum 50 characters. | | [lineItems.amountIncludingTax](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_lineItems-amountIncludingTax) | | The price of the purchased item including tax. Maximum 200 characters. | It is advisable to send both `shopperName` and `socialSecurityNumber`, because this information will be shown to the shopper to help identify the payment. **Example payment request for Pix** #### curl ```bash curl https://checkout-test.adyen.com/v72/payments \ -H 'x-API-key: ADYEN_API_KEY' \ -H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "amount": { "currency": "BRL", "value": 10000 }, "countryCode": "BR", "returnUrl": "adyencheckout://your.package.name", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "reference": "YOUR_PAYMENT_REFERENCE", "paymentMethod": { "type": "pix" }, "shopperName": { "firstName": "Jose", "lastName": "Silva" }, "socialSecurityNumber": "01234567890", "shopperStatement": "Your message to the shopper", "sessionValidity": "2025-10-01T10:00:00+02:00", "lineItems": [ { "id": "item1", "amountIncludingTax": 5000 }, { "id": "item2", "amountIncludingTax": 5000 } ] }' ``` #### Java ```java // Adyen Java API Library v40.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.checkout.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.model.RequestOptions; import com.adyen.service.checkout.*; // For the LIVE environment, also include your liveEndpointUrlPrefix. Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Create the request object(s) LineItem lineItem1 = new LineItem() .id("item1") .amountIncludingTax(5000L); LineItem lineItem2 = new LineItem() .id("item2") .amountIncludingTax(5000L); Amount amount = new Amount() .currency("BRL") .value(10000L); ShopperName shopperName = new ShopperName() .firstName("Jose") .lastName("Silva"); PixDetails pixDetails = new PixDetails() .type(PixDetails.TypeEnum.PIX); PaymentRequest paymentRequest = new PaymentRequest() .reference("YOUR_PAYMENT_REFERENCE") .lineItems(Arrays.asList(lineItem1, lineItem2)) .amount(amount) .shopperName(shopperName) .sessionValidity("2025-10-01T10:00:00+02:00") .merchantAccount("YOUR_MERCHANT_ACCOUNT") .countryCode("BR") .socialSecurityNumber("01234567890") .paymentMethod(new CheckoutPaymentMethod(pixDetails)) .returnUrl("adyencheckout://your.package.name") .shopperStatement("Your message to the shopper"); // Send the request PaymentsApi service = new PaymentsApi(client); PaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey("UUID")); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); // For the LIVE environment, also include your liveEndpointUrlPrefix. $client->setEnvironment(Environment::TEST); // Create the request object(s) $lineItem1 = new LineItem(); $lineItem1 ->setId("item1") ->setAmountIncludingTax(5000); $lineItem2 = new LineItem(); $lineItem2 ->setId("item2") ->setAmountIncludingTax(5000); $amount = new Amount(); $amount ->setCurrency("BRL") ->setValue(10000); $shopperName = new ShopperName(); $shopperName ->setFirstName("Jose") ->setLastName("Silva"); $checkoutPaymentMethod = new CheckoutPaymentMethod(); $checkoutPaymentMethod ->setType("pix"); $paymentRequest = new PaymentRequest(); $paymentRequest ->setReference("YOUR_PAYMENT_REFERENCE") ->setLineItems(array($lineItem1, $lineItem2)) ->setAmount($amount) ->setShopperName($shopperName) ->setSessionValidity("2025-10-01T10:00:00+02:00") ->setMerchantAccount("YOUR_MERCHANT_ACCOUNT") ->setCountryCode("BR") ->setSocialSecurityNumber("01234567890") ->setPaymentMethod($checkoutPaymentMethod) ->setReturnUrl("adyencheckout://your.package.name") ->setShopperStatement("Your message to the shopper"); $requestOptions['idempotencyKey'] = 'UUID'; // Send the request $service = new PaymentsApi($client); $response = $service->payments($paymentRequest, $requestOptions); ``` #### C\# ```cs // Adyen .NET API Library v32.2.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.Checkout; using Adyen.Service.Checkout; // For the LIVE environment, also include your liveEndpointUrlPrefix. var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) LineItem lineItem1 = new LineItem { Id = "item1", AmountIncludingTax = 5000 }; LineItem lineItem2 = new LineItem { Id = "item2", AmountIncludingTax = 5000 }; Amount amount = new Amount { Currency = "BRL", Value = 10000 }; ShopperName shopperName = new ShopperName { FirstName = "Jose", LastName = "Silva" }; PixDetails pixDetails = new PixDetails { Type = PixDetails.TypeEnum.Pix }; PaymentRequest paymentRequest = new PaymentRequest { Reference = "YOUR_PAYMENT_REFERENCE", LineItems = new List{ lineItem1, lineItem2 }, Amount = amount, ShopperName = shopperName, SessionValidity = "2025-10-01T10:00:00+02:00", MerchantAccount = "YOUR_MERCHANT_ACCOUNT", CountryCode = "BR", SocialSecurityNumber = "01234567890", PaymentMethod = new CheckoutPaymentMethod(pixDetails), ReturnUrl = "adyencheckout://your.package.name", ShopperStatement = "Your message to the shopper" }; // Send the request var service = new PaymentsService(client); var response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = "UUID"}); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 const { Client, CheckoutAPI } = require('@adyen/api-library'); // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const paymentRequest = { amount: { currency: "BRL", value: 10000 }, countryCode: "BR", returnUrl: "adyencheckout://your.package.name", merchantAccount: "YOUR_MERCHANT_ACCOUNT", reference: "YOUR_PAYMENT_REFERENCE", paymentMethod: { type: "pix" }, shopperName: { firstName: "Jose", lastName: "Silva" }, socialSecurityNumber: "01234567890", shopperStatement: "Your message to the shopper", sessionValidity: "2025-10-01T10:00:00+02:00", lineItems: [ { id: "item1", amountIncludingTax: 5000 }, { id: "item2", amountIncludingTax: 5000 } ] } // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` #### Go ```go // Adyen Go API Library v21.1.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/checkout" ) // For the LIVE environment, also include your liveEndpointUrlPrefix. client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) lineItem1 := checkout.LineItem{ Id: common.PtrString("item1"), AmountIncludingTax: common.PtrInt64(5000), } lineItem2 := checkout.LineItem{ Id: common.PtrString("item2"), AmountIncludingTax: common.PtrInt64(5000), } amount := checkout.Amount{ Currency: "BRL", Value: 10000, } shopperName := checkout.ShopperName{ FirstName: "Jose", LastName: "Silva", } pixDetails := checkout.PixDetails{ Type: common.PtrString("pix"), } paymentRequest := checkout.PaymentRequest{ Reference: "YOUR_PAYMENT_REFERENCE", LineItems: []checkout.LineItem{ lineItem1, lineItem2, }, Amount: amount, ShopperName: &shopperName, SessionValidity: common.PtrString("2025-10-01T10:00:00+02:00"), MerchantAccount: "YOUR_MERCHANT_ACCOUNT", CountryCode: common.PtrString("BR"), SocialSecurityNumber: common.PtrString("01234567890"), PaymentMethod: checkout.PixDetailsAsCheckoutPaymentMethod(&pixDetails), ReturnUrl: "adyencheckout://your.package.name", ShopperStatement: common.PtrString("Your message to the shopper"), } // Send the request service := client.Checkout() req := service.PaymentsApi.PaymentsInput().IdempotencyKey("UUID").PaymentRequest(paymentRequest) res, httpRes, err := service.PaymentsApi.Payments(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.6.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "amount": { "currency": "BRL", "value": 10000 }, "countryCode": "BR", "returnUrl": "adyencheckout://your.package.name", "merchantAccount": "YOUR_MERCHANT_ACCOUNT", "reference": "YOUR_PAYMENT_REFERENCE", "paymentMethod": { "type": "pix" }, "shopperName": { "firstName": "Jose", "lastName": "Silva" }, "socialSecurityNumber": "01234567890", "shopperStatement": "Your message to the shopper", "sessionValidity": "2025-10-01T10:00:00+02:00", "lineItems": [ { "id": "item1", "amountIncludingTax": 5000 }, { "id": "item2", "amountIncludingTax": 5000 } ] } # Send the request result = adyen.checkout.payments_api.payments(request=json_request, idempotency_key="UUID") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_API_KEY' # For the LIVE environment, also include your liveEndpointUrlPrefix. adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :amount => { :currency => 'BRL', :value => 10000 }, :countryCode => 'BR', :returnUrl => 'adyencheckout://your.package.name', :merchantAccount => 'YOUR_MERCHANT_ACCOUNT', :reference => 'YOUR_PAYMENT_REFERENCE', :paymentMethod => { :type => 'pix' }, :shopperName => { :firstName => 'Jose', :lastName => 'Silva' }, :socialSecurityNumber => '01234567890', :shopperStatement => 'Your message to the shopper', :sessionValidity => '2025-10-01T10:00:00+02:00', :lineItems => [ { :id => 'item1', :amountIncludingTax => 5000 }, { :id => 'item2', :amountIncludingTax => 5000 } ] } # Send the request result = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' => 'UUID' }) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 import { Client, CheckoutAPI, Types } from "@adyen/api-library"; // For the LIVE environment, also include your liveEndpointUrlPrefix. const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const lineItem1: Types.checkout.LineItem = { id: "item1", amountIncludingTax: 5000 }; const lineItem2: Types.checkout.LineItem = { id: "item2", amountIncludingTax: 5000 }; const amount: Types.checkout.Amount = { currency: "BRL", value: 10000 }; const shopperName: Types.checkout.ShopperName = { firstName: "Jose", lastName: "Silva" }; const pixDetails: Types.checkout.PixDetails = { type: Types.checkout.PixDetails.TypeEnum.Pix }; const paymentRequest: Types.checkout.PaymentRequest = { reference: "YOUR_PAYMENT_REFERENCE", lineItems: [lineItem1, lineItem2], amount: amount, shopperName: shopperName, sessionValidity: "2025-10-01T10:00:00+02:00", merchantAccount: "YOUR_MERCHANT_ACCOUNT", countryCode: "BR", socialSecurityNumber: "01234567890", paymentMethod: pixDetails, returnUrl: "adyencheckout://your.package.name", shopperStatement: "Your message to the shopper" }; // Send the request const checkoutAPI = new CheckoutAPI(client); const response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: "UUID" }); ``` The response includes the `action.type`: **qrCode**. **Example response with an additional action** ```json { "additionalData": { "pix.expirationDate": "2021-12-21T13:00:00-03:00", "acquirerReference": "00000000008815658961765250", "acquirerAccountCode": "PixBTGAcquirerAccount" }, "pspReference": "8815658961765250", "resultCode": "Pending", "action": { "paymentData": "Ab02b4c0!BQABAgA...", "paymentMethodType": "pix", "type": "qrCode", "qrCodeData": "DMhpN90TFR2e7TzwHYRFkhw4brxm2wHBg" } } ``` Example webhook: #### JSON ```json { "live":"false", "notificationItems": [ { "NotificationRequestItem": { "additionalData": { ... "pix.originalAmountValue":"100000", "pix.originalAmountCurrency":"BRL" }, "amount": { "currency":"BRL", "value":100000 }, "eventCode":"AUTHORISATION", "eventDate":"2021-12-21T20:49:23-03:00", "merchantAccountCode":"ADYEN_MERCHANT_ACCOUNT", "merchantReference":"YOUR_REFERENCE", "paymentMethod":"pix", "pspReference":"991607125682053H", "success":"true", ... } } ] } ``` #### Soap ```xml false BRL 100000 BRL 100000 AUTHORISATION 2021-12-21T20:49:23-03:00 YOUR_MERCHANT_ACCOUNT YOUR_TRANSACTION_REFERENCE pix 991607125682053H true ``` For more information, see [Webhooks](/development-resources/webhooks/webhook-types). You can include the following fields in your payment confirmation: * `pix.payer.bankName` * `pix.payer.isbp` * `pix.payer.name` * `pix.payer.taxId` To add these fields to your notifications: 1. Log in to your [test Customer Area](https://ca-test.adyen.com/). 2. Select **Developers** > **Webhooks**. 3. Select the edit icon **next to the name of the webhook. 4. Under **Additional settings** > **Payment**, select **Include Pix Payer info**. ## Refunds You can refund a payment within 90 days after the payment in the [Customer Area](/account/manage-payments#refund-a-payment) or via the [Refund API](/online-payments/refund). ## Test and go live Pix is an asynchronous payment method. In the test environment, you can simulate a Pix payment by promoting the pending payment to a sale. 1. Log in to your [test Customer Area](https://ca-test.adyen.com/). 2. Go to **Transactions** > **Offers**. 3. Select the **PSP reference** of the pending Pix payment. 4. Select the **Promote this offer to a sale** button. Pix payments that have been paid (including test offers that you manually promoted to sale) are under **Transactions** > **Payments**. Test the reconciliation process by promoting test payments from offer to sale in your test Customer Area. Before you can accept live Pix payments, you need to [submit a request for Pix](/payment-methods/add-payment-methods) in your [live Customer Area](https://ca-live.adyen.com/). ## See also * [API-only integration guide](/online-payments/build-your-integration/advanced-flow/?platform=Web\&integration=API%20only) * [Webhooks](/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)