Invoices

Retrieve invoice

Retrieves an invoice by ID.

GET
/invoices/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X GET "https://api.sandbox.billingrails.com/v1/invoices/inv_IhMUl3rrZ3"
{
  "invoice": {
    "object": "invoice",
    "id": "inv_IhMUl3rrZ3",
    "number": "INV-0001",
    "type": "adhoc",
    "status": "draft",
    "account_id": "acc_IhMUl3rrZ3",
    "currency": "USD",
    "collection_method": "manual",
    "credit_amount": 0,
    "outstanding_amount": 1000,
    "paid_amount": 0,
    "download_url": "https://billingrails.page/acme/i/inv_IhMUl3rrZ3/pdf",
    "hosted_url": "https://billingrails.page/acme/i/inv_IhMUl3rrZ3",
    "subscription_id": "sub_IhMUl3rrZ3",
    "subtotal_amount": 1000,
    "total_amount": 1000,
    "created_at": "2025-02-14T17:33:40.843Z",
    "due_at": "2025-02-14T17:33:40.843Z",
    "issued_at": "2025-02-14T17:33:40.843Z",
    "billing_start": "2025-02-14T17:33:40.843Z",
    "billing_end": "2025-02-14T17:33:40.843Z",
    "line_items": [
      {
        "object": "invoice_line_item",
        "id": "invli_IhMUl3rrZ3",
        "name": "Basic Plan",
        "description": "Basic Plan.",
        "quantity": 1,
        "unit_amount": 1000,
        "subtotal_amount": 1000,
        "total_amount": 1000,
        "billing_start": "2025-02-14T17:33:40.843Z",
        "billing_end": "2025-02-14T17:33:40.843Z"
      }
    ]
  },
  "meta": {
    "request_id": "req_IhMUl3rrZ3"
  }
}