kamiPay LogokamiPay Docs

Static QR Code

Generate and manage Static QR Codes to receive PIX payments without a fixed amount.

A Static QR Code is a QR Code that can be scanned multiple times, by multiple payors, without an expiration date. Unlike Dynamic QR Codes, Static QRs do not require a specific amount — the payor can enter any amount when scanning.

Each static QR is tied to a specific checkout in your account. Only one Static QR can exist per checkout.

Static QR Codes are registered on the gateway (Transfeera or Woovi) that owns the PIX key used during creation. Contact us if you are unsure which PIX key to use.


Create Static QR

POST /v2/static_qrs

Generates a Static QR Code for a specific checkout. The QR is registered on the appropriate payment gateway and stored in kamiPay.

Not sure what store_id or checkout_id to use? Check the Stores & Checkouts endpoints to list the ones available for your account.

Body Parameters

NameTypeDescription
addressstringRequired. Wallet address where USDT settlements will be sent. Must be previously whitelisted with kamiPay and match the checkout's configured wallet.
store_idintegerOptional. Store ID associated with the checkout.
checkout_idintegerOptional. Checkout ID. Combined with store_id, identifies the checkout uniquely. Only one Static QR is allowed per checkout.
pix_keystringOptional. PIX key to associate with the QR (e.g. email, CPF, phone, EVP). Defaults to kamiPay's PIX key if not provided.

Example Request

const url = "baseURL/v2/static_qrs"

const body = {
  address: "0x46d52020**********1fbdcc297d",
  store_id: 1,
  checkout_id: 2,
};

const response = await fetch(url, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${access_token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
});
import requests
import json

url = "baseURL/v2/static_qrs"

body = {
  "address": "0x46d52020**********1fbdcc297d",
  "store_id": 1,
  "checkout_id": 2,
}

headers = {
  "Authorization": f"Bearer {access_token}",
  "Content-Type": "application/json",
}

response = requests.post(url, headers=headers, data=json.dumps(body))
package main

import (
  "bytes"
  "encoding/json"
  "fmt"
  "net/http"
)

func main() {
  url := "baseURL/v2/static_qrs"

  body := map[string]interface{}{
    "address":     "0x46d52020**********1fbdcc297d",
    "store_id":    1,
    "checkout_id": 2,
  }

  requestBody, _ := json.Marshal(body)

  req, _ := http.NewRequest("POST", url, bytes.NewBuffer(requestBody))
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", access_token))
  req.Header.Add("Content-Type", "application/json")

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error making request:", err)
    return
  }
  defer resp.Body.Close()
}

Response

{
  "result": "ok",
  "data": "00020101021226860014br.gov.bcb.pix2564api.transfeera.com/qr/v2/KPSD1abc1234567890..."
}
{
  "detail": "Bad Request"
}
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "Checkout not found for merchant_id=1, store_id=1, checkout_id=99"
}
{
  "detail": "QR code already exists for checkout merchant_id=1, store_id=1, checkout_id=2"
}
{
  "detail": {
    "message": "Invalid PIX key format",
    "pix_key_type": "unknown",
    "provided_key": "not-a-valid-key"
  }
}
{
  "detail": "Internal Server Error"
}

Response Details

  • data: The EMV string that represents the Static QR Code. Render this string as a QR image so payors can scan it from any Brazilian banking app.

List Static QRs

GET /v2/static_qrs

Returns all Static QR Codes associated with your merchant account, sorted from newest to oldest.

Example Request

const url = "baseURL/v2/static_qrs"

const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
  },
});
import requests

url = "baseURL/v2/static_qrs"

headers = {
  "Authorization": f"Bearer {access_token}",
}

response = requests.get(url, headers=headers)
package main

import (
  "fmt"
  "net/http"
)

func main() {
  url := "baseURL/v2/static_qrs"

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", access_token))

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error making request:", err)
    return
  }
  defer resp.Body.Close()
}

Response

[
  {
    "emv": "00020101021226860014br.gov.bcb.pix...",
    "qr_txid": "KPSD1abc1234567890",
    "network_id": 5,
    "address": "0x46d52020**********1fbdcc297d",
    "date_created": "2024-10-15T12:34:56",
    "merchant_id": 1,
    "store_id": 1,
    "checkout_id": 2,
    "gateway_id": 4
  }
]
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "Internal Server Error"
}

Response Fields

FieldTypeDescription
emvstringEMV string of the Static QR Code.
qr_txidstringUnique identifier for this Static QR. Use this to query details or transactions.
network_idintegerBlockchain network ID (5 = Polygon).
addressstringWallet address linked to this QR.
date_createdstringISO 8601 timestamp of creation.
merchant_idintegerYour merchant ID.
store_idintegerStore associated with this QR.
checkout_idintegerCheckout associated with this QR.
gateway_idintegerPayment gateway used (e.g. 4 = Transfeera).

Get Static QR Detail

GET /v2/static_qrs/{qr_txid}

