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

# Due-date QR Code Guide

This guide explains how to issue PIX charges with a due date — the Pix
"CobV" charge, with interest, penalty, discount and deduction.

## Overview

The due-date QR Code is a single-use charge, like the
[Dynamic QR Code](/baas/guias/receber/qr-code-dinamico), but with boleto-style
rules: it has a due day, an identified debtor and charges that change the
amount according to the payment date. It fits:

* **Monthly fees and invoices** - Charges with a set payment date
* **Boleto replacement** - Same due date and charges, settled over Pix
* **Installment plans** - One charge per installment, each with its own due date

> **Enabled per tenant**
>
> The due-date QR Code must be enabled for your tenant. Without it, creation
> returns `403 feature_disabled`. Ask the CorpX team to enable it.

## Integration Flow

```
┌─────────────┐      ┌─────────────┐      ┌─────────────┐
│   Issue     │      │   Debtor    │      │   Webhook   │
│   Charge    │ ───► │   Pays QR   │ ───► │ qrcode.paid │
└─────────────┘      └─────────────┘      └─────────────┘
      │                                          │
      ▼                                          ▼
  Returns EMV                         amount = amount paid
                                      (with charges)
```

## Step 1: Issue the charge

### Request

```bash
curl -X POST "https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/qr-code/due-date" \
  -H "Authorization: Bearer {token}" \
  -H "X-Tenant-Id: {tenant_id}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: invoice-2026-12" \
  -d '{
    "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
    "identifier": "invoice-2026-12",
    "value": 150.00,
    "dueDate": "2026-12-10",
    "daysAfterDueDate": 5,
    "discount": 10.00,
    "interest": 1.50,
    "penalty": 3.00,
    "debtor": {
      "name": "Maria Oliveira",
      "document": "98765432100"
    },
    "message": "December fee"
  }'
```

### Body Parameters

| Field              | Type    | Required    | Description                                                                                                                      |
| ------------------ | ------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `pixKey`           | string  | Yes         | PIX key of the receiving account (must be registered)                                                                            |
| `value`            | number  | Yes         | Original charge amount in BRL, greater than zero, at most 2 decimal places                                                       |
| `dueDate`          | date    | Yes         | Due day, `YYYY-MM-DD`, Brasília time. Cannot be in the past                                                                      |
| `daysAfterDueDate` | integer | No          | For how many days after the due date the QR still accepts payment. Default `0`                                                   |
| `debtor.name`      | string  | Yes         | Debtor name                                                                                                                      |
| `debtor.document`  | string  | Yes         | Debtor CPF (11 digits) or CNPJ (14 digits); punctuation is ignored                                                               |
| `deduction`        | number  | No          | Deduction in BRL                                                                                                                 |
| `discount`         | number  | No          | Discount in BRL for payment up to the due date                                                                                   |
| `interest`         | number  | No          | Interest in BRL for payment after the due date                                                                                   |
| `penalty`          | number  | No          | Penalty in BRL for payment after the due date                                                                                    |
| `finalValue`       | number  | No          | Amount to pay up to the due date. When omitted, `value − deduction − discount`                                                   |
| `receiverName`     | string  | No          | Receiver name shown to the payer. When omitted, the account holder                                                               |
| `identifier`       | string  | Recommended | Unique charge identifier (up to 38 characters, charset `[A-Za-z0-9._-]`). When omitted, the API generates a UUID without hyphens |
| `message`          | string  | No          | Message shown to the payer (up to 140 characters)                                                                                |

> **Maximum term**
>
> The QR accepts payment until **23:59:59 (Brasília) on `dueDate + daysAfterDueDate`**.
> That day cannot be more than **365 days** from today. `deduction + discount`
> must be lower than `value`.

### Success Response (201 Created)

```json
{
  "txid": "invoice-2026-12",
  "emv": "00020101021226900014br.gov.bcb.pix2568qrcode.exemplo.com/cobv/invoice-2026-1252040000530398654061505802BR5914LOJA EXEMPLO6009SAO PAULO62070503***6304A1B2",
  "type": "due-date",
  "status": "ACTIVE",
  "value": 150.00,
  "message": "December fee",
  "description": "December fee",
  "identifier": "invoice-2026-12",
  "accountId": "{accountId}",
  "pixKey": "8026ff12-cb4a-4d19-9638-08bb15d450e2",
  "allowChange": false,
  "expiresAt": "2026-12-16T02:59:59Z",
  "dueDate": "2026-12-10",
  "daysAfterDueDate": 5,
  "deduction": 0,
  "discount": 10.00,
  "interest": 1.50,
  "penalty": 3.00,
  "finalValue": 140.00,
  "debtor": {
    "name": "Maria Oliveira",
    "document": "98765432100"
  },
  "receiverName": "LOJA EXEMPLO"
}
```

