Navigation

Get One Organization Invoice

The Atlas API authenticates using HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

To learn how to configure API access for an Atlas project, see Configure Atlas API Access.

https://cloud.mongodb.com/api/atlas/v1.0

GET /orgs/{ORG-ID}/invoices/{INVOICE-ID}
NameTypeDescription
ORG-IDstringUnique identifier of the organization.
INVOICE-IDstringUnique identifier of the invoice. Charges are typically posted the next day.

The following query parameters are optional:

Query ParameterTypeDescriptionDefault
prettybooleanDisplays response in a prettyprint format.false
envelopebooleanSpecifies whether or not to wrap the response in an envelope.false

This endpoint does not use HTTP request body parameters.

This endpoint can return its content in JSON or CSV format. Use the Accept request header to specify your desired the content type.

  • For JSON, use "Accept: application/json";
  • For CSV, use "Accept: text/csv"

If you specify Accept: application/json in the request headers, the HTTP response is a JSON document that includes the following fields:

NameTypeDescription
amountBilledCentsnumberAmount billed in this invoice, calculated as subtotalCents + salesTaxCents - startingBalanceCents
amountPaidCentsnumberAmount paid for this invoice.
createdstringTimestamp in ISO 8601 date and time format in UTC when this invoice was created.
creditsCentsnumberAmount credited by MongoDB, in USD cents.
endDatestringTimestamp in ISO 8601 date and time format in UTC when the billing period for this invoice ended.
groupIdstringUnique identifier of the project with which the invoice is associated. Does not appear on all invoices.
idstringUnique identifier for this invoice.
lineItemsobject array

Line items in the invoice. This information is also found in the Usage Details section of the Invoice page in the Atlas UI.

Each object in the array includes the following fields:

ItemDescription
clusterNameThe name of the cluster that incurred the charge
createdTimestamp in ISO 8601 date and time format in UTC when the line item was posted to the invoice.
endDateTimestamp in ISO 8601 date and time format in UTC when the period for which the line item applies ended.
discountCentsAmount discounted, in USD cents. Displays when applicable.
groupIdID of the project with which the line item is associated.
noteNote regarding the line item.
percentDiscountPercent of discount. Displays when applicable.
quantityNumber of units of the line item (e.g. GB, hours, etc.).
skuDescription of the line item. This could be the instance type, a support charge, advanced security, etc.
startDateTimestamp in ISO 8601 date and time format in UTC when the period for which the line item applies began.
stitchAppNameName of the MongoDB Realm app associated with the line item.
totalPriceCents

Total price for the line item, in USD cents. Equal to

unitPriceDollars * quantity * 100
unitUnit of measure (e.g. GB, hours, etc.)
unitPriceDollarsCost of the item, in dollars.
linksobject arrayOne or more links to sub-resources and/or related resources. The relation-types between URL s are explained in the Web Linking Specification.
orgIdstringUnique identifier for the organization that received this invoice.
paymentsobject array

Payments applied to the invoice. Objects in the payments array include the following fields:

FieldDescription
amountBilledCentsThe amount of the invoice, in USD cents.
amountPaidCentsThe amount that the customer paid, in USD cents.
createdTimestamp in ISO 8601 date and time format in UTC when the payment was recorded.
idUnique identifier of the payment.
salesTaxCentsAmount of sales tax paid, in USD cents.
statusName

State of the payment.

StatusDescription
CANCELLEDThe payment has been cancelled.
FAILEDThe attempt to charge the credit card failed.
FORGIVENThe payment was created, but was subsequently forgiven.
NEWThe payment has been created, but no attempt has been made to charge the credit card.
PAIDThe payment was successful.
subtotalCentsSum of all positive invoice line items, in USD cents.
updatedTimestamp in ISO 8601 date and time format in UTC when the object was last updated.
refundsobject array

Refunds issued for the invoice. Objects in the refunds array include the following fields:

FieldDescription
amountCentsThe amount of the refund, in USD cents.
createdTimestamp in ISO 8601 date and time format in UTC when the refund was recorded.
reasonReason for the refund.
paymentIdUnique identifier of the payment.
salesTaxCentsnumberAmount of taxes levied on subtotalCents.
startDatestringTimestamp in ISO 8601 date and time format in UTC of the starting date for this invoice.
statusNamestring

