---
title: "Obter pedido"
url: "https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5/operations/obter-pedido"
---

> Full API specification: https://devcenter.stone.com.br/apis/v5-docs-legacy/versions/b9aaff36-6dcc-4353-8398-836d6c13dfa5.md

# Obter pedido

`GET` `/orders/{order_id}`

Operation ID: `obter-pedido`

## Path parameters

- `order_id` (string, required) - Código identificador do pedido no sistema da loja. Max: 52 caracteres.

## Responses

- `200` - 200
- `400` - 400

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Pagar.me v5 API (Legado)
  version: 5.0.0
servers:
  - url: https://api.stone.com.br/core/v5
paths:
  /orders/{order_id}:
    get:
      summary: Obter pedido
      description: ""
      operationId: obter-pedido
      parameters:
        - name: order_id
          in: path
          description: "Código identificador do pedido no sistema da loja. Max: 52
            caracteres."
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                      "id": "or_28dN9w7CLU79kDjL",
                      "code": "62LVFN7I4R",
                      "amount": 2990,
                      "currency": "BRL",
                      "closed": true,
                      "items": [
                        {
                          "id": "oi_d478RMAS3bC74PrL",
                          "description": "Chaveiro do Tesseract",
                          "amount": 2990,
                          "quantity": 1,
                          "status": "active",
                          "created_at": "2017-04-19T16:01:09Z",
                          "updated_at": "2017-04-19T16:01:09Z"
                        }
                      ],
                      "customer": {
                        "id": "cus_eaEXlZvhBfeGlDOm",
                        "name": "Tony Stark",
                        "email": "f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com",
                        "delinquent": false,
                        "created_at": "2017-04-19T16:01:09Z",
                        "updated_at": "2017-04-19T16:01:09Z"
                      },
                      "status": "paid",
                      "created_at": "2017-04-19T16:01:09Z",
                      "updated_at": "2017-04-19T16:01:11Z",
                      "closed_at": "2017-04-19T16:01:11Z",
                      "charges": [
                        {
                          "id": "ch_gmnW101c9YTvQVLB",
                          "code": "62LVFN7I4R",
                          "gateway_id": "ef5e977b-93d2-485a-b15d-36e5eb3d8cf5",
                          "amount": 2990,
                          "status": "paid",
                          "currency": "BRL",
                          "payment_method": "credit_card",
                          "paid_at": "2017-04-19T16:01:11Z",
                          "created_at": "2017-04-19T16:01:09Z",
                          "updated_at": "2017-04-19T16:01:09Z",
                          "customer": {
                            "id": "cus_eaEXlZvhBfeGlDOm",
                            "name": "Tony Stark",
                            "email": "f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com",
                            "delinquent": false,
                            "created_at": "2017-04-19T16:01:09Z",
                            "updated_at": "2017-04-19T16:01:09Z"
                          },
                          "last_transaction": {
                            "id": "tran_3RYbBQjcnEcwrGp0",
                            "transaction_type": "credit_card",
                            "funding_source": "prepaid",
                            "gateway_id": "ddab707d-72ba-49f9-b356-f0b9ebfa3039",
                            "amount": 2990,
                            "status": "captured",
                            "success": true,
                            "installments": 1,
                            "statement_descriptor": "AVENGERS",
                            "acquirer_name": "simulator",
                            "acquirer_affiliation_code": "12345",
                            "acquirer_tid": "431837",
                            "acquirer_nsu": "512784",
                            "acquirer_auth_code": "233215",
                            "acquirer_message": "Simulator|Transação de simulação autorizada com sucesso",
                            "acquirer_return_code": "0",
                            "operation_type": "auth_and_capture",
                            "card": {
                              "id": "card_6xk9deAu2I2MdPzJ",
                              "first_six_digits": "402400",
                              "last_four_digits": "8229",
                              "brand": "Amex",
                              "holder_name": "Tony Stark",
                              "exp_month": 1,
                              "exp_year": 2018,
                              "status": "active",
                              "created_at": "2017-04-19T16:01:09Z",
                              "updated_at": "2017-04-19T16:01:09Z",
                              "billing_address": {
                                "zip_code": "90265",
                                "city": "Malibu",
                                "state": "CA",
                                "country": "US",
                                "line_1": "10880, Malibu Point, Malibu Central"
                              },
                              "type": "credit"
                            },
                            "created_at": "2017-04-19T16:01:09Z",
                            "updated_at": "2017-04-19T16:01:09Z",
                            "gateway_response": {
                              "code": "201"
                            }
                          }
                        }
                      ]
                    }
                OK - Network Token:
                  value: >-
                    {
                        "id": "or_5aEYRKmIwvTqpgoQ",
                        "code": "Y387TKKF3L",
                        "amount": 2990,
                        "currency": "BRL",
                        "closed": true,
                        "items": [
                            {
                                "id": "oi_gBLrzX1u3pHQMoEM",
                                "type": "product",
                                "description": "Chaveiro do Tesseract",
                                "amount": 2990,
                                "quantity": 1,
                                "status": "active",
                                "created_at": "2023-03-17T14:20:27Z",
                                "updated_at": "2023-03-17T14:20:27Z"
                            }
                        ],
                        "customer": {
                            "id": "cus_K1oa3LKTZSlW6O7d",
                            "name": "Tony Stark",
                            "email": "avengerstark@ligadajustica.com.br",
                            "delinquent": false,
                            "created_at": "2023-03-17T14:19:22Z",
                            "updated_at": "2023-03-17T14:19:22Z",
                            "phones": {}
                        },
                        "status": "paid",
                        "created_at": "2023-03-17T14:20:27Z",
                        "updated_at": "2023-03-17T14:20:28Z",
                        "closed_at": "2023-03-17T14:20:27Z",
                        "charges": [
                            {
                                "id": "ch_Ljvke06fdSErl62x",
                                "code": "Y387TKKF3L",
                                "amount": 2990,
                                "paid_amount": 2990,
                                "status": "paid",
                                "currency": "BRL",
                                "payment_method": "credit_card",
                                "paid_at": "2023-03-17T14:20:28Z",
                                "created_at": "2023-03-17T14:20:28Z",
                                "updated_at": "2023-03-17T14:20:28Z",
                                "customer": {
                                    "id": "cus_K1oa3LKTZSlW6O7d",
                                    "name": "Tony Stark",
                                    "email": "avengerstark@ligadajustica.com.br",
                                    "delinquent": false,
                                    "created_at": "2023-03-17T14:19:22Z",
                                    "updated_at": "2023-03-17T14:19:22Z",
                                    "phones": {}
                                },
                                "last_transaction": {
                                    "operation_key": "409945098",
                                    "id": "tran_xbEM0pRmUASgBYAq",
                                    "transaction_type": "credit_card",
                                    "gateway_id": "95e3e8f1-c5fc-4d62-8f0b-80bdc66d3e42",
                                    "amount": 2990,
                                    "status": "captured",
                                    "success": true,
                                    "installments": 1,
                                    "installment_type": "merchant",
                                    "statement_descriptor": "AVENGERS",
                                    "acquirer_name": "simulator",
                                    "acquirer_tid": "894247649",
                                    "acquirer_nsu": "49640",
                                    "acquirer_auth_code": "169",
                                    "acquirer_message": "Transação capturada com sucesso",
                                    "acquirer_return_code": "00",
                                    "entry_mode": "ecommerce",
                                    "operation_type": "auth_and_capture",
                                    "card": {
                                        "id": "card_DwER6M8Cl9hPKAOb",
                                        "first_six_digits": "400000",
                                        "last_four_digits": "0010",
                                        "brand": "Visa",
                                        "holder_name": "Homelander",
                                        "exp_month": 12,
                                        "exp_year": 2025,
                                        "status": "active",
                                        "type": "credit",
                                        "created_at": "2023-03-17T14:19:43Z",
                                        "updated_at": "2023-03-17T14:19:43Z",
                                        "billing_address": {
                                            "zip_code": "90265",
                                            "city": "Malibu",
                                            "state": "CA",
                                            "country": "US",
                                            "line_1": "10880, Malibu Point, Malibu Central"
                                        },
                                        "network_token": {
                                            "token_unique_reference": "9cb80642-e3b6-4b30-b233-c54a4857cbf0",
                                            "status": "active"
                                        }
                                    },
                                    "payment_type": "Token",
                                    "created_at": "2023-03-17T14:20:28Z",
                                    "updated_at": "2023-03-17T14:20:28Z",
                                    "gateway_response": {
                                        "code": "200",
                                        "errors": []
                                    },
                                    "antifraud_response": {},
                                    "metadata": {}
                                }
                            }
                        ],
                        "checkouts": []
                    }
              schema:
                oneOf:
                  - type: object
                    properties:
                      id:
                        type: string
                        example: or_28dN9w7CLU79kDjL
                      code:
                        type: string
                        example: 62LVFN7I4R
                      amount:
                        type: integer
                        example: 2990
                        default: 0
                      currency:
                        type: string
                        example: BRL
                      closed:
                        type: boolean
                        example: true
                        default: true
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: oi_d478RMAS3bC74PrL
                            description:
                              type: string
                              example: Chaveiro do Tesseract
                            amount:
                              type: integer
                              example: 2990
                              default: 0
                            quantity:
                              type: integer
                              example: 1
                              default: 0
                            status:
                              type: string
                              example: active
                            created_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                            updated_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                      customer:
                        type: object
                        properties:
                          id:
                            type: string
                            example: cus_eaEXlZvhBfeGlDOm
                          name:
                            type: string
                            example: Tony Stark
                          email:
                            type: string
                            example: f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com
                          delinquent:
                            type: boolean
                            example: false
                            default: true
                          created_at:
                            type: string
                            example: 2017-04-19T16:01:09Z
                          updated_at:
                            type: string
                            example: 2017-04-19T16:01:09Z
                      status:
                        type: string
                        example: paid
                      created_at:
                        type: string
                        example: 2017-04-19T16:01:09Z
                      updated_at:
                        type: string
                        example: 2017-04-19T16:01:11Z
                      closed_at:
                        type: string
                        example: 2017-04-19T16:01:11Z
                      charges:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: ch_gmnW101c9YTvQVLB
                            code:
                              type: string
                              example: 62LVFN7I4R
                            gateway_id:
                              type: string
                              example: ef5e977b-93d2-485a-b15d-36e5eb3d8cf5
                            amount:
                              type: integer
                              example: 2990
                              default: 0
                            status:
                              type: string
                              example: paid
                            currency:
                              type: string
                              example: BRL
                            payment_method:
                              type: string
                              example: credit_card
                            paid_at:
                              type: string
                              example: 2017-04-19T16:01:11Z
                            created_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                            updated_at:
                              type: string
                              example: 2017-04-19T16:01:09Z
                            customer:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: cus_eaEXlZvhBfeGlDOm
                                name:
                                  type: string
                                  example: Tony Stark
                                email:
                                  type: string
                                  example: f1492621-4f39-45f7-adfb-82a373a0a85c@avengers.com
                                delinquent:
                                  type: boolean
                                  example: false
                                  default: true
                                created_at:
                                  type: string
                                  example: 2017-04-19T16:01:09Z
                                updated_at:
                                  type: string
                                  example: 2017-04-19T16:01:09Z
                            last_transaction:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: tran_3RYbBQjcnEcwrGp0
                                transaction_type:
                                  type: string
                                  example: credit_card
                                funding_source:
                                  type: string
                                  example: prepaid
                                gateway_id:
                                  type: string
                                  example: ddab707d-72ba-49f9-b356-f0b9ebfa3039
                                amount:
                                  type: integer
                                  example: 2990
                                  default: 0
                                status:
                                  type: string
                                  example: captured
                                success:
                                  type: boolean
                                  example: true
                                  default: true
                                installments:
                                  type: integer
                                  example: 1
                                  default: 0
                                statement_descriptor:
                                  type: string
                                  example: AVENGERS
                                acquirer_name:
                                  type: string
                                  example: simulator
                                acquirer_affiliation_code:
                                  type: string
                                  example: "12345"
                                acquirer_tid:
                                  type: string
                                  example: "431837"
                                acquirer_nsu:
                                  type: string
                                  example: "512784"
                                acquirer_auth_code:
                                  type: string
                                  example: "233215"
                                acquirer_message:
                                  type: string
                                  example: Simulator|Transação de simulação autorizada com sucesso
                                acquirer_return_code:
                                  type: string
                                  example: "0"
                                operation_type:
                                  type: string
                                  example: auth_and_capture
                                card:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: card_6xk9deAu2I2MdPzJ
                                    first_six_digits:
                                      type: string
                                      example: "402400"
                                    last_four_digits:
                                      type: string
                                      example: "8229"
                                    brand:
                                      type: string
                                      example: Amex
                                    holder_name:
                                      type: string
                                      example: Tony Stark
                                    exp_month:
                                      type: integer
                                      example: 1
                                      default: 0
                                    exp_year:
                                      type: integer
                                      example: 2018
                                      default: 0
                                    status:
                                      type: string
                                      example: active
                                    created_at:
                                      type: string
                                      example: 2017-04-19T16:01:09Z
                                    updated_at:
                                      type: string
                                      example: 2017-04-19T16:01:09Z
                                    billing_address:
                                      type: object
                                      properties:
                                        zip_code:
                                          type: string
                                          example: "90265"
                                        city:
                                          type: string
                                          example: Malibu
                                        state:
                                          type: string
                                          example: CA
                                        country:
                                          type: string
                                          example: US
                                        line_1:
                                          type: string
                                          example: 10880, Malibu Point, Malibu Central
                                    type:
                                      type: string
                                      example: credit
                                created_at:
                                  type: string
                                  example: 2017-04-19T16:01:09Z
                                updated_at:
                                  type: string
                                  example: 2017-04-19T16:01:09Z
                                gateway_response:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      example: "201"
                  - title: OK - Network Token
                    type: object
                    properties:
                      id:
                        type: string
                        example: or_5aEYRKmIwvTqpgoQ
                      code:
                        type: string
                        example: Y387TKKF3L
                      amount:
                        type: integer
                        example: 2990
                        default: 0
                      currency:
                        type: string
                        example: BRL
                      closed:
                        type: boolean
                        example: true
                        default: true
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: oi_gBLrzX1u3pHQMoEM
                            type:
                              type: string
                              example: product
                            description:
                              type: string
                              example: Chaveiro do Tesseract
                            amount:
                              type: integer
                              example: 2990
                              default: 0
                            quantity:
                              type: integer
                              example: 1
                              default: 0
                            status:
                              type: string
                              example: active
                            created_at:
                              type: string
                              example: 2023-03-17T14:20:27Z
                            updated_at:
                              type: string
                              example: 2023-03-17T14:20:27Z
                      customer:
                        type: object
                        properties:
                          id:
                            type: string
                            example: cus_K1oa3LKTZSlW6O7d
                          name:
                            type: string
                            example: Tony Stark
                          email:
                            type: string
                            example: avengerstark@ligadajustica.com.br
                          delinquent:
                            type: boolean
                            example: false
                            default: true
                          created_at:
                            type: string
                            example: 2023-03-17T14:19:22Z
                          updated_at:
                            type: string
                            example: 2023-03-17T14:19:22Z
                          phones:
                            type: object
                            properties: {}
                      status:
                        type: string
                        example: paid
                      created_at:
                        type: string
                        example: 2023-03-17T14:20:27Z
                      updated_at:
                        type: string
                        example: 2023-03-17T14:20:28Z
                      closed_at:
                        type: string
                        example: 2023-03-17T14:20:27Z
                      charges:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: ch_Ljvke06fdSErl62x
                            code:
                              type: string
                              example: Y387TKKF3L
                            amount:
                              type: integer
                              example: 2990
                              default: 0
                            paid_amount:
                              type: integer
                              example: 2990
                              default: 0
                            status:
                              type: string
                              example: paid
                            currency:
                              type: string
                              example: BRL
                            payment_method:
                              type: string
                              example: credit_card
                            paid_at:
                              type: string
                              example: 2023-03-17T14:20:28Z
                            created_at:
                              type: string
                              example: 2023-03-17T14:20:28Z
                            updated_at:
                              type: string
                              example: 2023-03-17T14:20:28Z
                            customer:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: cus_K1oa3LKTZSlW6O7d
                                name:
                                  type: string
                                  example: Tony Stark
                                email:
                                  type: string
                                  example: avengerstark@ligadajustica.com.br
                                delinquent:
                                  type: boolean
                                  example: false
                                  default: true
                                created_at:
                                  type: string
                                  example: 2023-03-17T14:19:22Z
                                updated_at:
                                  type: string
                                  example: 2023-03-17T14:19:22Z
                                phones:
                                  type: object
                                  properties: {}
                            last_transaction:
                              type: object
                              properties:
                                operation_key:
                                  type: string
                                  example: "409945098"
                                id:
                                  type: string
                                  example: tran_xbEM0pRmUASgBYAq
                                transaction_type:
                                  type: string
                                  example: credit_card
                                gateway_id:
                                  type: string
                                  example: 95e3e8f1-c5fc-4d62-8f0b-80bdc66d3e42
                                amount:
                                  type: integer
                                  example: 2990
                                  default: 0
                                status:
                                  type: string
                                  example: captured
                                success:
                                  type: boolean
                                  example: true
                                  default: true
                                installments:
                                  type: integer
                                  example: 1
                                  default: 0
                                installment_type:
                                  type: string
                                  example: merchant
                                statement_descriptor:
                                  type: string
                                  example: AVENGERS
                                acquirer_name:
                                  type: string
                                  example: simulator
                                acquirer_tid:
                                  type: string
                                  example: "894247649"
                                acquirer_nsu:
                                  type: string
                                  example: "49640"
                                acquirer_auth_code:
                                  type: string
                                  example: "169"
                                acquirer_message:
                                  type: string
                                  example: Transação capturada com sucesso
                                acquirer_return_code:
                                  type: string
                                  example: "00"
                                entry_mode:
                                  type: string
                                  example: ecommerce
                                operation_type:
                                  type: string
                                  example: auth_and_capture
                                card:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: card_DwER6M8Cl9hPKAOb
                                    first_six_digits:
                                      type: string
                                      example: "400000"
                                    last_four_digits:
                                      type: string
                                      example: "0010"
                                    brand:
                                      type: string
                                      example: Visa
                                    holder_name:
                                      type: string
                                      example: Homelander
                                    exp_month:
                                      type: integer
                                      example: 12
                                      default: 0
                                    exp_year:
                                      type: integer
                                      example: 2025
                                      default: 0
                                    status:
                                      type: string
                                      example: active
                                    type:
                                      type: string
                                      example: credit
                                    created_at:
                                      type: string
                                      example: 2023-03-17T14:19:43Z
                                    updated_at:
                                      type: string
                                      example: 2023-03-17T14:19:43Z
                                    billing_address:
                                      type: object
                                      properties:
                                        zip_code:
                                          type: string
                                          example: "90265"
                                        city:
                                          type: string
                                          example: Malibu
                                        state:
                                          type: string
                                          example: CA
                                        country:
                                          type: string
                                          example: US
                                        line_1:
                                          type: string
                                          example: 10880, Malibu Point, Malibu Central
                                    network_token:
                                      type: object
                                      properties:
                                        token_unique_reference:
                                          type: string
                                          example: 9cb80642-e3b6-4b30-b233-c54a4857cbf0
                                        status:
                                          type: string
                                          example: active
                                payment_type:
                                  type: string
                                  example: Token
                                created_at:
                                  type: string
                                  example: 2023-03-17T14:20:28Z
                                updated_at:
                                  type: string
                                  example: 2023-03-17T14:20:28Z
                                gateway_response:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      example: "200"
                                    errors:
                                      type: array
                                      items:
                                        type: object
                                        properties: {}
                                antifraud_response:
                                  type: object
                                  properties: {}
                                metadata:
                                  type: object
                                  properties: {}
                      checkouts:
                        type: array
                        items:
                          type: object
                          properties: {}
        "400":
          description: "400"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Order not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Order not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
