---
updatedAt: 2026-04-08T00:12:31.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/v2.4/llms.txt
---

# Get invoice

Retrieve a single invoice by ID.

## Overview

Retrieve a single invoice by ID. Supports [expanding relationships](api-core-expanding-relationships).

**Example:** View an invoice with the associated subscription and customer details: `?expand=subscription,user`

| Feature                                        | Fields                                       |
| ---------------------------------------------- | -------------------------------------------- |
| [Expandable](api-core-expanding-relationships) | `subscription`, `charge`, `user`, `discount` |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/invoices/{id}": {
      "get": {
        "summary": "Get invoice",
        "description": "Retrieve a single invoice by ID.",
        "operationId": "get-invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "The invoice ID."
          },
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "An optional comma separated list of [supported relationships](ref:api-core-expanding-relationships#expandable-relationships) to expand. This endpoint supports expanding `subscription`, `charge`, `user` and `discount` relationships."
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": "{\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 10,\n\t\t\t\"amount_due\": 0,\n\t\t\t\"amount_paid\": 0,\n\t\t\t\"amount_remaining\": 0,\n\t\t\t\"auto_advance\": false,\n\t\t\t\"billing\": \"charge_automatically\",\n\t\t\t\"billing_reason\": \"subscription_create\",\n\t\t\t\"currency\": \"bif\",\n\t\t\t\"due_date\": null,\n\t\t\t\"user_id\": 3,\n\t\t\t\"charge_id\": null,\n\t\t\t\"subscription_id\": 8,\n\t\t\t\"plan_name\": null,\n\t\t\t\"product_name\": null,\n\t\t\t\"ending_balance\": 0,\n\t\t\t\"hosted_invoice_url\": \"https:\\/\\/invoice.stripe.com\\/i\\/acct_1JkHv4AKW6NZEGXw\\/test_YWNjdF8xSmtIdjRBS1c2TlpFR1h3LF9MNGdNQWZ1SjY4SXdCWm44WHh4M0xzMHNTMXdTTGhyLDM0MzAzNTgx0200lKkzQr93?s=ap\",\n\t\t\t\"invoice_pdf\": \"https:\\/\\/pelcro-khairy.eu.ngrok.io\\/pdf\\/invoice\\/eyJpdiI6IkEwK2lONEpHNVNDTjNXZnNyWjdQVFE9PSIsInZhbHVlIjoiZ292bmhFQ1NuakxRbmN6U1VDUnk1WjJKblI5Y2RkRnlPODBQQlZObzBRbz0iLCJtYWMiOiJhYjM3NTI4MTc2YTZmNjgzYTk5YWI3ZGFmMTA3ZTRkYWJkM2IyNmFhMjUwNGI4YzE5ZjZlYjAwMmRiMDM0MDJhIiwidGFnIjoiIn0=\",\n\t\t\t\"is_imported\": null,\n\t\t\t\"number\": \"A70BD1E1-0003\",\n\t\t\t\"paid\": true,\n\t\t\t\"period_start\": 1643762780,\n\t\t\t\"period_end\": 1643762780,\n\t\t\t\"post_payment_credit_notes_amount\": 0,\n\t\t\t\"pre_payment_credit_notes_amount\": 0,\n\t\t\t\"starting_balance\": 0,\n\t\t\t\"status\": \"paid\",\n\t\t\t\"subtotal\": 0,\n      \"customer_address\": {\n\t\t\t\"city\": \"\",\n\t\t\t\"country\": \"CA\",\n\t\t\t\"line1\": \"address line 1\",\n\t\t\t\"line2\": \"\",\n\t\t\t\"postal_code\": \"\",\n\t\t\t\"state\": \"BC\"\n\t\t\t},\n\t\t\t\"tax\": null,\n\t\t\t\"total\": 0,\n\t\t\t\"finalized_at\": 1643762780,\n\t\t\t\"marked_uncollectible_at\": null,\n\t\t\t\"paid_at\": 1643762780,\n\t\t\t\"voided_at\": null,\n\t\t\t\"created_at\": null,\n\t\t\t\"updated_at\": 1644193110,\n\t\t\t\"deleted_at\": null\n\t\t}\n}"
                  },
                  "Expanded": {
                    "summary": "Expanded",
                    "value": "{\n  \"data\": {\n    \"id\": 262,\n    \"charge\": {\n      \"id\": 42,\n      \"amount\": 10000,\n      \"currency\": \"usd\",\n      \"status\": \"succeeded\",\n      \"paid\": true,\n      \"offline\": false\n    },\n    \"discount\": null,\n    \"subscription\": {\n      \"id\": 104,\n      \"plan\": 327,\n      \"status\": \"active\",\n      \"billing\": \"charge_automatically\",\n      \"created\": 1616245118\n    },\n    \"user\": {\n      \"id\": 14,\n      \"email\": \"john@example.com\",\n      \"first_name\": \"John\",\n      \"last_name\": \"Doe\"\n    },\n    \"amount_due\": 10000,\n    \"amount_paid\": 10000,\n    \"amount_remaining\": 0,\n    \"currency\": \"usd\",\n    \"status\": \"paid\",\n    \"due_date\": 1618923518,\n    \"created_at\": 1616245118,\n    \"updated_at\": 1616245200\n  },\n  \"status\": \"success\"\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Invalid request, please try again.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request, please try again."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "error": {
                        "status": 404,
                        "message": "Not found."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "php",
              "code": "use GuzzleHttp\\Client;\n\n$site_id = 0; // (int) your site id here\n$page = 1; // (int) the page number  here\n  \n$api_key = '' // (string) your api key here\n$uri = \"invoices\";\n\n$config = [\n  'base_uri' => 'https://www.pelcro.com/api/v1/core/'\n];\n\n$client = new Client($config);\n\n$options = [\n\t'json' => [\n\t\t'site_id' => $site_id,\n\t\t'page' => $page,\n\t],\n\t'headers' => [\n\t\t'Accept' => 'application/json',\n\t\t'Authorization' => 'Bearer ' . $api_key\n\t]\n];\n\n$response = $client->request('GET', $uri, $options);"
            }
          ],
          "samples-languages": [
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [List invoices](https://docs.pelcro.com/v2.4/reference/api-core-list-invoices.md)
* [Pay invoice (offline)](https://docs.pelcro.com/v2.4/reference/api-core-pay-invoice.md)
* [Void invoice](https://docs.pelcro.com/v2.4/reference/api-core-void-invoice.md)
* [Update invoice ](https://docs.pelcro.com/v2.4/reference/update-invoice.md)
* [Mark invoice as uncollectible](https://docs.pelcro.com/v2.4/reference/api-core-mark-as-uncollectible-invoices.md)
* [Create invoice](https://docs.pelcro.com/v2.4/reference/create-invoice.md)
* [Apply balance to invoice](https://docs.pelcro.com/v2.4/reference/api-core-apply-balance-to-invoice.md)