State of this invoice. Accepted values are:

StatusDescription
PAIDThe funds have been transferred to MongoDB.
PREPAIDThe customer has purchased credit from MongoDB sales, so the customer is not charged.
FREEThe amount turned out to be zero, so the customer is not charged.
PENDINGIncludes charges for the current subscription cycle. An organization should never have more than one invoice in this state.
FORGIVENThe charge has been forgiven. If the charge succeeded, it has been refunded.
FAILEDAn attempt to charge the credit card for the amount due failed.
CLOSEDAll charges for the subscription cycle have been finalized, the balance is more than zero, and the customer has not been charged yet.
subtotalCentsnumberSum of all positive invoice line items in USD cents.
updatedstringTimestamp in ISO 8601 date and time format in UTC when the invoice was last updated.

If you set the query element envelope to true, the response is wrapped by the content object.

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \
--header "Accept: application/json" \
--include \
--request GET "https://cloud.mongodb.com/api/atlas/v1.0/orgs/{ORG-ID}/invoices/{INVOICE-ID}"
Info With Circle IconCreated with Sketch.Note

In the following sample response, the lineItems array has been truncated for ease of viewing.

{
"amountBilledCents" : 240,
"amountPaidCents" : 240,
"created" : "2018-04-01T06:14:31Z",
"endDate" : "2018-05-01T00:00:00Z",
"id" : "{INVOICE-ID}",
"lineItems" : [ {
"clusterName" : "{CLUSTER-NAME}",
"created" : "2018-05-01T04:05:31Z",
"endDate" : "2018-05-01T00:00:00Z",
"groupId" : "{PROJECT-ID}",
"quantity" : 72.0,
"sku" : "ATLAS_INSTANCE_M0",
"startDate" : "2018-04-30T00:00:00Z",
"totalPriceCents" : 0,
"unit": "server hours",
"unitPriceDollars" : 0.0
}, {
"clusterName" : "{CLUSTER-NAME}",
"created" : "2018-04-30T04:05:19Z",
"endDate" : "2018-04-30T00:00:00Z",
"groupId" : "{PROJECT-ID}",
"quantity" : 72.0,
"sku" : "ATLAS_INSTANCE_M0",
"startDate" : "2018-04-29T00:00:00Z",
"totalPriceCents" : 0,
"unit": "server hours",
"unitPriceDollars" : 0.0
},
... ,
{
"clusterName" : "{CLUSTER-NAME}",
"created" : "2018-04-02T06:05:07Z",
"endDate" : "2018-04-02T00:00:00Z",
"groupId" : "{PROJECT-ID}",
"quantity" : 72.0,
"sku" : "ATLAS_INSTANCE_M0",
"startDate" : "2018-04-01T00:00:00Z",
"totalPriceCents" : 0,
"unit": "server hours",
"unitPriceDollars" : 0.0
} ],
"links" : [ {
"href" : "https://cloud.mongodb.com/api/atlas/v1.0/orgs/{ORG-ID}",
"rel" : "http://mms.mongodb.com/org"
}, {
"href" : "https://cloud.mongodb.com/api/atlas/v1.0/orgs/{ORG-ID}/invoices/{INVOICE-ID}",
"rel" : "self"
} ],
"orgId" : "{ORG-ID}",
"payments" : [ {
"amountBilledCents" : 240,
"amountPaidCents" : 240,
"created" : "2018-05-01T04:05:14Z",
"id" : "{PAYMENT-ID}",
"salesTaxCents" : 19,
"statusName" : "PAID",
"subtotalCents" : 221,
"updated" : "2018-05-01T07:00:46Z"
} ],
"refunds" : [ ],
"salesTaxCents" : 19,
"startDate" : "2018-04-01T00:00:00Z",
"startingBalanceCents" : 0,
"statusName" : "PAID",
"subtotalCents" : 221,
"updated" : "2018-05-01T07:00:46Z"
Give Feedback