Webhook

PIX Charge Webhook

Overview

The PIX Charge webhook provides real-time notifications for PIX charge events, including payment confirmations and refund processing. This webhook is essential for maintaining up-to-date information about your PIX transactions.

Webhook Configuration

Webhook Type

  • Type: PIX_QR_INBOUND
  • Events: Payment confirmations and refund notifications
  • Endpoint: Your registered webhook URL

Registration

To receive PIX charge webhooks, you must register a webhook endpoint using the Webhook API :

Webhook Events

Payment Confirmation Event

Triggered when a PIX charge is successfully paid.

Refund Confirmation Event

Triggered when a refund is processed for a PIX charge.

Webhook Payload Structure

The webhook payload includes the following fields:

{
  "txid": "astra202412dfsdrtsdgdgdst00005Z",
  "amount": 100.00,
  "payer": {
    "documentNumber": "12345678901",
    "name": "João Silva"
  },
  "endToEndId": "E12345678202401151030123456789",
  "devolutionEndToEndId": "E98765432202401151030987654321",
  "type": "PAYMENT",
  "status": "PAID",
  "paymentDate": "2024-01-15T10:30:00.000Z",
  "userReference": "order-12345"
}

Payload Fields

FieldTypeDescription
txidstringUnique transaction identifier of the PIX charge
amountnumberPayment amount
payerobjectInformation about the payer
payer.documentNumberstringPayer's document number (CPF/CNPJ)
payer.namestringPayer's name
endToEndIdstringEnd-to-end transaction identifier from the payment
devolutionEndToEndIdstringEnd-to-end identifier for refunds (only present in refund events)
typestringEvent type: PAYMENT or REFUND
statusstringTransaction status
paymentDatestringISO 8601 timestamp of the payment/refund
userReferencestringClient's reference identifier (if provided during charge creation)

Event Types

Payment Events

Payment Confirmation

{
  "txid": "astra202412dfsdrtsdgdgdst00005Z",
  "amount": 100.00,
  "payer": {
    "documentNumber": "12345678901",
    "name": "João Silva"
  },
  "endToEndId": "E12345678202401151030123456789",
  "devolutionEndToEndId": null,
  "type": "PAYMENT",
  "status": "PAID",
  "paymentDate": "2024-01-15T10:30:00.000Z",
  "userReference": "order-12345"
}

Refund Events

Refund Confirmation

{
  "txid": "astra202412dfsdrtsdgdgdst00005Z",
  "amount": 50.00,
  "payer": {
    "documentNumber": "12345678901",
    "name": "João Silva"
  },
  "endToEndId": "E12345678202401151030123456789",
  "devolutionEndToEndId": "E98765432202401151030987654321",
  "type": "REFUND",
  "status": "REFUNDED",
  "paymentDate": "2024-01-15T11:00:00.000Z",
  "userReference": "order-12345"
}

Status Values

Payment Status

StatusDescription
PAIDPayment has been successfully processed
FAILEDPayment processing failed
CANCELLEDPayment was cancelled

Refund Status

StatusDescription
REFUNDEDRefund has been successfully processed
REFUND_FAILEDRefund processing failed
REFUND_CANCELLEDRefund was cancelled