Generate PIX charge (Cash-In)
Generates a dynamic QR Code for receiving payments via PIX.
Requires a Bearer token in the Authorization header.
| Field | Type | Required | Description |
|---|
transaction | object | Yes | Transaction data |
transaction.value | number | Yes | Amount in BRL (up to 2 decimal places) |
transaction.description | string | Yes | Transaction description |
transaction.externalId | string | Yes | External transaction ID (unique identifier) |
transaction.expirationTime | number | No | Expiration time in seconds (min 5 min, max 7 days). Default: 86400 |
transaction.generateQrCode | boolean | No | If true, returns the QR Code in Base64. Default: false |
payer | object | Yes | Payer data |
payer.fullName | string | Yes | Payer's full name |
payer.document | string | Yes | Payer's CPF or CNPJ (numbers only) |
additionalInfo | object | No | Additional information (string:string key-value pairs, maximum 10 keys) |
{
"transaction": {
"value": 0.05,
"description": "Cobrança de teste",
"externalId": "external-teste-01",
"expirationTime": 86400,
"generateQrCode": true
},
"payer": {
"fullName": "John Marvin",
"document": "12312312387"
},
"additionalInfo": {
"orderId": "ORD-12345"
}
}
| Field | Type | Description |
|---|
transactionId | string | Unique identifier of the generated transaction |
correlationId | string | Transaction correlation ID (UUID) |
externalId | string | External transaction ID (same value as input) |
status | string | Transaction status (PENDING, CONFIRMED, ERROR) |
pixCode | string | PIX code in standard EMV format |
generateTime | string | PIX generation date and time (ISO 8601) |
expirationDate | string | PIX expiration date and time (ISO 8601) |
qrCodeImage | string | QR Code in Base64 (only when generateQrCode=true) |
{
"transactionId": "123",
"correlationId": "550e8400-e29b-41d4-a716-446655440000",
"externalId": "external-teste-01",
"status": "PENDING",
"pixCode": "00020126580014br.gov.bcb.pix...",
"generateTime": "2024-01-15T10:30:00.000Z",
"expirationDate": "2024-01-16T10:30:00.000Z",
"qrCodeImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
| Status | Description |
|---|
| 400 | Invalid data |
| 401 | Missing or invalid token |
| 500 | Error generating PIX charge |