> 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 Pix QR with due date for an account

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

Creates a PIX charge with a due date (CobV): a single-use QR code with a
debtor and optional deduction, discount, interest and penalty. The QR
accepts payment until 23:59:59 (Brasília) of `dueDate +
daysAfterDueDate`, at most 365 days ahead. Lookup, cancellation and
webhooks are the same as for the dynamic QR; `qrcode.paid` carries the
amount actually paid. 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-due-date

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

- `pixKey` (string, required) — PIX key of the receiving account (must be registered to the account).
- `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.
- `identifier` (string, optional) — Unique charge identifier (`[A-Za-z0-9._-]`, up to 38 characters). When omitted the API generates one (a UUID without hyphens).
- `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

### 201

QR code with due date 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.

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

### 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
{
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "value": 150,
  "dueDate": "2026-12-10",
  "debtor": {
    "name": "Maria Oliveira",
    "document": "98765432100"
  },
  "identifier": "fatura-2026-12",
  "daysAfterDueDate": 5,
  "discount": 10,
  "interest": 1.5,
  "penalty": 3,
  "message": "Mensalidade de dezembro"
}
```

**Response**

```json
{
  "txid": "fatura-2026-12",
  "emv": "00020101021226900014br.gov.bcb.pix2568qrcode.exemplo.com/cobv/fatura-2026-12...",
  "type": "due-date",
  "status": "ACTIVE",
  "identifier": "fatura-2026-12",
  "value": 150,
  "message": "Mensalidade de dezembro",
  "description": "Mensalidade de dezembro",
  "accountId": "2e6b725b-84a0-400d-8740-22a5ba0f23e6",
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "allowChange": false,
  "expiresAt": "2026-12-16T02:59:59Z",
  "dueDate": "2026-12-10",
  "daysAfterDueDate": 5,
  "deduction": 0,
  "discount": 10,
  "interest": 1.5,
  "penalty": 3,
  "finalValue": 140,
  "debtor": {
    "name": "Maria Oliveira",
    "document": "98765432100"
  },
  "receiverName": "LOJA EXEMPLO"
}
```

**SDK Code**

```python Pix_createPixQrDueDate_example
import requests

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

payload = {
    "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
    "value": 150,
    "dueDate": "2026-12-10",
    "debtor": {
        "name": "Maria Oliveira",
        "document": "98765432100"
    },
    "identifier": "fatura-2026-12",
    "daysAfterDueDate": 5,
    "discount": 10,
    "interest": 1.5,
    "penalty": 3,
    "message": "Mensalidade de dezembro"
}
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_createPixQrDueDate_example
const url = 'https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/due-date';
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","value":150,"dueDate":"2026-12-10","debtor":{"name":"Maria Oliveira","document":"98765432100"},"identifier":"fatura-2026-12","daysAfterDueDate":5,"discount":10,"interest":1.5,"penalty":3,"message":"Mensalidade de dezembro"}'
};

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

```go Pix_createPixQrDueDate_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"pixKey\": \"8026ff12-cb4a-4d19-9638-08bb15d450e2\",\n  \"value\": 150,\n  \"dueDate\": \"2026-12-10\",\n  \"debtor\": {\n    \"name\": \"Maria Oliveira\",\n    \"document\": \"98765432100\"\n  },\n  \"identifier\": \"fatura-2026-12\",\n  \"daysAfterDueDate\": 5,\n  \"discount\": 10,\n  \"interest\": 1.5,\n  \"penalty\": 3,\n  \"message\": \"Mensalidade de dezembro\"\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_createPixQrDueDate_example
require 'uri'
require 'net/http'

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

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  \"value\": 150,\n  \"dueDate\": \"2026-12-10\",\n  \"debtor\": {\n    \"name\": \"Maria Oliveira\",\n    \"document\": \"98765432100\"\n  },\n  \"identifier\": \"fatura-2026-12\",\n  \"daysAfterDueDate\": 5,\n  \"discount\": 10,\n  \"interest\": 1.5,\n  \"penalty\": 3,\n  \"message\": \"Mensalidade de dezembro\"\n}"

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

```java Pix_createPixQrDueDate_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/due-date")
  .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  \"value\": 150,\n  \"dueDate\": \"2026-12-10\",\n  \"debtor\": {\n    \"name\": \"Maria Oliveira\",\n    \"document\": \"98765432100\"\n  },\n  \"identifier\": \"fatura-2026-12\",\n  \"daysAfterDueDate\": 5,\n  \"discount\": 10,\n  \"interest\": 1.5,\n  \"penalty\": 3,\n  \"message\": \"Mensalidade de dezembro\"\n}")
  .asString();
```

```php Pix_createPixQrDueDate_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/due-date', [
  'body' => '{
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "value": 150,
  "dueDate": "2026-12-10",
  "debtor": {
    "name": "Maria Oliveira",
    "document": "98765432100"
  },
  "identifier": "fatura-2026-12",
  "daysAfterDueDate": 5,
  "discount": 10,
  "interest": 1.5,
  "penalty": 3,
  "message": "Mensalidade de dezembro"
}',
  '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_createPixQrDueDate_example
using RestSharp;

var client = new RestClient("https://client.api.corpx.com/v1/accounts/accountId/pix/qr-code/due-date");
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  \"value\": 150,\n  \"dueDate\": \"2026-12-10\",\n  \"debtor\": {\n    \"name\": \"Maria Oliveira\",\n    \"document\": \"98765432100\"\n  },\n  \"identifier\": \"fatura-2026-12\",\n  \"daysAfterDueDate\": 5,\n  \"discount\": 10,\n  \"interest\": 1.5,\n  \"penalty\": 3,\n  \"message\": \"Mensalidade de dezembro\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Pix_createPixQrDueDate_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",
  "value": 150,
  "dueDate": "2026-12-10",
  "debtor": [
    "name": "Maria Oliveira",
    "document": "98765432100"
  ],
  "identifier": "fatura-2026-12",
  "daysAfterDueDate": 5,
  "discount": 10,
  "interest": 1.5,
  "penalty": 3,
  "message": "Mensalidade de dezembro"
] 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/due-date")! 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()
```