# Pix Component

Add Pix to an existing Components integration.

## Before you begin

Collect the following details from the shopper:

Pass the collected data to your server because you will need to submit both Name and CPF/CNPJ in the /payments request. This information will be shown to the shopper to help identify the payment.

## API reference

Select which endpoint you're integrating:

This is the default with Components v5.0.0 or later.
Parameter Required Description
amount The final price of the purchase.
shopperName Shopper's first name and last name.
socialSecurityNumber The shopper's CPF or CNPJ number. This will be shown to the shopper on the Pix payment form.
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 because this will be appended to the default message.
sessionValidity The expiration date of the Pix payment. The default value is 24 hours, the maximum value is 5 days, in ISO 8601 format.
For example: 2020-07-18T15:42:40.428+01:00
lineItems.id The name of the purchased item. Maximum 50 characters.
lineItems.amountIncludingTax The price of the purchased item including tax. Maximum 200 characters.
curl https://checkout-test.adyen.com/v68/sessions \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"amount": {
"currency": "",
"value": 100000
},
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
"shopperStatement": "Your message to the shopper.",
"reference": "YOUR_ORDER_NUMBER",
"shopperName": {
"firstName": "Jose",
"infix": "da",
"lastName": "Silva"
},
"socialSecurityNumber": "01234567890",
"lineItems": [{
"id": "Item 1",
"amountIncludingTax": "40000"
},
{
"id": "Item 2",
"amountIncludingTax": "60000"
}
]
}'

## Component configuration

### Step 1: Create a DOM element

Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:

 <div id="pix-container"></div>

### Step 2: Create an instance of the Component

Use the create method of your AdyenCheckout instance, in this case checkout, to create the Component:

const pixComponent = checkout.create('pix').mount('#pix-container');

## Refunds

You can refund a payment within 90 days after the payment in the Customer Area or using an API.

## 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.