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

# Generate Pix dynamic QR for an account

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

Creates a dynamic PIX QR code (BR Code) for a fixed amount, with optional expiration and payer restrictions. The response carries the `emv` payload to render and a `txid` to reconcile the payment via webhooks or the lookup endpoint.

Reference: https://docs.api.corpx.com/ib/referencia/pix/create-pix-qr-dynamic-immediate

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

- `pixKey` (string, required) — PIX key of the receiving account (must be registered to the account).
- `value` (double, required) — Charge amount in BRL. Max 2 decimal places (e.g., 150.75 for R$150,75).
- `expirationDate` (datetime, optional) — Expiration date/time (RFC3339), at most 90 days after creation. When omitted the QR expires 24 hours after creation. An account may have a shorter limit configured at the settlement bank; above it the response is 400 with the bank's message.
- `allowChangeValue` (boolean, optional, default: false) — If `true`, allows payer to change the value at payment time.
- `message` (string, optional) — Message displayed to payer.
- `identifier` (string, optional) — Unique charge identifier (txid). Must be unique per account. Use for payment tracking. When omitted the API generates one (a UUID without hyphens).
- `payerPhysicalPerson` (boolean, optional) — If `true`, restricts payment to individuals only (CPF).
- `allowedPayerTaxNumber` (string, optional) — Specific CPF/CNPJ authorized to pay (payer restriction).
- `split` (PixQrSplit, optional) — Split payment configuration.

## Response

### 201

QR code generated successfully.

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

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

## Types

### PixQrSplit

Split payment configuration.

- `splits` (list of PixQrSplitSplitsItems, optional)

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

### PixQrSplitSplitsItems

- `pixKey` (string, optional)
- `amount` (double, optional) — Split amount in BRL. Max 2 decimal places (e.g., 75.50 for R$75,50).
- `percentage` (double, optional)

## Examples

**Request**

```json
{
  "pixKey": "contact@company.com.br",
  "value": 150,
  "expirationDate": "2024-12-31T23:59:59Z",
  "allowChangeValue": false,
  "message": "Payment ref. order #12345",
  "identifier": "order-12345-abc",
  "payerPhysicalPerson": false,
  "allowedPayerTaxNumber": "12345678900",
  "split": {
    "splits": [
      {
        "pixKey": "db5c2a29-243e-42a2-862b-89737c0213aa",
        "amount": 150.75,
        "percentage": 150.75
      }
    ]
  }
}
```

**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_createPixQrDynamicImmediate_example
import requests

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

payload = {
    "pixKey": "contact@company.com.br",
    "value": 150,
    "expirationDate": "2024-12-31T23:59:59Z",
    "allowChangeValue": False,
    "message": "Payment ref. order #12345",
    "identifier": "order-12345-abc",
    "payerPhysicalPerson": False,
    "allowedPayerTaxNumber": "12345678900",
    "split": { "splits": [
            {
                "pixKey": "db5c2a29-243e-42a2-862b-89737c0213aa",
                "amount": 150.75,
                "percentage": 150.75
            }
        ] }
}
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_createPixQrDynamicImmediate_example
const url = 'https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/dynamic';
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":"contact@company.com.br","value":150,"expirationDate":"2024-12-31T23:59:59Z","allowChangeValue":false,"message":"Payment ref. order #12345","identifier":"order-12345-abc","payerPhysicalPerson":false,"allowedPayerTaxNumber":"12345678900","split":{"splits":[{"pixKey":"db5c2a29-243e-42a2-862b-89737c0213aa","amount":150.75,"percentage":150.75}]}}'
};

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

