Pular para o conteúdo principal
POST
/
v1
/
dynamic-qrcode
Criar QR Code Dinâmico
curl --request POST \
  --url https://conta-public-api.kiwify.com/v1/dynamic-qrcode \
  --header 'Content-Type: application/json' \
  --header 'X-PoP-Challenge: <api-key>' \
  --header 'X-PoP-Format: <api-key>' \
  --header 'X-PoP-Signature: <api-key>' \
  --header 'x-access-id: <api-key>' \
  --data '
{
  "amount_in_cents": 4000,
  "type": "INSTANT",
  "accept_change_value": false,
  "allowed_tax_ids": [
    "012.345.678-90",
    "45.059.493/0001-73"
  ],
  "due_date": "2026-12-31",
  "expiration": 86400,
  "external_reference_id": "external-ref-123",
  "payer_data": {
    "document_number": "012.345.678-90",
    "document_type": "cpf",
    "name": "João Silva"
  }
}
'
{
  "copy_paste": "00020126...",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "picture_code_base64": "<string>",
  "external_reference_id": "order-12345"
}

Autorizações

x-access-id
string
header
obrigatório

UUID of the service account (e.g., 550e8400-e29b-41d4-a716-446655440000)

X-PoP-Challenge
string
header
obrigatório

Unix timestamp in milliseconds (e.g., 1704636800000). Must be within 5 minutes of server time.

X-PoP-Format
string
header
obrigatório

Must be 'service-account' for service account authentication

X-PoP-Signature
string
header
obrigatório

EdDSA signature of the request in base64 format. Signs: uri:method:body:timestamp

Corpo

application/json
amount_in_cents
integer<int64>
obrigatório

Amount in cents (must be greater than 0)

Exemplo:

4000

type
enum<string>
obrigatório

QR Code type: INSTANT or DUE_DATE

Opções disponíveis:
INSTANT,
DUE_DATE
accept_change_value
boolean | null

Allows payer to change the QR code value when scanning. Defaults to false.

Exemplo:

false

allowed_tax_ids
string[] | null

Optional list of CPF/CNPJ (with or without formatting) that restricts which payers can use this QR code. When provided, only payers whose document matches one of the listed values will be accepted. When omitted or null, payments from any document are accepted.

Exemplo:
["012.345.678-90", "45.059.493/0001-73"]
due_date
string<date> | null

Due date in YYYY-MM-DD format. Required for DUE_DATE type.

Exemplo:

"2026-12-31"

expiration
integer<int32> | null

Expiration time in seconds for INSTANT type. Defaults to 86400 (24 hours).

Intervalo obrigatório: x >= 0
Exemplo:

86400

external_reference_id
string | null

External unique identifier for client's own tracking. Must be unique per account if provided.

Exemplo:

"external-ref-123"

payer_data
object

Payer information. Optional for INSTANT type, required for DUE_DATE type.

Resposta

Dynamic QR code created successfully

copy_paste
string
obrigatório

PIX copy-paste code (BR Code)

Exemplo:

"00020126..."

id
string<uuid>
obrigatório

Unique QR Code identifier

picture_code_base64
string
obrigatório

QR Code image in base64 format

external_reference_id
string | null

External reference ID provided by the client (if any)

Exemplo:

"order-12345"