generate_pix_code
Build a static PIX (BR Code) payment payload for Brazil and optionally render it as a QR image. Returns the payload string by default (render it with generate_qr, or pass format). Static and untracked — nothing is saved to the library. Requires an OpenQR API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | PIX key: CPF, CNPJ, email, +55 phone or random (EVP) key. | |
| city | Yes | Merchant city, ≤15 chars. | |
| name | Yes | Merchant name, ≤25 chars (diacritics stripped to ASCII). | |
| size | No | Image size, 96–2048 (default 512). | |
| txid | No | Transaction id, 1-25 letters/digits. Defaults to ***. | |
| force | No | Build even when validation reports problems (they return as warnings) — e.g. a check-digit warning you have verified yourself. | |
| amount | No | Optional amount in BRL, e.g. 10.50. | |
| format | No | Return a rendered image instead of the payload string. | |
| singleUse | No | Emit point-of-initiation 11: the code works for one payment only. Default reusable. | |
| description | No | Optional description, ≤25 chars. |