Skip to main content

Cancel QR code

DELETE 

/api/v4/qr/:point_of_sale_id/:qr_id

Cancel a QR code generated for point-of-sale transactions.

This unified endpoint acts as an orchestrator that automatically determines the correct cancellation route based on the QR type. The service identifies whether the QR is an external payment QR (PIX, BANCARD, DEPAY) or a Ueno/Internal QR, and handles the cancellation accordingly.

QR Type Identification

The service automatically identifies the QR type based on the QR ID:

  • External QR: QR codes associated with external payment connectors (PIX, BANCARD, DEPAY)
  • Ueno/Internal QR: QR codes generated internally by Geopagos

Cancellation Logic

External QR Codes

For external QR codes, the cancellation process follows these steps:

  1. The service identifies the external connector (PIX, BANCARD, or DEPAY)
  2. It invokes the cancellation endpoint of the corresponding connector.
  3. If the external cancellation is successful, the service proceeds to cancel the internal Payment Intent
  4. If the external cancellation fails, the Payment Intent is NOT cancelled, and an error response is returned

Ueno/Internal QR Codes

For Ueno/Internal QR codes:

  1. The service directly invokes the internal Payment Intent cancellation
  2. No external connector communication is required

Error Handling

If the cancellation fails at any step:

  • For external QR codes: If the external connector cancellation fails, the entire operation fails and the Payment Intent remains active
  • For internal QR codes: The error is returned directly to the caller
  • The service returns a standardized error response indicating the failure reason

The cancellation process ensures data consistency by handling both external connector cancellation and internal Payment Intent cancellation in the correct order.

Request

Responses

QR code cancelled successfully