Generate and decode PIX QR codes and copy-and-paste payment codes
The PIX Copy and Paste API provides endpoints to generate dynamic PIX QR codes and copy-and-paste payment codes for receiving money. Also includes functionality to decode QR codes and manage chargebacks.
Key Features
- QR Code Generation: Create PIX QR codes with customizable payment details
- Copy and Paste Codes: Generate text-based payment codes
- Dynamic Payments: Set due dates, expiration dates, and late fees
- QR Code Decoding: Decode existing PIX QR codes
- Chargeback Management: Query and manage chargebacks on received payments
Available Endpoints
Payment Generation
- Create PIX Copy and Paste Web - Generate PIX payment code with QR code
- Decode QR Code - Decode and extract information from PIX QR codes
Chargeback Operations
- Chargeback Status - Check status of a chargeback request
- Chargebacks PIX Copy and Paste - Create and manage chargebacks
Authentication
All PIX Copy and Paste API endpoints require:
- Bearer Token: Include in the
Authorizationheader - HMAC Signature: Include in the
hmacheader for API audience requests
Fine Types
| Type | Description | Example Value |
|---|---|---|
| NONE | No fine or interest | 0 |
| VALUE | Fixed value fine in BRL | 5.00 |
| PERCENT | Percentage fine (e.g., 2% = 2.0) | 2.0 |
Payment Statuses
NEW: Payment code created, awaiting paymentPAID: Payment receivedEXPIRED: Payment code expired without paymentCANCELLED: Payment code cancelledCHARGEBACK_REQUESTED: Chargeback requested by payerCHARGEBACK_APPROVED: Chargeback approved, funds returned
Date Fields
| Field | Description | Required |
|---|---|---|
| due_date | When payment should be made by | Optional |
| expiration_date | When QR code/copy-paste code expires | Optional |
| fine_date | When late fees start being charged | Optional |
Important Rules:
expiration_datemust be at least 1 day afterdue_datefine_datemust be at least 1 day afterdue_date- If
expiration_datepasses, payment cannot be made
Chargeback Process
- Request: Payer initiates chargeback through their bank
- Analysis: System analyzes the chargeback request
- Notification: Recipient is notified via webhook
- Status Check: Query chargeback status to monitor progress
- Resolution: Funds may be returned to payer if approved
Best Practices
- Set Expiration Dates: Always set
expiration_dateto prevent stale QR codes - Include Debtor Info: Provide
debtor_nameanddebtor_documentfor better tracking - Use Tags: Include
tagfield for internal reference/tracking - Base64 Images: Set
base_64_image: falseif you don't need the image in response - Monitor Webhooks: Set up webhooks to receive payment notifications in real-time
