Skip to main content

QRCodes notification

When a QRCode is paid, the system will send a notification to the address provided by the customer, informing the customer's status update.

The URL that will receive notifications must be provided through the Register/Change Webhook endpoint.

Making Request

The notification will be sent using the POST method, and expects a HTTP 200 response.

The structure of the JSON sent as request body follows:

HTTP Request Body - PIX QRCODE
 {
"notification_type": "pix_qrcode",
"message": {
"reference_code": "ZENDRYPIXQRCODE2",
"value_cents": 2,
"content": "00020101021126580014br.gov.bcb.pix0136d5091c68-5056-481b-88ad-95eb340a1a2152040000530398654040.025802BR5925Zendry Solucoes em Paga6009SAO PAUL O62220518ZENDRYPIXQRCODE263044FC9",
"status": "paid",
"generator_name": "John Doe",
"generator_document": "67178678097",
"payer_name": "John Doe",
"payer_document": "67178678097",
"registration_date": "2021-11-10T14:51:25.000-03:00",
"payment_date": "2021-11-10T14:52:10.000-03:00",
"end_to_end": "E18236120202206142202a1022c1tg10"
},
"md5":"679f3ff14b8eadd1e504f2a35c0d8fb3"
}
HTTP Request Body - PIX STATIC QRCODE
 {
"notification_type": "pix_static_qrcode",
"message": {
"reference_code": "ZENDRYPIXQRCODE2",
"value_cents": 2,
"content": "00020101021126580014br.gov.bcb.pix0136d5091c68-5056-481b-88ad-95eb340a1a2152040000530398654040.025802BR5925Zendry Solucoes em Paga6009SAO PAUL O62220518ZENDRYPIXQRCODE263044FC9",
"status": "paid",
"generator_name": "John Doe",
"generator_document": "67178678097",
"payer_name": "John Doe",
"payer_document": "67178678097",
"registration_date": "2021-11-10T14:51:25.000-03:00",
"payment_date": "2021-11-10T14:52:10.000-03:00",
"end_to_end": "E18236120202206142202a1022c1tg10"
},
"md5":"679f3ff14b8eadd1e504f2a35c0d8fb3"
}

Error

If a result other than 200 is obtained, the system will try to send for the next 10 minutes, every minute or until a successful result is obtained.

If the error persists after 10 attempts, the notification will be marked as canceled in the system and our team will contact you to investigate any integration issues.

NOTE: To generate the md5 hash of the message it is necessary to consider the following format of the STRING to be encoded.

STRING
 qrcode.{reference_code}.{end_to_end}.{value_cents}.{secret_key}

Where:

  • qrcode: qrcode word written in lowercase
  • {reference_code}* Pix qrcode reference code
  • {end_to_end}: Unique Pix payment identifier
  • {value_cents}: Value in cents
  • {secret_key}: Unique key, exclusive to the customer to generate hash. it will be generated along with API access credentials

The string below must be assembled to generate the MD5 Hash of the message mentioned as an example above, considering that the client's secret key is the word SECRETKEY:

STRING - Example
 qrcode.ZENDRYPIXQRCODE2.E18236120202206142202a1022c1tg10.2.SECRETKEY
Observation

Re-sending notifications after the first failed attempt will only occur in a production environment.

PARAMETERDESCRIPTIONTYPE
notification_type
(Required)
Indicates the type of message transmittedENUM
pix_qrcode
(Dynamic Pix QR code)
pix_static_qrcode
(Static Pix QR code)
message
(Required)
Updated QR code object, as presented by the List QR Codes endpointOBJECT
message.reference_code
(Required)
Identification codeSTRING
limit of 100 characters
message.value_cents
(Required)
Charge amount, in centsINTEGER
Greater than 0
message.content
(Required)
QR Code content (Pix copy and paste code)STRING
limit of 255 characters
message.status
(Required)
Charge statusSTRING (Enum)
error (Error generating charge)
awaiting_payment (Awaiting Payment)
paid (Paid)
canceled (Canceled)
message.generator_name
(Required)
Name of the charge generatorSTRING
limit of 100 characters, numbers only
message.generator_document
(Required)
CPF/CNPJ of the charge generatorSTRING
limit of 14 characters, numbers only
message.payer_name
(Requiredy)
Name of the charge payerSTRING
limit of 100 characters, numbers only
message.payment_document
(Required)
CPF/CNPJ of the charge payerSTRING
limit of 14 characters, numbers only
message.registration_date
(Required)
Charge generation dateSTRING
datetime format YYYY-mm-ddTHH:MM:ss
message.payment_date
(Required)
Charge payment dateSTRING
datetime format YYYY-mm-ddTHH:MM:ss
message.end_toend
(Required)
Unique Pix payment identifierSTRING
limit of 32 characters
md5
(Optional)
MD5 hash for notification authenticationSTRING