Skip to content

Pix

Info

Pix transactions support only Brazilian reals (BRL).

This alternative payment method supports the following operations:


Payment

Payment flow

  1. The customer selects Pix as a payment method.
  2. The merchant sends a payment request to bePaid.
  3. bePaid returns a response containing a QR code and a hash.
  4. The merchant displays the QR code and the hash to the customer.
  5. The customer scans the QR code in their bank application and complete the payment.
  6. Alternatively, the customer can copy the hash and insert it in their mobile application and complete the payment.
  7. bePaid sends a webhook notification to the merchant.
  8. The merchant sends a response to the webhook notification.
Request

Send a payment request with the following additional parameters:

Parameter Type Description
request object
customer object A section of the customer details.
first_name * required
string The customer's first name.
last_name * required
string The customer's last name.
taxpayer_id * required
string Taxpayer number (CPF or CNPJ number).
method object A section of the payment method information.
type * required
string pix
Request example
{
  "request": {
    "amount": 100,
    "currency": "BRL",
    "description": "description",
    "test": false,
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "taxpayer_id": "770.576.826-70"
    },
    "method": {
      "type": "pix"
    }
  }
}
Response

The response will additionally contain the pix object with qr_code and hash parameters.

Parameter Type Description
pix object
qr_code string QR-code for the payment, Base64 encoded.
hash string Code that the customer inserts in their banking application to complete the payment.
Successful response example
{
  "transaction": {
    "uid": "0bc44cfb-3432-4033-a94a-ea537cfbf4dd",
    "type": "payment",
    "status": "pending",
    "amount": 100,
    "currency": "BRL",
    "description": "description",
    "created_at": "2024-02-28T12:36:59Z",
    "updated_at": "2024-02-28T12:36:59Z",
    "method_type": "pix",
    "receipt_url": "https://merchant.bepaid.by/customer/transactions/0bc44cfb-3432-4033-a94a-ea537cfbf4dd/b192284e4aee0bd3deb369c21ff946b4296e34d7a013ec3ae78c317180375571",
    "payment": {
      "status": "pending",
      "gateway_id": 3773,
      "ref_id": "1b9f2399-fccd-441e-a220-48fa041d45b1",
      "message": "Pix gerado com sucesso",
      "bank_code": "0"
    },
    "pix": {
      "qr_code": "qrcode",
      "hash": "qrcodestring"
    },
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "taxpayer_id": "770.576.826-70",
      "email": null,
      "ip": null
    },
    "manually_corrected_at": null,
    "message": "Pix gerado com sucesso",
    "test": false,
    "billing_address": {
      "first_name": "John",
      "last_name": "Doe",
      "taxpayer_id": "770.576.826-70"
    },
    "additional_data": {
      "payment_method": {
        "type": "alternative"
      }
    },
    "gateway": {
      "iframe": false
    }
  }
} 

Refund

Request

Send a standard refund request. The amount value must not exceed the amount of the parent transaction.