# MD for: https://www.mercadopago.com.br/developers/en/docs/checkout-bricks/payment-brick/payment-submission/pix.md \> SERVER\_SIDE > > h1 > > Pix When finalizing the inclusion of the payment form, it is necessary to send the buyer's email, type and document number, the payment method used (pix) and the value detail. > NOTE > > Important > > Also, it is mandatory to send the attribute \`X-Idempotency-Key\` to ensure the execution and reexecution of requests without the risk of accidentally performing the same action more than once. To do so, update our \[SDKs Library\](https://www.mercadopago.com.br/developers/en/docs/sdks-library/landing), or generate a UUID V4 and send it in the \_header\_ of your requests. To configure payment with Pix, send a \*\*POST\*\* to the endpoint \[/v1/payments\](https://www.mercadopago.com.br/developers/en/reference/online-payments/checkout-api-payments/create-payment/post) and execute the request or, if you prefer, make the request using our SDKs. * [csharp ](#editor%5F5) * [curl ](#editor%5F7) * [java ](#editor%5F3) * [node ](#editor%5F2) * [php ](#editor%5F1) * [python ](#editor%5F6) * [ruby ](#editor%5F4) php node java ruby csharp python curl ``` setCustomHeaders(["X-Idempotency-Key: "]); $payment = $client->create([ "transaction_amount" => (float) $_POST[''], "payment_method_id" => $_POST[''], "payer" => [ "email" => $_POST[''] ] ], $request_options); echo implode($payment); ?> ``` Copiar ``` payment.create({ body: { transaction_amount: 12.34, description: '', payment_method_id: 'pix', payer: { email: '' }}, requestOptions: { idempotencyKey: '' } }).then(console.log).catch(console.log); ``` Copiar ``` Map customHeaders = new HashMap<>(); customHeaders.put("x-idempotency-key", ); MPRequestOptions requestOptions = MPRequestOptions.builder() .customHeaders(customHeaders) .build(); MercadoPagoConfig.setAccessToken("ENV_ACCESS_TOKEN"); PaymentClient client = new PaymentClient(); PaymentCreateRequest paymentCreateRequest = PaymentCreateRequest.builder() .transactionAmount(new BigDecimal("100")) .paymentMethodId("pix") .payer( PaymentPayerRequest.builder() .email("PAYER_EMAIL_HERE") .build()) .build(); client.create(paymentCreateRequest, requestOptions); ``` Copiar ``` require 'mercadopago' sdk = Mercadopago::SDK.new('ENV_ACCESS_TOKEN') custom_headers = { 'x-idempotency-key': '' } custom_request_options = Mercadopago::RequestOptions.new(custom_headers: custom_headers) payment_request = { transaction_amount: 100, payment_method_id: 'pix', payer: { email: 'PAYER_EMAIL_HERE', } } payment_response = sdk.payment.create(payment_request, custom_request_options) payment = payment_response[:response] ``` Copiar ``` using MercadoPago.Config; using MercadoPago.Client.Common; using MercadoPago.Client.Payment; using MercadoPago.Resource.Payment; MercadoPagoConfig.AccessToken = "ENV_ACCESS_TOKEN"; var requestOptions = new RequestOptions(); requestOptions.CustomHeaders.Add("x-idempotency-key", ""); var request = new PaymentCreateRequest { TransactionAmount = 105, PaymentMethodId = "pix", Payer = new PaymentPayerRequest { Email = "PAYER_EMAIL_HERE", }, }; var client = new PaymentClient(); Payment payment = await client.CreateAsync(request, requestOptions); ``` Copiar ``` import mercadopago sdk = mercadopago.SDK("ENV_ACCESS_TOKEN") request_options = mercadopago.config.RequestOptions() request_options.custom_headers = { 'x-idempotency-key': '' } payment_data = { "transaction_amount": 100, "payment_method_id": "pix", "payer": { "email": "PAYER_EMAIL_HERE", } } payment_response = sdk.payment().create(payment_data, request_options) payment = payment_response["response"] ``` Copiar ``` curl -X POST \ -H 'accept: application/json' \ -H 'content-type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ -H 'X-Idempotency-Key: SOME_UNIQUE_VALUE' \ 'https://api.mercadopago.com/v1/payments' \ -d '{ "transaction_amount": 100, "description": "Título do produto", "payment_method_id": "pix", "payer": { "email": "PAYER_EMAIL", "first_name": "Test", "last_name": "User", "identification": { "type": "CPF", "number": "19119119100" }, "address": { "zip_code": "06233200", "street_name": "Av. das Nações Unidas", "street_number": "3003", "neighborhood": "Bonfim", "city": "Osasco", "federal_unit": "SP" } } }' ``` Copiar The response will show the payment \*\*pending status\*\* and all the information you need to show to the buyer. The \`transaction\_data\` value will return the data for QR code. \`\`\`json { ..., "id": 5466310457, "status": "pending", "status\_detail": "pending\_waiting\_transfer", ..., "transaction\_details": { "net\_received\_amount": 0, "total\_paid\_amount": 100, "overpaid\_amount": 0, "external\_resource\_url": null, "installment\_amount": 0, "financial\_institution": null }, "point\_of\_interaction": { "type": "PIX", "sub\_type": null, "application\_data": { "name": "NAME\_SDK", "version": "VERSION\_NUMBER" }, "transaction\_data": { "qr\_code\_base64": "iVBORw0KGgoAAAANSUhEUgAABRQAAAUUCAYAAACu5p7oAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAIABJREFUeJzs2luO3LiWQNFmI+Y/Zd6vRt36KGNXi7ZOBtcagHD4kNLeiLX33v8DAAAAABD879sDAAAAAAA/h6AIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCAAAAAJmgCAAAAABkgiIAAAAAkAmKAAAAAEAmKAIAAAAAmaAIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCA...", "qr\_code": "00020126600014br.gov.bcb.pix0117john@yourdomain.com0217additional data520400005303986540510.005802BR5913Maria Silva6008Brasilia62070503\*\*\*6304E2CA", "ticket\_url": "https://www.mercadopago.com.br/payments/123456789/ticket?caller\_id=123456&hash=123e4567-e89b-12d3-a456-426655440000" } } ..., } \`\`\` ## Show payment status After the payment creation in the backend using the Mercado Pago SDK, use the \*\*id\*\* received in the response to instantiate the Status Screen Brick and show it to the buyer. In addition to displaying the payment status, Status Screen Brick will also display the Pix code to copy and paste and the QR Code for the buyer to scan and pay. Learn how simple it is to integrate \[click here\](https://www.mercadopago.com.br/developers/en/docs/checkout-bricks/status-screen-brick/default-rendering). > WARNING > > Important > > If you used production credentials from a test user to generate the Pix payment, an error will occur when clicking the button that takes you to the QR Code page. To view correctly, just remove \`/sandbox\` from the URL of the opened page. !\[payment-submission-pix-status\](https://www.mercadopago.com.br/checkout-bricks/payment-submission-pix-status-en-v1.jpg) ## Test your integration With the integration completed, you will be able to test payment reception. For more information, access the section \[Make test purchase\](https://www.mercadopago.com.br/developers/en/docs/checkout-bricks/integration-test/test-payment-flow).