PIX Transfer - Pay QR Code via Copy and Paste

This API processes a PIX payment using a QR Code in "copia e cola" (copy and paste) format via machine credentials (API audience). It decodes the QR Code, validates the payment details, creates and auto-approves the transaction. Authentication is done via Bearer token + HMAC signature.

Headers

ParameterTypeDescriptionExample
AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo
hmacStringHMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC). Computed from the full request body JSON.hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6

Body Details

{
  "source_account_branch_identifier": "0001",
  "source_account_number": "123456",
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff6b2f8cd520400005303986540510.005802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D",
  "amount": 100.50,
  "tag": "Order #12345"
}
FieldTypeDescriptionRequired or Optional
source_account_branch_identifierStringBranch identifier (agency number) of the source account from which the payment will be made.required
source_account_numberStringAccount number of the source account from which the payment will be made.required
pix_copy_and_pasteStringPIX QR Code content in "copia e cola" format. The complete EMV string. Must have at least 1 character.required
amountDecimalPayment amount. Must be greater than 0. Format: 2 decimal places (e.g., 100.50).required
tagStringOptional custom tag or reference for the payment. Can be used for invoice numbers, order IDs, or any custom reference.optional

Request Examples

Pay static QR Code:

POST /v2/finance/create-copy-and-paste-transfer
Authorization: Bearer <access_token>
hmac: <computed_hmac>
Content-Type: application/json

{
  "source_account_branch_identifier": "0001",
  "source_account_number": "123456",
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff6b2f8cd520400005303986540510.005802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D",
  "amount": 50.00
}

Pay with tag reference:

POST /v2/finance/create-copy-and-paste-transfer
Authorization: Bearer <access_token>
hmac: <computed_hmac>
Content-Type: application/json

{
  "source_account_branch_identifier": "0001",
  "source_account_number": "654321",
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix01361234567890123456789012345678901234520400005303986540550.005802BR5925Example Company Name6014CIDADE EXEMPLO62070503***63045ABC",
  "amount": 250.00,
  "tag": "Invoice #INV-2024-456"
}

Pay dynamic QR Code:

POST /v2/finance/create-copy-and-paste-transfer
Authorization: Bearer <access_token>
hmac: <computed_hmac>
Content-Type: application/json

{
  "source_account_branch_identifier": "0001",
  "source_account_number": "123456",
  "pix_copy_and_paste": "00020126360014br.gov.bcb.pix0114+55119876543215204000053039865802BR5913Maria da Silva6008SAO PAULO622905251234567890123456789063040D3A",
  "amount": 1000.00,
  "tag": "Payment ref ABC-123"
}

Response Details

{
  "worked": true,
  "id": 54321,
  "transaction_id": 54321,
  "code_transaction": "xyz789-abc-123-def-456-ghi-789",
  "status": "PROCESSING",
  "amount": 100.50,
  "fee": 0.00,
  "key": null,
  "tag": "Order #12345",
  "from_accout": "123456-7",
  "recipient_instution": "60701190",
  "recipient_instution_name": "Banco Itaú S.A.",
  "recipient_account_id": "098765",
  "recipient_branch_id": "0001",
  "recipient_legal_id": "12345678900",
  "recipient_name": "João da Silva",
  "recipient_account_type": "1",
  "operationUuid": null,
  "erro_descriptor": null,
  "new_erro_descriptor": null
}
FieldTypeDescription
workedBooleanAlways true for successful requests.
idIntegerTransaction ID.
transaction_idIntegerSame as id. Transaction ID.
code_transactionStringTransaction UUID code. Unique identifier.
statusStringTransaction status. See TransactionStatusEnum values below.
amountFloatPayment amount.
feeFloatTransaction fee. Usually 0.00 for PIX.
keyStringPIX key. null for QR Code payments (key is embedded in pix_copy_and_paste).
tagStringCustom tag/reference provided in the request. null if not provided.
from_accoutStringSource account number. (Note: field name contains a known typo preserved for backward compatibility.)
recipient_instutionStringRecipient bank ISPB code (extracted from QR Code). (Note: field name contains a known typo preserved for backward compatibility.)
recipient_instution_nameStringRecipient bank name (resolved from ISPB). null if not resolved.
recipient_account_idStringRecipient account number (extracted from QR Code). null if not available.
recipient_branch_idStringRecipient branch/agency number (extracted from QR Code). null if not available.
recipient_legal_idStringRecipient CPF or CNPJ (extracted from QR Code). null if not available.
recipient_nameStringRecipient name (extracted from QR Code). null if not available.
recipient_account_typeStringRecipient account type. null if not available.
operationUuidStringBank operation UUID. null initially, filled after bank processing.
erro_descriptorStringError description if transaction fails. null if successful.
new_erro_descriptorStringUpdated error description. null if successful.

Enum: TransactionStatusEnum

ValueDescription
NEWTransaction created but not yet processed
PROCESSINGTransaction is being processed by the bank
APPROVEDTransaction approved and waiting for execution
SUCCESSTransaction completed successfully
CANCELED / CANCELLEDTransaction canceled
ERRORTransaction failed with error
AWAITING_BANK_CONFIRMATIONWaiting for bank confirmation
WAITING_REPROCESSINGTransaction is waiting to be reprocessed
PENDENTTransaction pending

Error Responses

HTTP CodeError MessageDescription
400Company not foundThe company associated with the authenticated token was not found in the system. Verify your authentication token.
400Account not foundThe specified account does not exist, does not belong to your company, or your user does not have an active policy for it.
400Account blocked for cashoutThe source account has cashout operations blocked. Contact support if you believe this is an error.
400Invalid QR CodeThe PIX copy and paste string is malformed or invalid. Verify the content of the pix_copy_and_paste field.
400QR Code expiredThe QR Code has expired and cannot be used for payment.
400Amount mismatchThe amount provided does not match the QR Code amount (for dynamic QR Codes with fixed amounts).
401UnauthorizedInvalid or missing authentication token. Ensure you are sending a valid Bearer token and HMAC signature.
422Validation errorRequest validation failed. Check that all required fields are present and in the correct format.

Business Rules

Account Validation:

  • Source account must exist and belong to the authenticated
  • Account must not have cashout operations blocked

QR Code Processing:

  • QR Code is decoded to extract recipient information
  • System validates QR Code format and structure
  • Extracts: recipient name, document (CPF/CNPJ), bank ISPB, account details, amount
  • QR Code must be valid and not expired

Amount Handling:

  • For static QR Codes: User can specify any amount if the QR Code amount is 0 or editable
  • For dynamic QR Codes: Amount must match the QR Code predefined amount
  • Amount must be greater than 0
  • Format: exactly 2 decimal places
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json