> This page is for BaaS.

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

# Confirm Pix Location QR for an account

PUT https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/qr-code/location/{identifier}/confirm
Content-Type: application/json

Confirms a blocked Pix Location QR code with the charge terms (amount,
due date, debtor and optional charges) and releases it for payment.
The `emv` does not change. The PIX key and the `identifier` are always
the ones from generation. When the settlement bank refuses the
confirmation, the error carries `details.qrStatus: BLOCKED`: the QR
stays blocked and can be confirmed again; the refusal is recorded in
the timeline as `qrcode.location_confirm_failed`. A confirmation
already in progress for the same QR returns `409 invalid_state`. If
the settlement bank does not answer and its state cannot be checked,
the error comes without `details.qrStatus`: look the QR up before
confirming again.


Reference: https://en.docs.api.corpx.com/baas/referencia/pix/confirm-pix-qr-location

## 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.
- `identifier` (string, required) — The `identifier` used at generation, or the `locationId` returned by it.

### 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).

### Body (application/json)

This endpoint expects a PixQrChargeTerms.

- `value` (double, required) — Original charge amount in BRL.
- `dueDate` (date, required) — Due day (`YYYY-MM-DD`, Brasília). Cannot be in the past.
- `debtor` (PixQrDebtor, required) — Debtor of a due-date or Location charge. Who actually paid comes in `payer` after payment.
- `daysAfterDueDate` (integer, optional, default: 0) — For how many days after the due date the QR still accepts payment.
- `deduction` (double, optional) — Deduction in BRL.
- `discount` (double, optional) — Discount in BRL for payment up to the due date.
- `interest` (double, optional) — Interest in BRL for payment after the due date.
- `penalty` (double, optional) — Penalty in BRL for payment after the due date.
- `finalValue` (double, optional) — Amount to pay up to the due date. When omitted, `value − deduction − discount`.
- `receiverName` (string, optional) — Receiver name shown to the payer. When omitted, the account holder name.
- `message` (string, optional) — Message displayed to the payer.

## Response

### 200

Location QR code confirmed; it now accepts payment.

- `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.

### 403 Forbidden Error

Requester does not have permission to perform the operation.

- `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.

### 404 Not Found Error

Requested resource was not found.

- `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.

### 409 Conflict Error

Request conflicts with the current state of the resource.

- `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.

### 422 Unprocessable Entity Error

Rejected by a policy rule (see the Policies and Rules guide). The payload is valid and the caller is authorized — a rule configured by the tenant refused the operation. On PIX Out, rules that depend on the recipient's document are only evaluated here in `BANK_ACCOUNT` mode; in the other modes the recipient is resolved later and the payment fails asynchronously with the same `policy_denied` error code. QR code creation, PIX key creation, and refunds are always decided synchronously in this response.

- `errorCode` (enum, required)
  - Allowed values: `policy_denied`
- `message` (string, required) — All violation messages, joined by `; `.
- `violations` (list of PolicyDeniedResponseViolationsItems, required)

### 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.

### 502 Bad Gateway Error

Banking partner returned an 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.

### PolicyDeniedResponseViolationsItems

- `rule` (string, required) — Rule identifier. PIX Out rules carry no prefix: `pixOutDisabled`, `cpfCnpjBlacklist`, `sameOwnershipOnly`, `operatingHours`, `allowedPersonTypes`. PIX out `maxAmount` and `nightMaxAmount` are no longer emitted; an amount refusal is `limit_exceeded_transaction`. The other sections are prefixed: `qrCode.canCreateStatic`, `qrCode.canCreateDynamic`, `qrCode.minAmount`, `qrCode.maxAmount`, `qrCode.maxIssuesPerDay`, `qrCode.maxIssuesPerMonth`, `keys.canCreate`, `keys.maxKeys`, `refund.disabled`, `refund.maxAmount`. The MED rate rules (`med.maxRatePercent`, `med.critical.maxRatePercent`) never come in a 422: they block the account after a dispute is received and only appear in the `policy.violation` webhook.
- `message` (string, required)

## Examples

**Request**

```json
{
  "value": 230.4,
  "dueDate": "2026-11-01",
  "debtor": {
    "name": "João Souza",
    "document": "12345678901"
  }
}
```

**Response**

```json
{
  "txid": "mesa-12-noite",
  "emv": "00020101021226900014br.gov.bcb.pix2568qrcode.exemplo.com/cobv/9f1c2a7e3b5d4c6e...",
  "type": "location",
  "status": "ACTIVE",
  "identifier": "mesa-12-noite",
  "value": 230.4,
  "message": "Mesa 12",
  "description": "Mesa 12",
  "accountId": "2e6b725b-84a0-400d-8740-22a5ba0f23e6",
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "allowChange": false,
  "createdAt": "2026-11-01T22:10:00Z",
  "expiresAt": "2026-11-02T02:59:59Z",
  "locationId": "9f1c2a7e-3b5d-4c6e-8a0b-1c2d3e4f5a6b",
  "dueDate": "2026-11-01",
  "daysAfterDueDate": 0,
  "deduction": 0,
  "discount": 0,
  "interest": 0,
  "penalty": 0,
  "finalValue": 230.4,
  "debtor": {
    "name": "João Souza",
    "document": "12345678901"
  },
  "receiverName": "LOJA EXEMPLO"
}
```

**SDK Code**

```python Pix_confirmPixQrLocation_example
import requests

url = "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm"

payload = {
    "value": 230.4,
    "dueDate": "2026-11-01",
    "debtor": {
        "name": "João Souza",
        "document": "12345678901"
    }
}
headers = {
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Pix_confirmPixQrLocation_example
const url = 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm';
const options = {
  method: 'PUT',
  headers: {
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"value":230.4,"dueDate":"2026-11-01","debtor":{"name":"João Souza","document":"12345678901"}}'
};

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

```go Pix_confirmPixQrLocation_example
package main

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

func main() {

	url := "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm"

	payload := strings.NewReader("{\n  \"value\": 230.4,\n  \"dueDate\": \"2026-11-01\",\n  \"debtor\": {\n    \"name\": \"João Souza\",\n    \"document\": \"12345678901\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm")

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

request = Net::HTTP::Put.new(url)
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"value\": 230.4,\n  \"dueDate\": \"2026-11-01\",\n  \"debtor\": {\n    \"name\": \"João Souza\",\n    \"document\": \"12345678901\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.put("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"value\": 230.4,\n  \"dueDate\": \"2026-11-01\",\n  \"debtor\": {\n    \"name\": \"João Souza\",\n    \"document\": \"12345678901\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm', [
  'body' => '{
  "value": 230.4,
  "dueDate": "2026-11-01",
  "debtor": {
    "name": "João Souza",
    "document": "12345678901"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Pix_confirmPixQrLocation_example
using RestSharp;

var client = new RestClient("https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"value\": 230.4,\n  \"dueDate\": \"2026-11-01\",\n  \"debtor\": {\n    \"name\": \"João Souza\",\n    \"document\": \"12345678901\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pix_confirmPixQrLocation_example
import Foundation

let headers = [
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "value": 230.4,
  "dueDate": "2026-11-01",
  "debtor": [
    "name": "João Souza",
    "document": "12345678901"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tenant.api.corpx.com/v1/accounts/accountId/pix/qr-code/location/mesa-12-noite/confirm")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```