Skip to main content

invoice_summary

Creates, updates, deletes, gets or lists an invoice_summary resource.

Overview

Nameinvoice_summary
TypeResource
Iddigitalocean.billing.invoice_summary

Fields

The following fields are returned by SELECT queries:

To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

NameDatatypeDescription
invoice_idstringID of the invoice (example: 123456789)
user_namestringName of the DigitalOcean customer being invoiced. (example: Sammy Shark)
amountstringTotal amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. (example: 27.13)
billing_periodstringBilling period of usage for which the invoice is issued, in YYYY-MM format. (example: 2020-01)
credits_and_adjustmentsobjectA summary of the credits and adjustments contributing to the invoice.
invoice_uuidstringUUID of the invoice (example: 22737513-0ea7-4206-8ceb-98a575af7681)
overagesobjectA summary of the overages contributing to the invoice.
product_chargesobjectA summary of the product usage charges contributing to the invoice. This will include an amount, and grouped aggregates by resource type under the items key.
taxesobjectA summary of the taxes contributing to the invoice.
user_billing_addressobjectThe billing address of the customer being invoiced.
user_companystringCompany of the DigitalOcean customer being invoiced, if set. (example: DigitalOcean)
user_emailstringEmail of the DigitalOcean customer being invoiced. (example: sammy@digitalocean.com)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
invoices_get_summary_by_uuidselectinvoice_uuidTo retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
invoice_uuidstringUUID of the invoice (example: 22737513-0ea7-4206-8ceb-98a575af7681)

SELECT examples

To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

SELECT
invoice_id,
user_name,
amount,
billing_period,
credits_and_adjustments,
invoice_uuid,
overages,
product_charges,
taxes,
user_billing_address,
user_company,
user_email
FROM digitalocean.billing.invoice_summary
WHERE invoice_uuid = '{{ invoice_uuid }}' -- required;