Cancel QR code
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:
- The service identifies the external connector (PIX, BANCARD, or DEPAY)
- It invokes the cancellation endpoint of the corresponding connector.
- If the external cancellation is successful, the service proceeds to cancel the internal Payment Intent
- 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:
- The service directly invokes the internal Payment Intent cancellation
- 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.
| Path Parameters |
|---|
point_of_sale_id uuid — REQUIREDThe point of sale identifier associated with the QR code |
qr_id uuid — REQUIREDThe unique identifier of the QR code to cancel |
| Responses | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
204QR code cancelled successfully | ||||||||||||
400Error response
| ||||||||||||
404QR code not found | ||||||||||||
500Internal server error or external connector failure |