```go Pix_createPixQrDynamicImmediate_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"pixKey\": \"contact@company.com.br\",\n  \"value\": 150,\n  \"expirationDate\": \"2024-12-31T23:59:59Z\",\n  \"allowChangeValue\": false,\n  \"message\": \"Payment ref. order #12345\",\n  \"identifier\": \"order-12345-abc\",\n  \"payerPhysicalPerson\": false,\n  \"allowedPayerTaxNumber\": \"12345678900\",\n  \"split\": {\n    \"splits\": [\n      {\n        \"pixKey\": \"db5c2a29-243e-42a2-862b-89737c0213aa\",\n        \"amount\": 150.75,\n        \"percentage\": 150.75\n      }\n    ]\n  }\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_createPixQrDynamicImmediate_example
require 'uri'
require 'net/http'

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

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\": \"contact@company.com.br\",\n  \"value\": 150,\n  \"expirationDate\": \"2024-12-31T23:59:59Z\",\n  \"allowChangeValue\": false,\n  \"message\": \"Payment ref. order #12345\",\n  \"identifier\": \"order-12345-abc\",\n  \"payerPhysicalPerson\": false,\n  \"allowedPayerTaxNumber\": \"12345678900\",\n  \"split\": {\n    \"splits\": [\n      {\n        \"pixKey\": \"db5c2a29-243e-42a2-862b-89737c0213aa\",\n        \"amount\": 150.75,\n        \"percentage\": 150.75\n      }\n    ]\n  }\n}"

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

```java Pix_createPixQrDynamicImmediate_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/dynamic")
  .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\": \"contact@company.com.br\",\n  \"value\": 150,\n  \"expirationDate\": \"2024-12-31T23:59:59Z\",\n  \"allowChangeValue\": false,\n  \"message\": \"Payment ref. order #12345\",\n  \"identifier\": \"order-12345-abc\",\n  \"payerPhysicalPerson\": false,\n  \"allowedPayerTaxNumber\": \"12345678900\",\n  \"split\": {\n    \"splits\": [\n      {\n        \"pixKey\": \"db5c2a29-243e-42a2-862b-89737c0213aa\",\n        \"amount\": 150.75,\n        \"percentage\": 150.75\n      }\n    ]\n  }\n}")
  .asString();
```

```php Pix_createPixQrDynamicImmediate_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/dynamic', [
  'body' => '{
  "pixKey": "contact@company.com.br",
  "value": 150,
  "expirationDate": "2024-12-31T23:59:59Z",
  "allowChangeValue": false,
  "message": "Payment ref. order #12345",
  "identifier": "order-12345-abc",
  "payerPhysicalPerson": false,
  "allowedPayerTaxNumber": "12345678900",
  "split": {
    "splits": [
      {
        "pixKey": "db5c2a29-243e-42a2-862b-89737c0213aa",
        "amount": 150.75,
        "percentage": 150.75
      }
    ]
  }
}',
  '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_createPixQrDynamicImmediate_example
using RestSharp;

var client = new RestClient("https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/dynamic");
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\": \"contact@company.com.br\",\n  \"value\": 150,\n  \"expirationDate\": \"2024-12-31T23:59:59Z\",\n  \"allowChangeValue\": false,\n  \"message\": \"Payment ref. order #12345\",\n  \"identifier\": \"order-12345-abc\",\n  \"payerPhysicalPerson\": false,\n  \"allowedPayerTaxNumber\": \"12345678900\",\n  \"split\": {\n    \"splits\": [\n      {\n        \"pixKey\": \"db5c2a29-243e-42a2-862b-89737c0213aa\",\n        \"amount\": 150.75,\n        \"percentage\": 150.75\n      }\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pix_createPixQrDynamicImmediate_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": "contact@company.com.br",
  "value": 150,
  "expirationDate": "2024-12-31T23:59:59Z",
  "allowChangeValue": false,
  "message": "Payment ref. order #12345",
  "identifier": "order-12345-abc",
  "payerPhysicalPerson": false,
  "allowedPayerTaxNumber": "12345678900",
  "split": ["splits": [
      [
        "pixKey": "db5c2a29-243e-42a2-862b-89737c0213aa",
        "amount": 150.75,
        "percentage": 150.75
      ]
    ]]
] 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/dynamic")! 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()
```