> ## Documentation Index
> Fetch the complete documentation index at: https://developers.epayclub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PIX

> Collect payments from customers using PIX, Brazil’s instant payment network.

Accept payments from Brazilian customers using PIX, the Central Bank of Brazil's instant payment system. Customers pay by scanning a QR code or copying a payment code into their banking app — no card details required.

<Info>
  This payment method only supports one-time (non-recurring) payments. It is available for BRL transactions to customers in Brazil.
</Info>

## Payment flow

Several steps occur between creating the order and completing the PIX charge.

1. [Create an order](#creating-the-order), setting the customer's CPF/CNPJ as their mobile number.
2. [Encrypt](/api-basics/encryption) and send the pay order request.
3. [Redirect](#completing-the-payment) the customer to complete the PIX payment.
4. Confirm the payment and inform the customer of its outcome.

### Creating the Order

Follow the standard [create order](/orders/create-orders) flow. For PIX, set the customer's `mobile` field to their CPF or CNPJ (Brazil's individual/business taxpayer ID) — this is what we forward to PIX as the transaction's document number.

```json theme={null}
{
   "customer":{
      "firstname":"João",
      "lastname":"Silva",
      "mobile":"241.390.720-32",
      "country":"BR",
      "email":"joao@example.com"
   },
   "order":{
      "amount":100,
      "reference":"40cac2b6-6793-489a-8c96-c97a18b3c58a",
      "description":"Deposit via PIX",
      "currency":"BRL"
   }
}
```

<Info>
  Need to charge a different document number than the one on the order? Pass `apm.documentNumber` in the pay order request below to override it for this transaction only.
</Info>

### Initiating the Payment

Encrypt the order reference and `paymentoption` before sending it to the pay order [endpoint](/api-reference/orders/pay).

<CodeGroup>
  ```json Example (Unencrypted) theme={null}
  {
      "reference": "40cac2b6-6793-489a-8c96-c97a18b3c58a",
      "paymentoption": "PIX"
  }
  ```

  ```json Example (Encrypted) theme={null}
  {
    "data": "B9pQJ1HoxybgfjNnEro+26w7lQZ6jriF3AFiUeGH2Ggacn6cF0srUlqiHEXeEncJcMw6ThDobjuS+AsmvhNfvGPGMddjbt5rcK2JrUnUI4cHk0XebJKoNnjEqivcyq0UKEMdYOLd6mYZtvKu5FMlpz0Lo0aMY49pnYvUGLSsCf/wOhlPx9PHgQDXptT+WBJcO3lzeD8O0S4IVSWPCWPLi7GhGlqhZpheEi1FHq39TCHk12hL3sqkkIktZIkkQVAe8AkwZGhy/CMJZrTzU6IXZr2ulT7mJenZljSk66m0pARcUqwMw/+5PEPECDo8SX3IkX2hmym02pGuWZeHE9ONWcaW7h8UIroQ/+kThz/RtP/UMiK3596cij66JcW+RcXKPiqNKysskcnaOlQFIFuhEiAczimLgd320RrQzehaw1C33UGsCzAG1p2EnDthjTF63BZtEhVlu9kN7qtFCz9AvojZeaZFKOxpJJ0usfwl9Hq5oAa56AFt/3IIsvqrAktTOyMgQ/jGQ6uhRYpA6UAH0CcYyv7L99hgVtRTXAxA/rpCtY7aTR9Pjxb5Lt1IV0Q1V8fWxAv0yY+ss07qeiSIsccsdJiN4LaMx3RvmDlu54XF68w51L34hOCDj/NBoPVUZrSaCJK2GPJ6CjOHI8q2/U2TkU+y+a80XCAC/rgqGhw="
  }
  ```
</CodeGroup>

Upon receiving your request, we will return a successful response with a redirect URL for our hosted PIX payment page.

```json 200 OK [expandable] theme={null}
{
    "data": {
        "paymentDetail": {
            "redirectUrl": "https://checkout-widget.epayclub.com/apm/PGW-PAYREF-CFE5A0D0D31B4E54AABAAD89F123F422",
            "recipientAccount": null,
            "paymentReference": "CP1B3F264C-8DB1-47C1-A50E-6494FB927D51"
        },
        "bankTransferDetails": null,
        "orderPayment": {
            "orderId": 628,
            "orderPaymentReference": "PGW-PAYREF-CFE5A0D0D31B4E54AABAAD89F123F422",
            "currency": "BRL",
            "statusId": 2,
            "orderPaymentResponseCode": "02",
            "orderPaymentResponseMessage": "pending-authentication",
            "orderPaymentInstrument": null,
            "remarks": "Order payment initiated",
            "totalAmount": 100.00,
            "fee": 0.00
        }
    },
    "status": "success",
    "statusCode": "02",
    "message": "pending-authentication"
}
```

### Completing the Payment

Redirect the customer to `paymentDetail.redirectUrl`. This takes them to our hosted PIX payment page, where we render the QR code (and a copy-paste "PIX copia e cola" code) and monitor the payment for you. The customer completes the transfer from their own banking app, and we'll notify you once it's confirmed.

### Verifying the Payment

<Info>
  [Read](/orders/verify-orders) the transaction verification section to learn how to verify your PIX transactions.
</Info>

## Testing your integration

<Warning>
  Kindly [contact](mailto:support@epayclub.com) the support team to enable PIX testing on your account.
</Warning>

Follow these guidelines to successfully test your PIX integration:

1. Use a BRL order currency — PIX is only available for BRL transactions.
2. Set the customer's `mobile` field to a valid-format CPF (e.g. `241.390.720-32`) or CNPJ when creating the order.
3. Set `customer.country` to `BR`.
