Trying to pay a Pix QR Code in Sandbox without a registered key = 404 error

Context

When using the route:

POST 

/v3/pix/qrCodes/pay

in the sandbox environment, a 404 Not Found error may occur when trying to pay a Pix QR Code generated from a charge created via the interface, without a Pix key registered in the account.

This error happens because, in the testing environment, the Pix QR Code payload is not recorded if the account does not have a valid Pix key — or when the charge was created using Bradesco’s Pix integration (which does not generate the payload in sandbox).


Important Note

Although technically the 404 error is correct (the payload really does not exist in sandbox), we understand that this may cause confusion for those integrating with the API, since:

  • The route used is valid;
  • The payload was correctly extracted from the charge;
  • The client’s expectation is that the QR Code should work for testing.

How to Avoid the Error

To ensure the test works in the homologation (sandbox) environment, you must register a Pix key in the account and generate a new charge with a QR Code associated with that key.

See the request to pay a QR Code here.