Returns the detail of a specific Static QR, including the EMV string needed to render the QR image.

Path Parameters

NameTypeDescription
qr_txidstringRequired. The unique identifier of the Static QR (qr_txid from the list endpoint).

Example Request

const qr_txid = "KPSD1abc1234567890"
const url = `baseURL/v2/static_qrs/${qr_txid}`

const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
  },
});
import requests

qr_txid = "KPSD1abc1234567890"
url = f"baseURL/v2/static_qrs/{qr_txid}"

headers = {
  "Authorization": f"Bearer {access_token}",
}

response = requests.get(url, headers=headers)
package main

import (
  "fmt"
  "net/http"
)

func main() {
  qr_txid := "KPSD1abc1234567890"
  url := fmt.Sprintf("baseURL/v2/static_qrs/%s", qr_txid)

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", access_token))

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error making request:", err)
    return
  }
  defer resp.Body.Close()
}

Response

{
  "qr_txid": "KPSD1abc1234567890",
  "emv": "00020101021226860014br.gov.bcb.pix...",
  "merchant_id": 1,
  "store_id": 1,
  "checkout_id": 2,
  "date_created": "2024-10-15T12:34:56"
}
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "PixLink not found"
}
{
  "detail": "Internal Server Error"
}

Response Details

  • qr_txid: The unique identifier for this static QR. Use it to query transactions.
  • emv: The EMV string to render as a QR image for payors to scan.

List Transactions for a Static QR

GET /v2/static_qrs/{qr_txid}/requests

Returns a paginated list of all payment requests made against a specific Static QR Code. Use this to monitor payments received through your Static QR.

Path Parameters

NameTypeDescription
qr_txidstringRequired. The unique identifier of the Static QR.

Query Parameters

NameTypeDescription
from_datestringOptional. ISO 8601 datetime. Only return requests created on or after this date.
to_datestringOptional. ISO 8601 datetime. Only return requests created on or before this date.
pageintegerOptional. Page number. Default: 1.
page_sizeintegerOptional. Items per page. Default: 20. Max: 100.

Example Request

const qr_txid = "KPSD1abc1234567890"
const url = `baseURL/v2/static_qrs/${qr_txid}/requests?page=1&page_size=20`

const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
  },
});
import requests

qr_txid = "KPSD1abc1234567890"
url = f"baseURL/v2/static_qrs/{qr_txid}/requests"

params = {
  "page": 1,
  "page_size": 20,
}

headers = {
  "Authorization": f"Bearer {access_token}",
}

response = requests.get(url, headers=headers, params=params)
package main

import (
  "fmt"
  "net/http"
)

func main() {
  qr_txid := "KPSD1abc1234567890"
  url := fmt.Sprintf("baseURL/v2/static_qrs/%s/requests?page=1&page_size=20", qr_txid)

  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", access_token))

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
    fmt.Println("Error making request:", err)
    return
  }
  defer resp.Body.Close()
}

Response

{
  "total": 2,
  "page": 1,
  "page_size": 20,
  "items": [
    {
      "pay_in_transaction_request_id": "req-abc123",
      "kamipay_id": "kp-payin-xyz789",
      "qr_txid": "KPSD1abc1234567890",
      "emv": "00020101021226...",
      "gateway_tx_id": "gw-tx-001",
      "qr_expiration": "2024-10-15T13:04:56",
      "amount": "150.00",
      "gateway_id": 4,
      "rate": "5.2443",
      "created_at": "2024-10-15T12:34:56",
      "current_status": "done",
      "statuses": [
        {
          "pay_in_transactions_request_status_id": 1,
          "pay_in_transaction_status_id": "created",
          "created_at": "2024-10-15T12:34:56"
        },
        {
          "pay_in_transactions_request_status_id": 2,
          "pay_in_transaction_status_id": "done",
          "created_at": "2024-10-15T12:35:10"
        }
      ]
    }
  ]
}
{
  "message": "Unauthorized",
  "request_id": "30e87ab5xxxxxxxxxxxxf8249f594cfb"
}
{
  "detail": "PixLink not found"
}
{
  "detail": "Internal Server Error"
}

Response Fields

FieldTypeDescription
totalintegerTotal number of requests matching the query.
pageintegerCurrent page number.
page_sizeintegerNumber of items per page.
itemsarrayList of payment requests, sorted newest first.
items[].pay_in_transaction_request_idstringUnique ID for this payment request.
items[].kamipay_idstringkamiPay's internal transaction ID.
items[].qr_txidstringThe Static QR identifier this request belongs to.
items[].gateway_tx_idstringThe gateway's transaction ID.
items[].amountdecimalAmount paid in BRL.
items[].ratedecimalUSDT/BRL exchange rate applied.
items[].qr_expirationstringExpiration timestamp of the QR scan session.
items[].created_atstringISO 8601 timestamp when the payment request was created.
items[].current_statusstringLatest status: created, processing, done, or failed.
items[].statusesarrayFull status history for this request.

On this page