> ## Documentation Index
> Fetch the complete documentation index at: https://docs.3xpay.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Decode QR Code

> Decodifica um QR Code EMV e retorna os dados se o QR estiver ativo

## Descrição

Decodifica um QR Code EMV e retorna os dados se o QR estiver ativo. Autenticação via ApiKey.

## Autenticação

* `api_key` no header

## Corpo da requisição

```json theme={null}
{
  "emv": "string do QR Code EMV"
}
```

## Respostas

### Sucesso (QR ativo)

```json theme={null}
{
  "status": "success",
  "qrcode": {
    "amount": 100.0,
    "expiresAt": "2025-12-08T20:27:51.580Z",
    "receiver": {
      "name": "Blind Pay, Inc.",
      "city": "Vila Velha",
      "key": "f0f64d04-1e7d-4e4f-976f-48f4c7e0c225"
    },
    "txid": "d192067a12b2e43c38594b22af4128981",
    "url": "brcode.starkinfra.com/v2/192067a12b2e43c38594b22af4128981"
  }
}
```

### Expirado / inativo

```json theme={null}
{
  "status": "expired",
  "message": "qrcode já expirado"
}
```


## OpenAPI

````yaml POST /transaction/decode-qrcode
openapi: 3.0.1
info:
  title: 3X Pay Gateway
  description: >-
    Para autenticar as rotas dessa API são necessario ter em mãos a
    **api_secret** e **api_key** da sua conta. Este podem ser encontrados dentro
    do painel https://app.3xpay.co acessando a página de Configurações e
    clicando na opção de Credencias de API.
  version: 1.0.0
servers:
  - url: https://gateway.3xpay.co
security:
  - apiKeyAuth: []
    apiSecretAuth: []
tags:
  - name: Transações
    description: Operações relacionadas a transações financeiras
  - name: Webhooks
    description: Notificações de eventos da API
  - name: Balance
    description: Operações relacionadas ao saldo da conta
  - name: Sub-accounts
    description: Operações relacionadas a subcontas BaaS
  - name: MED Contest
    description: >-
      Endpoints server-to-server para responder a solicitações de MED (Mecanismo
      Especial de Devolução do Pix)
paths:
  /transaction/decode-qrcode:
    post:
      tags:
        - Transações
      summary: Decodificar QR Code
      description: Decodifica um QR Code EMV e retorna os dados se o QR estiver ativo
      operationId: decodeQrCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecodeQrRequest'
      responses:
        '200':
          description: QR Code ativo
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecodeQrSuccessResponse'
        '410':
          description: QR Code expirado ou inativo
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecodeQrExpiredResponse'
components:
  schemas:
    DecodeQrRequest:
      type: object
      required:
        - emv
      properties:
        emv:
          type: string
          description: Conteúdo EMV do QR Code
    DecodeQrSuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        qrcode:
          type: object
          properties:
            amount:
              type: number
              example: 100
            expiresAt:
              type: string
              format: date-time
              example: '2025-12-08T20:27:51.580Z'
            receiver:
              type: object
              properties:
                name:
                  type: string
                  example: Blind Pay, Inc.
                city:
                  type: string
                  example: Vila Velha
                key:
                  type: string
                  example: f0f64d04-1e7d-4e4f-976f-48f4c7e0c225
            txid:
              type: string
              example: d192067a12b2e43c38594b22af4128981
            url:
              type: string
              example: brcode.starkinfra.com/v2/192067a12b2e43c38594b22af4128981
    DecodeQrExpiredResponse:
      type: object
      properties:
        status:
          type: string
          example: expired
        message:
          type: string
          example: qrcode já expirado
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: api_key
    apiSecretAuth:
      type: apiKey
      in: header
      name: api_secret

````