| Field        | Description                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------- |
| `emv`        | PIX Copy and Paste code. Render it as a QR                                                  |
| `type`       | Always `due-date`                                                                           |
| `expiresAt`  | Last instant the QR accepts payment (end of `dueDate + daysAfterDueDate`, Brasília), in UTC |
| `finalValue` | Amount to pay up to the due date                                                            |
| `debtor`     | Debtor given at issuance. Who actually paid comes in `payer` after payment                  |

## Step 2: Look up and cancel

Lookup and cancellation are the same as for the dynamic QR, by `identifier`:

```bash
curl -X GET "https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/qr-code/lookup?identifier=invoice-2026-12" \
  -H "Authorization: Bearer {token}" \
  -H "X-Tenant-Id: {tenant_id}"

curl -X DELETE "https://tenant.api.corpx.com/v1/accounts/{accountId}/pix/qr-code?identifier=invoice-2026-12" \
  -H "Authorization: Bearer {token}" \
  -H "X-Tenant-Id: {tenant_id}"
```

The lookup returns `type: "due-date"` and the same due-date fields as the
creation response (`dueDate`, `daysAfterDueDate`, charges, `finalValue`,
`debtor`, `receiverName`). Statuses are those of the
[dynamic QR](/baas/guias/receber/qr-code-dinamico#possible-statuses);
`EXPIRED` means the last payment day passed without payment.

## Step 3: Receive the webhook

Payment arrives as `qrcode.paid`, with `data.type = "due-date"`. `data.amount`
is the **amount actually paid**, which may differ from `value`: discount up to
the due date, interest and penalty after it.

```json
{
  "id": "qrcode-paid-invoice-2026-12",
  "type": "qrcode.paid",
  "occurredAt": "2026-12-12T14:03:11.000Z",
  "schemaVersion": "1.0",
  "environment": "production",
  "tenantId": "tenant-yourcompany",
  "accountId": "{accountId}",
  "data": {
    "qrcodeId": "invoice-2026-12",
    "identifier": "invoice-2026-12",
    "accountId": "{accountId}",
    "tenantId": "tenant-yourcompany",
    "type": "due-date",
    "amount": 154.50,
    "endToEnd": "E0000000020261212140300000",
    "transactionId": "171234-pix",
    "status": "SUCCESS",
    "receivedAt": "2026-12-12T14:03:11.000Z",
    "payer": {
      "name": "MARIA OLIVEIRA",
      "document": "98765432100"
    }
  }
}
```

> **Tip**
>
> Reconcile by `identifier` and compare `data.amount` with the amount you
> expect for the payment date. Without payment by `expiresAt`, you receive
> `qrcode.expired`.

## Permissions

The route uses the same scope as the dynamic QR, `qrcode.manage` (or
`api2/write`). In the integrator dashboard, issuance requires the **Issue
due-date and Pix Location QR codes** permission.

## Common Errors

| `errorCode`          | HTTP | Cause                                                                                                                                           | Fix                                                                         |
| -------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| `missing_field`      | 400  | `pixKey`, `dueDate`, `debtor.name`, `debtor.document` or the receiver missing                                                                   | Send the required fields                                                    |
| `invalid_document`   | 400  | `debtor.document` has neither 11 nor 14 digits                                                                                                  | Send a valid CPF or CNPJ                                                    |
| `invalid_field`      | 400  | Negative amount or more than 2 decimals, `deduction + discount ≥ value`, due date in the past or beyond 365 days, `message` over 140 characters | Fix the terms                                                               |
| `invalid_identifier` | 400  | `identifier` outside the charset or over 38 characters                                                                                          | Fix the identifier                                                          |
| `invalid_payload`    | 400  | Malformed JSON                                                                                                                                  | Fix the request body                                                        |
| `feature_disabled`   | 403  | Product not enabled for the tenant                                                                                                              | Ask CorpX to enable it                                                      |
| `policy_denied`      | 422  | A dynamic QR policy rule refused the issuance                                                                                                   | See `violations` — [Policies and Rules](/baas/guias/autenticacao/politicas) |

## Next Steps

* [Pix Location](/baas/guias/receber/pix-location) - QR printed before the amount is known
* [Webhooks](/baas/guias/conta/webhooks) - Configure notifications
* [Refund Guide](/baas/guias/pagar/devolucao) - Refund received payments