---
updatedAt: 2026-10-13T13:55:09.000Z
agentTools:
  projectIndex: https://developer.pagbank.com.br/llms.txt
---

# Consultar pedido através de parâmetros

Este endpoint permite que você consulte pedidos previamente criados por meio de parâmetros.

<br />

<Callout icon="far fa-triangle-exclamation" theme="warn">
  ### Prazo de disponibilidade do recurso

  Este recurso está disponível para consulta e busca por **até 36 meses** após sua criação, podendo ter prazo menor conforme o contexto da operação. Após esse período, consultas e operações retornam `HTTP 404 — Not Found`.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "nova-plataforma-sandbox",
    "version": "4.1"
  },
  "servers": [
    {
      "url": "https://sandbox.api.pagseguro.com"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/orders?charge_id={charge_id}": {
      "get": {
        "summary": "Consultar pedido através de parâmetros",
        "description": "",
        "operationId": "consultar-pedido-parametros",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Token de autenticação. Deve ser enviado no formato `Bearer <token>`.",
            "schema": {
              "type": "string",
              "default": "Bearer <token>"
            }
          },
          {
            "name": "charge_id",
            "in": "query",
            "description": "Identificador da cobrança PagBank. Formato: CHAR_XXXXXXXXXXXXX Esse parâmetro você receberá na resposta da criação do pedido como charge.id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"orders\": [\n        {\n            \"id\": \"ORDE_F87334AC-BB8B-42E2-AA85-8579F70AA328\",\n            \"reference_id\": \"ex-00001\",\n            \"created_at\": \"2020-11-21T23:23:22.69-03:00\",\n            \"shipping\": {\n                \"address\": {\n                    \"street\": \"Avenida Brigadeiro Faria Lima\",\n                    \"number\": \"1384\",\n                    \"complement\": \"apto 12\",\n                    \"locality\": \"Pinheiros\",\n                    \"city\": \"São Paulo\",\n                    \"region\": \"São Paulo\",\n                    \"region_code\": \"SP\",\n                    \"country\": \"BRA\",\n                    \"postal_code\": \"01452002\"\n                }\n            },\n            \"items\": [\n                {\n                    \"reference_id\": \"referencia do item\",\n                    \"name\": \"nome do item\",\n                    \"quantity\": 1,\n                    \"unit_amount\": 500,\n                    \"dimensions\": {\n                        \"length\": 12,\n                        \"width\": 34,\n                        \"height\": 32\n                    },\n                    \"weight\": 100\n                }\n            ],\n            \"customer\": {\n                \"name\": \"Jose da Silva\",\n                \"email\": \"email@test.com\",\n                \"tax_id\": \"12345678909\",\n                \"phones\": [\n                    {\n                        \"country\": \"+55\",\n                        \"area\": \"11\",\n                        \"number\": \"999999999\",\n                        \"type\": \"MOBILE\"\n                    }\n                ]\n            },\n            \"charges\": [],\n            \"qr_code\": [\n                {\n                    \"id\": \"QRCO_86FE511B-E945-4FE1-BB5D-297974C0DB74\",\n                    \"amount\": {\n                        \"value\": 500\n                    },\n                    \"text\": \"00020101021226600016BR.COM.PAGSEGURO013686FE511B-E945-4FE1-BB5D-297974C0DB7452048999530398654045.005802BR5922Rafael Gouveia Firmino6009SAO PAULO63049879\",\n                    \"links\": [\n                        {\n                            \"rel\": \"QRCODE.PNG\",\n                            \"href\": \"https://sandbox.api.pagseguro.com/qrcode/QRCO_86FE511B-E945-4FE1-BB5D-297974C0DB74/png\",\n                            \"media\": \"image/png\",\n                            \"type\": \"GET\"\n                        },\n                        {\n                            \"rel\": \"QRCODE.BASE64\",\n                            \"href\": \"https://sandbox.api.pagseguro.com/qrcode/QRCO_86FE511B-E945-4FE1-BB5D-297974C0DB74/base64\",\n                            \"media\": \"text/plain\",\n                            \"type\": \"GET\"\n                        }\n                    ]\n                }\n            ],\n            \"links\": [\n                {\n                    \"rel\": \"SELF\",\n                    \"href\": \"https://sandbox.api.pagseguro.com/orders/ORDE_F87334AC-BB8B-42E2-AA85-8579F70AA328\",\n                    \"media\": \"application/json\",\n                    \"type\": \"GET\"\n                },\n                {\n                    \"rel\": \"PAY\",\n                    \"href\": \"https://sandbox.api.pagseguro.com/orders/ORDE_F87334AC-BB8B-42E2-AA85-8579F70AA328/pay\",\n                    \"media\": \"application/json\",\n                    \"type\": \"POST\"\n                }\n            ]\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "ORDE_F87334AC-BB8B-42E2-AA85-8579F70AA328"
                          },
                          "reference_id": {
                            "type": "string",
                            "example": "ex-00001"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "2020-11-21T23:23:22.69-03:00"
                          },
                          "shipping": {
                            "type": "object",
                            "properties": {
                              "address": {
                                "type": "object",
                                "properties": {
                                  "street": {
                                    "type": "string",
                                    "example": "Avenida Brigadeiro Faria Lima"
                                  },
                                  "number": {
                                    "type": "string",
                                    "example": "1384"
                                  },
                                  "complement": {
                                    "type": "string",
                                    "example": "apto 12"
                                  },
                                  "locality": {
                                    "type": "string",
                                    "example": "Pinheiros"
                                  },
                                  "city": {
                                    "type": "string",
                                    "example": "São Paulo"
                                  },
                                  "region": {
                                    "type": "string",
                                    "example": "São Paulo"
                                  },
                                  "region_code": {
                                    "type": "string",
                                    "example": "SP"
                                  },
                                  "country": {
                                    "type": "string",
                                    "example": "BRA"
                                  },
                                  "postal_code": {
                                    "type": "string",
                                    "example": "01452002"
                                  }
                                }
                              }
                            }
                          },
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "reference_id": {
                                  "type": "string",
                                  "example": "referencia do item"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "nome do item"
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 1,
                                  "default": 0
                                },
                                "unit_amount": {
                                  "type": "integer",
                                  "example": 500,
                                  "default": 0
                                },
                                "dimensions": {
                                  "type": "object",
                                  "properties": {
                                    "length": {
                                      "type": "integer",
                                      "example": 12,
                                      "default": 0
                                    },
                                    "width": {
                                      "type": "integer",
                                      "example": 34,
                                      "default": 0
                                    },
                                    "height": {
                                      "type": "integer",
                                      "example": 32,
                                      "default": 0
                                    }
                                  }
                                },
                                "weight": {
                                  "type": "integer",
                                  "example": 100,
                                  "default": 0
                                }
                              }
                            }
                          },
                          "customer": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "Jose da Silva"
                              },
                              "email": {
                                "type": "string",
                                "example": "email@test.com"
                              },
                              "tax_id": {
                                "type": "string",
                                "example": "12345678909"
                              },
                              "phones": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "country": {
                                      "type": "string",
                                      "example": "+55"
                                    },
                                    "area": {
                                      "type": "string",
                                      "example": "11"
                                    },
                                    "number": {
                                      "type": "string",
                                      "example": "999999999"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "MOBILE"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "charges": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {}
                            }
                          },
                          "qr_code": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": "QRCO_86FE511B-E945-4FE1-BB5D-297974C0DB74"
                                },
                                "amount": {
                                  "type": "object",
                                  "properties": {
                                    "value": {
                                      "type": "integer",
                                      "example": 500,
                                      "default": 0
                                    }
                                  }
                                },
                                "text": {
                                  "type": "string",
                                  "example": "00020101021226600016BR.COM.PAGSEGURO013686FE511B-E945-4FE1-BB5D-297974C0DB7452048999530398654045.005802BR5922Rafael Gouveia Firmino6009SAO PAULO63049879"
                                },
                                "links": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "rel": {
                                        "type": "string",
                                        "example": "QRCODE.PNG"
                                      },
                                      "href": {
                                        "type": "string",
                                        "example": "https://sandbox.api.pagseguro.com/qrcode/QRCO_86FE511B-E945-4FE1-BB5D-297974C0DB74/png"
                                      },
                                      "media": {
                                        "type": "string",
                                        "example": "image/png"
                                      },
                                      "type": {
                                        "type": "string",
                                        "example": "GET"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "links": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "rel": {
                                  "type": "string",
                                  "example": "SELF"
                                },
                                "href": {
                                  "type": "string",
                                  "example": "https://sandbox.api.pagseguro.com/orders/ORDE_F87334AC-BB8B-42E2-AA85-8579F70AA328"
                                },
                                "media": {
                                  "type": "string",
                                  "example": "application/json"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "GET"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"error_messages\": [\n        {\n            \"code\": \"40002\",\n            \"description\": \"Invalid search parameters. No known parameter was given: [charge_id]\",\n            \"parameter_name\": \"query_string\"\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "40002"
                          },
                          "description": {
                            "type": "string",
                            "example": "Invalid search parameters. No known parameter was given: [charge_id]"
                          },
                          "parameter_name": {
                            "type": "string",
                            "example": "query_string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```