Pix
Basic information
Pix is an instant payment method in Brazil.
- Integration paths: Checkout, Web SDK, Direct 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 with the customer’s country or region, order amount, and currency to check the current order.
Before you begin
Complete Setup and confirm Pix enablement, applicable transaction limits, and settlement currencies with Onerway. For amount formatting, see Currency and amount validation.
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 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 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.
In the request examples for Create direct 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. 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, or use Query transactions when reconciling the result. Follow 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. 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.
- For Direct API, test a CPF order and a CNPJ order using approved test values without separators. Check that each request contains
billingInformation.identityNumberas a string. For Checkout or Web SDK, also test omission from the initial request and collection on the payment page. - Complete a payment using the returned customer action. Confirm that the order becomes paid only after the server receives
status=Sfrom a verified notification or query. - 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.
- Before launch, confirm production enablement, currencies, limits, and the notification endpoint. Test refunds if enabled for your account.
Google Pay
How Google Pay differs across Checkout, Web SDK, and Direct API, website registration before going live, choosing the merchant identifier and decryption mode, the Direct API front-end configuration and transaction flow, the two paths for PAN_ONLY tokens, wallet subscriptions, and common issues.
WeChat Pay
Integrate one-time WeChat Pay payments for web QR codes, H5, mini programs, and apps, then confirm the server-side result.