> This page is for BaaS.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.api.corpx.com/_mcp/server.

# Cancel Pix QR code

DELETE https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/qr-code

Cancels a QR code by its `identifier`. To look up the current
status of a QR (paid / awaiting / expired) use
`GET /v1/accounts/{accountId}/pix/qr-code/lookup` instead.

Reference: https://docs.api.corpx.com/baas/referencia/pix/cancel-pix-qr

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `accountId` (string, required) — Account identifier.

### Query parameters

- `identifier` (string, required) — Identifier assigned during QR creation.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).

## Response

### 200

QR code cancelled.

- `txid` (string, required) — QR code transaction ID (used as qrcodeId).
- `emv` (string, required) — EMV PIX copy-and-paste code (BR Code). Render this as the QR / "copia e cola".
- `type` (enum, required)
  - Allowed values: `dynamic`, `static`, `due-date`, `location`
- `status` (string, required) — QR status. `ACTIVE` right after creation; `BLOCKED` for a Location QR until it is confirmed.
- `identifier` (string, required) — Client-provided identifier (use for lookups).
- `value` (double, optional) — Charge amount in BRL.
- `message` (string, optional) — Message shown to the payer.
- `description` (string, optional) — Same as `message` (alias).
- `accountId` (string, optional) — Account that owns the charge.
- `pixKey` (string, optional) — PIX key used in the charge.
- `allowChange` (boolean, optional) — Whether the payer may change the amount.
- `createdAt` (datetime, optional)
- `expiresAt` (datetime, optional) — Last instant the QR accepts payment. For due-date and Location QR codes, the end of `dueDate + daysAfterDueDate` (Brasília).
- `locationId` (string, optional) — Location QR identifier at the settlement bank (Location QR only). Accepted instead of `identifier` on confirmation.
- `dueDate` (date, optional) — Due day (due-date and confirmed Location QR only).
- `daysAfterDueDate` (integer, optional) — Days after the due date the QR still accepts payment (due-date and confirmed Location QR only).
- `deduction` (double, optional) — Deduction in BRL (due-date and confirmed Location QR only).
- `discount` (double, optional) — Discount in BRL (due-date and confirmed Location QR only).
- `interest` (double, optional) — Interest in BRL (due-date and confirmed Location QR only).
- `penalty` (double, optional) — Penalty in BRL (due-date and confirmed Location QR only).
- `finalValue` (double, optional) — Amount to pay up to the due date (due-date and confirmed Location QR only).
- `debtor` (PixQrDebtor, optional) — Debtor given at issuance (due-date and confirmed Location QR only).
- `receiverName` (string, optional) — Receiver name shown to the payer (due-date and confirmed Location QR only).

## Errors

### 400 Bad Request Error

Invalid request sent by client.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 500 Internal Server Error

Unexpected server error.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### PixQrDebtor

Debtor of a due-date or Location charge. Who actually paid comes in `payer` after payment.

- `name` (string, required) — Debtor name.
- `document` (string, required) — Debtor CPF (11 digits) or CNPJ (14 digits). Punctuation is ignored.

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

## Examples

**Response**

```json
{
  "txid": "88a38a908a92441a98dac228ee1d9507",
  "emv": "00020101021226790014br.gov.bcb.pix...",
  "type": "dynamic",
  "status": "ACTIVE",
  "identifier": "order-12345",
  "value": 150.75,
  "message": "Pagamento pedido #12345",
  "description": "Pagamento pedido #12345",
  "accountId": "2e6b725b-84a0-400d-8740-22a5ba0f23e6",
  "pixKey": "db5c2a29-243e-42a2-862b-89737c0213aa",
  "allowChange": true,
  "createdAt": "2026-02-20T08:33:39Z",
  "expiresAt": "2026-02-20T08:33:39Z"
}
```

**SDK Code**

```python Pix_cancelPixQr_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code"

querystring = {"identifier":"identifier"}

headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>"
}

response = requests.delete(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Pix_cancelPixQr_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier';
const options = {
  method: 'DELETE',
  headers: {'X-Tenant-Id': 'X-Tenant-Id', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Pix_cancelPixQr_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Pix_cancelPixQr_example
require 'uri'
require 'net/http'

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Pix_cancelPixQr_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Pix_cancelPixQr_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Pix_cancelPixQr_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Pix_cancelPixQr_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code?identifier=identifier")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```