Skip to content

Get an employer invoice's PDF download link

employers.retrieve_invoice_pdf(invoice_id, **kwargs) -> EmployerRetrieveInvoicePdfResponse { data }
GET/v1/employers/{employer_id}/invoices/{invoice_id}/pdf

Returns the time-limited PDF download link for a single invoice belonging to the employer’s billing customer. invoice_id is the external Chargebee id (not a prefixed UUID). The caller must be authorized for the employer; an unknown or unauthorized employer or invoice returns 404.

ParametersExpand Collapse
employer_id: String

Unique employer identifier (empr_*)

invoice_id: String

External Chargebee invoice id (not a prefixed UUID).

ReturnsExpand Collapse
class EmployerRetrieveInvoicePdfResponse { data }

Response containing a single employer invoice pdf resource.

data: { download_url}
download_url: String

Time-limited Chargebee PDF download link for the invoice.

Get an employer invoice's PDF download link

require "vitable_connect"

vitable_connect = VitableConnect::Client.new(
  api_key: "My API Key",
  environment: "environment_1" # defaults to "production"
)

response = vitable_connect.employers.retrieve_invoice_pdf("INV-00042", employer_id: "empr_abc123def456")

puts(response)
{
  "data": {
    "download_url": "https://chargebee.example/invoices/INV-00042.pdf"
  }
}
Returns Examples
{
  "data": {
    "download_url": "https://chargebee.example/invoices/INV-00042.pdf"
  }
}