> This page is for Internet banking (beta).

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

# Generate blocked Pix Location QR for an account

POST https://client.api.corpx.com/v1/accounts/{accountId}/pix/qr-code/location
Content-Type: application/json

Generates a Pix Location QR code **blocked** (`status: BLOCKED`). The
`emv` can be printed or sent right away, but payment is refused until
the charge is confirmed with
`PUT /v1/accounts/{accountId}/pix/qr-code/location/{identifier}/confirm`.
Requires the product to be enabled for the tenant (`403
feature_disabled` otherwise).

Reference: https://en.docs.api.corpx.com/ib/referencia/pix/create-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.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, required) — Client-generated idempotency token.
- `X-Request-Timestamp` (string, required) — Unix seconds. Required on the signed host; tolerance is 300s either way (`403 request_timestamp_skew`).
- `X-Content-SHA256` (string, required) — Lowercase hex SHA-256 of the body. An empty body hashes the empty string, so the header is always present. Mismatch returns `400 body_hash_mismatch`.
- `X-Request-Signature` (string, required) — Detached JWS (`<protected>..<signature>`, ES256 or PS256) over `METHOD\nPATH?QUERY\nTIMESTAMP\nIDEMPOTENCY_KEY_OR_EMPTY\nX_CONTENT_SHA256`.

### Body (application/json)

This endpoint expects a PixQrLocationRequest.

- `pixKey` (string, required) — PIX key of the receiving account (must be registered to the account).
- `identifier` (string, optional) — Unique identifier (`[A-Za-z0-9._-]`, up to 38 characters), used to confirm, look up and cancel. When omitted the API generates one.
- `message` (string, optional) — Message displayed to the payer.

## Response

### 201

Location QR code generated, blocked until confirmation.

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

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

## Examples

**Request**

```json
{
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "identifier": "mesa-12-noite",
  "message": "Mesa 12"
}
```

**Response**

```json
{
  "txid": "mesa-12-noite",
  "emv": "00020101021226900014br.gov.bcb.pix2568qrcode.exemplo.com/cobv/9f1c2a7e3b5d4c6e...",
  "type": "location",
  "status": "BLOCKED",
  "identifier": "mesa-12-noite",
  "value": 0,
  "message": "Mesa 12",
  "description": "Mesa 12",
  "accountId": "2e6b725b-84a0-400d-8740-22a5ba0f23e6",
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "allowChange": false,
  "locationId": "9f1c2a7e-3b5d-4c6e-8a0b-1c2d3e4f5a6b"
}
```

**SDK Code**

```python Pix_createPixQrLocation_example
import requests

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

payload = {
    "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
    "identifier": "mesa-12-noite",
    "message": "Mesa 12"
}
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "X-Content-SHA256": "X-Content-SHA256",
    "X-Request-Signature": "X-Request-Signature",
    "X-Request-Timestamp": "X-Request-Timestamp",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Pix_createPixQrLocation_example
const url = 'https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/location';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'Idempotency-Key',
    'X-Content-SHA256': 'X-Content-SHA256',
    'X-Request-Signature': 'X-Request-Signature',
    'X-Request-Timestamp': 'X-Request-Timestamp',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"pixKey":"8026ff12-cb4a-4d19-9638-08bb15d450e2","identifier":"mesa-12-noite","message":"Mesa 12"}'
};

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

```go Pix_createPixQrLocation_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"pixKey\": \"8026ff12-cb4a-4d19-9638-08bb15d450e2\",\n  \"identifier\": \"mesa-12-noite\",\n  \"message\": \"Mesa 12\"\n}")

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

	req.Header.Add("Idempotency-Key", "Idempotency-Key")
	req.Header.Add("X-Content-SHA256", "X-Content-SHA256")
	req.Header.Add("X-Request-Signature", "X-Request-Signature")
	req.Header.Add("X-Request-Timestamp", "X-Request-Timestamp")
	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_createPixQrLocation_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'Idempotency-Key'
request["X-Content-SHA256"] = 'X-Content-SHA256'
request["X-Request-Signature"] = 'X-Request-Signature'
request["X-Request-Timestamp"] = 'X-Request-Timestamp'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"pixKey\": \"8026ff12-cb4a-4d19-9638-08bb15d450e2\",\n  \"identifier\": \"mesa-12-noite\",\n  \"message\": \"Mesa 12\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/location")
  .header("Idempotency-Key", "Idempotency-Key")
  .header("X-Content-SHA256", "X-Content-SHA256")
  .header("X-Request-Signature", "X-Request-Signature")
  .header("X-Request-Timestamp", "X-Request-Timestamp")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"pixKey\": \"8026ff12-cb4a-4d19-9638-08bb15d450e2\",\n  \"identifier\": \"mesa-12-noite\",\n  \"message\": \"Mesa 12\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/location', [
  'body' => '{
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "identifier": "mesa-12-noite",
  "message": "Mesa 12"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'Idempotency-Key' => 'Idempotency-Key',
    'X-Content-SHA256' => 'X-Content-SHA256',
    'X-Request-Signature' => 'X-Request-Signature',
    'X-Request-Timestamp' => 'X-Request-Timestamp',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

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

```csharp Pix_createPixQrLocation_example
using RestSharp;

var client = new RestClient("https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/location");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "Idempotency-Key");
request.AddHeader("X-Content-SHA256", "X-Content-SHA256");
request.AddHeader("X-Request-Signature", "X-Request-Signature");
request.AddHeader("X-Request-Timestamp", "X-Request-Timestamp");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"pixKey\": \"8026ff12-cb4a-4d19-9638-08bb15d450e2\",\n  \"identifier\": \"mesa-12-noite\",\n  \"message\": \"Mesa 12\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pix_createPixQrLocation_example
import Foundation

let headers = [
  "Idempotency-Key": "Idempotency-Key",
  "X-Content-SHA256": "X-Content-SHA256",
  "X-Request-Signature": "X-Request-Signature",
  "X-Request-Timestamp": "X-Request-Timestamp",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "identifier": "mesa-12-noite",
  "message": "Mesa 12"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/location")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```