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

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

# Obter fatura

`GET` `/invoices/{invoice_id}`

Operation ID: `obter-fatura-1`

Através do identificador da fatura (`invoice_id`) é possível recuperar as informação da fatura.

## Path parameters

- `invoice_id` (string, required) - Código da fatura.<br>Formato: `in_XXXXXXXXXXXXXXXX`.

## Responses

- `200` - 200
- `404` - 404

## 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:
  /invoices/{invoice_id}:
    get:
      summary: Obter fatura
      description: Através do identificador da fatura (`invoice_id`) é possível
        recuperar as informação da fatura.
      operationId: obter-fatura-1
      parameters:
        - name: invoice_id
          in: path
          description: "Código da fatura.<br>Formato: `in_XXXXXXXXXXXXXXXX`."
          schema:
            type: string
          required: true
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: >-
                    {
                        "id": "in_qBY5VvpuEACaw5bg",
                        "code": "O5D5FRSQ9O",
                        "url": "/invoices/in_qBY5VvpuEACaw5bg",
                        "amount": 1490,
                        "total_discounts" :1000,
                        "total_increments" :1000,
                        "status": "paid",
                        "payment_method": "credit_card",
                        "due_at": "2017-04-19T00:00:00Z",
                        "created_at": "2017-04-19T17:35:15Z",
                        "items": [
                            {
                                "name": "Nome - teste",
                                "amount": 1490,
                                "quantity": 1,
                                "description": "Premium"
                            }
                        ],
                        "customer": {
                            "id": "cus_mnG9AbHZmSYQRWM7",
                            "name": "Tony Stark",
                            "email": "38acb30a-99d9-4b12-a0aa-7305c7dd81f2@avengers.com",
                            "delinquent": false,
                            "created_at": "2017-04-19T17:35:05Z",
                            "updated_at": "2017-04-19T17:35:05Z"
                        },
                        "subscription": {
                            "id": "sub_OGE4Q1Miy1fd4B3z",
                            "code": "R7P3FNU489",
                            "start_at": "2017-04-19T00:00:00Z",
                            "interval": "month",
                            "interval_count": 1,
                            "billing_type": "postpaid",
                            "next_billing_at": "2017-05-19T00:00:00Z",
                            "payment_method": "credit_card",
                            "currency": "BRL",
                            "statement_descriptor": "Spotify",
                            "installments": 1,
                            "status": "active",
                            "created_at": "2017-04-19T17:35:06Z",
                            "updated_at": "2017-04-19T17:35:06Z"
                        },
                        "cycle": {
                            "id": "cycle_5JB1vZBZimCXvaRp",
                            "start_at": "2017-04-19T00:00:00Z",
                            "end_at": "2017-05-18T23:59:59Z",
                            "billing_at": "2017-05-19T00:00:00Z"
                        },
                        "charge": {
                            "id": "ch_OGWebzPtDCOQex2r",
                            "code": "R7P3FNU489-01",
                            "gateway_id": "729154b2-1a94-45e0-bce8-1f6966725ee5",
                            "amount": 1490,
                            "status": "paid",
                            "currency": "BRL",
                            "payment_method": "credit_card",
                            "due_at": "2017-04-19T00:00:00Z",
                            "paid_at": "2017-04-19T17:35:16Z",
                            "created_at": "2017-04-19T17:35:15Z",
                            "updated_at": "2017-04-19T17:35:15Z",
                            "last_transaction": {
                                "id": "tran_EBlMxnTRmfrg0joK",
                                "transaction_type": "credit_card",
                                "funding_source": "prepaid",
                                "gateway_id": "02bf6173-0e19-4060-836e-626c81f02749",
                                "amount": 1490,
                                "status": "captured",
                                "success": true,
                                "installments": 1,
                                "statement_descriptor": "Spotify",
                                "acquirer_name": "simulator",
                                "acquirer_affiliation_code": "12345",
                                "acquirer_tid": "12869",
                                "acquirer_nsu": "680036",
                                "acquirer_auth_code": "637781",
                                "acquirer_message": "Simulator|Transação de simulação autorizada com sucesso",
                                "acquirer_return_code": "0",
                                "operation_type": "auth_and_capture",
                                "card": {
                                    "id": "card_x8PBA3TppSDWjrgd",
                                    "first_six_digits": "542501",
                                    "last_four_digits": "8229",
                                    "brand": "Amex",
                                    "holder_name": "Tony Stark",
                                    "exp_month": 1,
                                    "exp_year": 2018,
                                    "status": "active",
                                    "created_at": "2017-04-19T17:35:05Z",
                                    "updated_at": "2017-04-19T17:35:05Z",
                                    "billing_address": {
                                        "line_1": "10880, Malibu Point, Malibu Central",
                                        "zip_code": "90265",
                                        "city": "Malibu",
                                        "state": "CA",
                                        "country": "US"
                                    },
                                    "type": "credit"
                                },
                                "created_at": "2017-04-19T17:35:15Z",
                                "updated_at": "2017-04-19T17:35:15Z",
                                "gateway_response": {
                                    "code": "201"
                                }
                            }
                        }
                    }
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: in_qBY5VvpuEACaw5bg
                  code:
                    type: string
                    example: O5D5FRSQ9O
                  url:
                    type: string
                    example: /invoices/in_qBY5VvpuEACaw5bg
                  amount:
                    type: integer
                    example: 1490
                    default: 0
                  total_discounts:
                    type: integer
                    example: 1000
                    default: 0
                  total_increments:
                    type: integer
                    example: 1000
                    default: 0
                  status:
                    type: string
                    example: paid
                  payment_method:
                    type: string
                    example: credit_card
                  due_at:
                    type: string
                    example: 2017-04-19T00:00:00Z
                  created_at:
                    type: string
                    example: 2017-04-19T17:35:15Z
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: Nome - teste
                        amount:
                          type: integer
                          example: 1490
                          default: 0
                        quantity:
                          type: integer
                          example: 1
                          default: 0
                        description:
                          type: string
                          example: Premium
                  customer:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cus_mnG9AbHZmSYQRWM7
                      name:
                        type: string
                        example: Tony Stark
                      email:
                        type: string
                        example: 38acb30a-99d9-4b12-a0aa-7305c7dd81f2@avengers.com
                      delinquent:
                        type: boolean
                        example: false
                        default: true
                      created_at:
                        type: string
                        example: 2017-04-19T17:35:05Z
                      updated_at:
                        type: string
                        example: 2017-04-19T17:35:05Z
                  subscription:
                    type: object
                    properties:
                      id:
                        type: string
                        example: sub_OGE4Q1Miy1fd4B3z
                      code:
                        type: string
                        example: R7P3FNU489
                      start_at:
                        type: string
                        example: 2017-04-19T00:00:00Z
                      interval:
                        type: string
                        example: month
                      interval_count:
                        type: integer
                        example: 1
                        default: 0
                      billing_type:
                        type: string
                        example: postpaid
                      next_billing_at:
                        type: string
                        example: 2017-05-19T00:00:00Z
                      payment_method:
                        type: string
                        example: credit_card
                      currency:
                        type: string
                        example: BRL
                      statement_descriptor:
                        type: string
                        example: Spotify
                      installments:
                        type: integer
                        example: 1
                        default: 0
                      status:
                        type: string
                        example: active
                      created_at:
                        type: string
                        example: 2017-04-19T17:35:06Z
                      updated_at:
                        type: string
                        example: 2017-04-19T17:35:06Z
                  cycle:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cycle_5JB1vZBZimCXvaRp
                      start_at:
                        type: string
                        example: 2017-04-19T00:00:00Z
                      end_at:
                        type: string
                        example: 2017-05-18T23:59:59Z
                      billing_at:
                        type: string
                        example: 2017-05-19T00:00:00Z
                  charge:
                    type: object
                    properties:
                      id:
                        type: string
                        example: ch_OGWebzPtDCOQex2r
                      code:
                        type: string
                        example: R7P3FNU489-01
                      gateway_id:
                        type: string
                        example: 729154b2-1a94-45e0-bce8-1f6966725ee5
                      amount:
                        type: integer
                        example: 1490
                        default: 0
                      status:
                        type: string
                        example: paid
                      currency:
                        type: string
                        example: BRL
                      payment_method:
                        type: string
                        example: credit_card
                      due_at:
                        type: string
                        example: 2017-04-19T00:00:00Z
                      paid_at:
                        type: string
                        example: 2017-04-19T17:35:16Z
                      created_at:
                        type: string
                        example: 2017-04-19T17:35:15Z
                      updated_at:
                        type: string
                        example: 2017-04-19T17:35:15Z
                      last_transaction:
                        type: object
                        properties:
                          id:
                            type: string
                            example: tran_EBlMxnTRmfrg0joK
                          transaction_type:
                            type: string
                            example: credit_card
                          funding_source:
                            type: string
                            example: prepaid
                          gateway_id:
                            type: string
                            example: 02bf6173-0e19-4060-836e-626c81f02749
                          amount:
                            type: integer
                            example: 1490
                            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: Spotify
                          acquirer_name:
                            type: string
                            example: simulator
                          acquirer_affiliation_code:
                            type: string
                            example: "12345"
                          acquirer_tid:
                            type: string
                            example: "12869"
                          acquirer_nsu:
                            type: string
                            example: "680036"
                          acquirer_auth_code:
                            type: string
                            example: "637781"
                          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_x8PBA3TppSDWjrgd
                              first_six_digits:
                                type: string
                                example: "542501"
                              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-19T17:35:05Z
                              updated_at:
                                type: string
                                example: 2017-04-19T17:35:05Z
                              billing_address:
                                type: object
                                properties:
                                  line_1:
                                    type: string
                                    example: 10880, Malibu Point, Malibu Central
                                  zip_code:
                                    type: string
                                    example: "90265"
                                  city:
                                    type: string
                                    example: Malibu
                                  state:
                                    type: string
                                    example: CA
                                  country:
                                    type: string
                                    example: US
                              type:
                                type: string
                                example: credit
                          created_at:
                            type: string
                            example: 2017-04-19T17:35:15Z
                          updated_at:
                            type: string
                            example: 2017-04-19T17:35:15Z
                          gateway_response:
                            type: object
                            properties:
                              code:
                                type: string
                                example: "201"
        "404":
          description: "404"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "message": "Invoice not found."
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invoice not found.
      deprecated: false
security:
  - sec0: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic
```
