PIX Copy and Paste API

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

Chargeback Operations

Authentication

All PIX Copy and Paste API endpoints require:

  • Bearer Token: Include in the Authorization header
  • HMAC Signature: Include in the hmac header for API audience requests

Fine Types

TypeDescriptionExample Value
NONENo fine or interest0
VALUEFixed value fine in BRL5.00
PERCENTPercentage fine (e.g., 2% = 2.0)2.0

Payment Statuses

  • NEW: Payment code created, awaiting payment
  • PAID: Payment received
  • EXPIRED: Payment code expired without payment
  • CANCELLED: Payment code cancelled
  • CHARGEBACK_REQUESTED: Chargeback requested by payer
  • CHARGEBACK_APPROVED: Chargeback approved, funds returned

Date Fields

FieldDescriptionRequired
due_dateWhen payment should be made byOptional
expiration_dateWhen QR code/copy-paste code expiresOptional
fine_dateWhen late fees start being chargedOptional

Important Rules:

  • expiration_date must be at least 1 day after due_date
  • fine_date must be at least 1 day after due_date
  • If expiration_date passes, payment cannot be made

Chargeback Process

  1. Request: Payer initiates chargeback through their bank
  2. Analysis: System analyzes the chargeback request
  3. Notification: Recipient is notified via webhook
  4. Status Check: Query chargeback status to monitor progress
  5. Resolution: Funds may be returned to payer if approved

Best Practices

  1. Set Expiration Dates: Always set expiration_date to prevent stale QR codes
  2. Include Debtor Info: Provide debtor_name and debtor_document for better tracking
  3. Use Tags: Include tag field for internal reference/tracking
  4. Base64 Images: Set base_64_image: false if you don't need the image in response
  5. Monitor Webhooks: Set up webhooks to receive payment notifications in real-time