# Pix

> Accept one-time Pix payments, collect CPF or CNPJ for Direct API orders, and confirm the payment result.

## Basic information

Pix is an instant payment method in Brazil.

- Integration paths: [Checkout](/payments/online-payments/checkout), [Web SDK](/payments/online-payments/sdk), [Direct API](/payments/online-payments/api)
- Transaction type: One-time online payment
- `lpmsInfo.lpmsType`: `PIX`

| Customer country/region | Order currency |
| --- | --- |
| 🇧🇷 BR | BRL |

The customer country/region is the `billingInformation.country` value in the payment request.

Local Pix payments are denominated in Brazilian real (BRL). The order currency (`orderCurrency`) submitted to Onerway must be enabled for your merchant account and application. Before integrating, use [List available payment methods](/payments/api-reference/endpoints/list-available-payment-methods) with the customer’s country or region, order amount, and currency to check the current order.

## Before you begin

Complete [Setup](/payments/get-started/setup) and confirm Pix enablement, applicable transaction limits, and settlement currencies with Onerway. For amount formatting, see [Currency and amount validation](/payments/get-started/currency-and-amount).

Checkout and the Web SDK can collect the identity number on the payment page. Direct API requires you to collect a CPF or CNPJ before creating the order; see the relevant path below.

## Create a payment

### Checkout

You can omit the identity number from the initial request and let the payment page collect it.

Follow [Checkout integration](/payments/online-payments/checkout) to create the payment and send the customer to the returned `redirectUrl`. Onerway handles payment selection and customer interaction. After the customer returns to your site, confirm the server-side result as described below.

### Web SDK

You can omit the identity number from the initial request and let the payment page collect it.

Follow [Web SDK integration](/payments/online-payments/sdk) to create an SDK order, initialize the SDK with the returned `paymentId`, and mount the payment component. The SDK handles customer interaction. Handle payment events and subsequent actions as described in that guide, and confirm the final result on your server.

### Direct API

For Direct API orders, collect the customer's CPF or CNPJ before submitting the request. CPF identifies an individual; CNPJ identifies a legal entity. Onerway accepts both identifiers; send the value as a string without separators.

For a one-time Direct API payment, submit `productType=LPMS`, `subProductType=DIRECT`, `txnType=SALE`, and `lpmsInfo.lpmsType=PIX`. See the API reference for [`billingInformation.identityNumber`](/payments/api-reference/endpoints/direct-create-transaction#request-billingInformation-identityNumber).

In the request examples for [Create direct transaction](/payments/api-reference/endpoints/direct-create-transaction), select “Pix request (illustrative)”. Replace its placeholders with your order and customer data.

With the Direct API, follow the returned `actionType` using the [local payment method action flow](/payments/online-payments/payment-methods/local-payment-methods#handle-the-customer-action). Do not infer the next action from the payment method name alone.

## Customer action and final result

A created transaction or a customer returning to your page does not prove payment success. Confirm the transaction's `status` from the verified [payment result webhook](/payments/api-reference/webhooks/payment-result), or use [Query transactions](/payments/api-reference/endpoints/query-transactions) when reconciling the result. Follow [Webhooks](/payments/get-started/webhooks) for verification, acknowledgement, and duplicate notifications.

Only `status=S` confirms a successful payment; `status=F` indicates failure. Handle other values according to the API reference and retain a pending state where applicable.

## Refunds and disputes

Confirm refund availability, refund limits, and the applicable dispute process with Onerway for your account. When refunds are enabled, follow [Refunds](/payments/online-payments/scenarios/refunds). Do not infer dispute handling from how the customer pays.

## Testing and go-live

Confirm the available test environment and test identity data with Onerway before following [Testing](/payments/get-started/testing).

1. For Direct API, test a CPF order and a CNPJ order using approved test values without separators. Check that each request contains `billingInformation.identityNumber` as a string. For Checkout or Web SDK, also test omission from the initial request and collection on the payment page.
2. Complete a payment using the returned customer action. Confirm that the order becomes paid only after the server receives `status=S` from a verified notification or query.
3. Abandon payment and return to the merchant page. Confirm that returning alone does not mark the order paid, and that a missing notification can be reconciled by querying the transaction.
4. Before launch, confirm production enablement, currencies, limits, and the notification endpoint. Test refunds if enabled for your account.
