• Products
  • Offerings
  • PricingPlans
  • Invoices
  • InvoiceGroups
  • Orders
  • Quotes
  • Entitlements
Platform
Commerce / Reference / REST API

Invoices

Postman Collection
OpenAPI

An invoice is an itemized statement of amounts owed by a customer as a result of using one or more products.

GET

List invoices

If the query param statusFilter is not present, all invoice are listed. If statusFilter=PAID (case-sensitive), only paid invoice (instant or deferred) are included. If statusFilter=UNPAID (case-sensitive), only unpaid invoices (that are finalised) are included.

Rate limit: 3000 requests per minute.

Request

Query parameters

invoice-group

string

status-filter

string

page-size

integer

start-id

string

Header parameters

X-transaction-account

string

Required

Responses

OK

application/json

PagedListV2InvoicePublicDto
GET/v2/invoices
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/commerce/api/v2/invoices' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 { "data": [ { "id": "<string>", "version": 2154, "number": "<string>", "invoiceGroup": "<string>", "memo": "<string>", "status": "DRAFT", "createdAt": 31, "finalizedAt": 31, "dueAt": 31, "paidAt": 31, "uncollectibleAt": 31, "billTo": { "name": "<string>", "taxId": "<string>", "taxIds": [ {} ], "postalAddress": { "country": "<string>" }, "priceEligibility": {} }, "shipTo": { "id": "<string>", "version": 2154, "name": "<string>", "postalAddress": { "country": "<string>" }, "priceEligibility": {}, "taxId": "<string>", "taxIds": [ {} ], "createdAt": 31 }, "paymentMethod": "<string>", "paymentMethodObj": {}, "currency": "USD", "subtotal": 2154, "total": 2154, "tax": 2154, "taxIdLabel": "<string>", "headerTaxId": "<string>", "headerTaxIds": [ { "headerTaxID": "<string>", "taxIdLabel": "<string>" } ], "additionalNotes": "<string>", "items": [ { "id": "<string>", "currency": "USD", "description": "<string>", "period": { "startAt": 31, "endAt": 31 }, "subtotal": 2154, "total": 2154, "quantity": 2154, "unitAmount": 2154, "adjustments": [ { "reason": "<string>", "type": "<string>", "amount": 2154 } ], "margins": [ { "amount": 2154, "type": "<string>" } ], "taxItems": [ {} ], "invoiceRequest": "<string>", "invoiceRequestItem": 2154, "invoiceRequestItemId": "<string>", "subscriptionObj": {}, "planObj": {}, "entitlementId": "<string>", "entitlementNumber": "<string>", "relationship": {}, "orderItemId": "<string>", "offeringKey": "<string>", "tax": 2154, "taxPercent": 2154, "originalInvoiceReferral": {}, "exchangeRate": 2154, "exchangeRateDate": "<string>", "proration": true, "metadata": {}, "orderId": "<string>" } ], "dunningHistory": [ { "attempt": "ONE", "errorCode": "<string>", "declineCode": "<string>", "message": "<string>", "updatedAt": "<string>", "nextPaymentAttemptDate": "<string>", "attemptCount": 2154 } ], "dunningStatus": { "attempt": "ONE", "errorCode": "<string>", "declineCode": "<string>", "message": "<string>", "updatedAt": "<string>", "nextPaymentAttemptDate": "<string>", "attemptCount": 2154 }, "purchaseOrderNumber": "<string>", "appliedBalance": 162, "reInvoiced": true, "prePaymentCreditNotesAmount": 73, "userDefinedNotes": {}, "paymentStatus": { "status": "NO_ACTION", "updatedAt": "<string>", "message": "<string>" } } ], "nextId": "<string>" }
GET

Get invoice by ID

Retrieve the invoice by id.

In countries like Canada, Government collects taxes at national and state level. To show these different taxes, we have taxItems. So Tax calculation will have multiple taxes to be considered.

Tax summaries can be constructed by grouping on the taxAmountLabel property.

e.g. multiple tax items - Canada.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 //InvoiceItem (“item1”) { // other invoice item properties... taxItems: [ { id: “taxItem1", tax: 5.00, taxPercent: 10.00, taxId: null, taxAmountLabel: “GST” }, { id: “taxItem2", tax: 10.00, taxPercent: 20.00, taxId: “bc_tax_id_456”, taxAmountLabel: “HST” } ] }, //InvoiceItem (“item2”) { // other invoice item properties... taxItems: [ { id: “taxItem1", tax: 3.00, taxPercent: 10.00, taxId: null, taxAmountLabel: “GST” }, { id: “taxItem2", tax: 6.00, taxPercent: 20.00, taxId: “bc_tax_id_456”, taxAmountLabel: “HST” } ] }

Consumers themselves will need to calculate TaxSummary as below.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { taxSummary[ { id: “taxItem1”, tax: 8.00, // summed GST of both invoice items taxPercent: 10.00, taxId: null, taxAmountLabel: “GST” }, { id: “taxItem2”, tax: 16.00, // summed HST of both invoice items taxPercent: 20.00, taxId: “bc_tax_id_456", taxAmountLabel: “HST” } ] }

Rate limit: 3000 requests per minute.

Request

Path parameters

id

string

Required

Header parameters

X-transaction-account

string

Required

Responses

OK

application/json

InvoicePublicDto
GET/v2/invoices/{id}
1 2 3 curl --request GET \ --url 'https://api.atlassian.com/commerce/api/v2/invoices/{id}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 { "id": "<string>", "version": 2154, "number": "<string>", "invoiceGroup": "<string>", "memo": "<string>", "status": "DRAFT", "createdAt": 31, "finalizedAt": 31, "dueAt": 31, "paidAt": 31, "uncollectibleAt": 31, "billTo": { "name": "<string>", "taxId": "<string>", "taxIds": [ { "id": "<string>", "label": "<string>", "taxIdLabel": "<string>", "taxIdDescription": "<string>", "metadata": {} } ], "postalAddress": { "line1": "<string>", "line2": "<string>", "city": "<string>", "country": "<string>", "state": "<string>", "phone": "<string>", "postcode": "<string>" }, "priceEligibility": {} }, "shipTo": { "id": "<string>", "version": 2154, "name": "<string>", "postalAddress": { "line1": "<string>", "line2": "<string>", "city": "<string>", "country": "<string>", "state": "<string>", "phone": "<string>", "postcode": "<string>" }, "priceEligibility": {}, "taxId": "<string>", "taxIds": [ { "id": "<string>", "label": "<string>", "taxIdLabel": "<string>", "taxIdDescription": "<string>", "metadata": {} } ], "createdAt": 31 }, "paymentMethod": "<string>", "paymentMethodObj": {}, "currency": "USD", "subtotal": 2154, "total": 2154, "tax": 2154, "taxIdLabel": "<string>", "headerTaxId": "<string>", "headerTaxIds": [ { "headerTaxID": "<string>", "taxIdLabel": "<string>" } ], "additionalNotes": "<string>", "items": [ { "id": "<string>", "currency": "USD", "description": "<string>", "period": { "startAt": 31, "endAt": 31 }, "subtotal": 2154, "total": 2154, "quantity": 2154, "unitAmount": 2154, "adjustments": [ { "reason": "<string>", "reasonCode": "<string>", "promotionId": "<string>", "type": "<string>", "amount": 2154, "percent": 2154, "promoCode": "<string>" } ], "margins": [ { "amount": 2154, "type": "<string>", "percent": 2154, "promoCode": "<string>", "promotionId": "<string>", "reasonCode": "<string>" } ], "taxItems": [ { "tax": 2154, "taxPercent": 2154, "taxAmountLabel": "<string>" } ], "invoiceRequest": "<string>", "invoiceRequestItem": 2154, "invoiceRequestItemId": "<string>", "subscriptionObj": { "id": "<string>", "versionInfo": "<string>", "stripeSubscriptionId": "<string>", "entitlementId": "<string>", "orderItemId": "<string>", "version": 2154, "stripeScheduleId": "<string>", "orderId": "<string>", "transactionAccountId": "<string>", "invoiceGroupId": "<string>", "offeringId": "<string>", "lastPaidOfferingId": "<string>", "pricingPlanId": "<string>", "status": "PROCESSING", "promotionIds": [ "<string>" ], "chargeQuantities": {}, "currentListPrice": 2154, "previousListPrice": 2154, "metadata": {}, "schedule": {}, "trialLengthDays": 2154, "isEditable": true, "createdTimestamp": 2154, "updatedTimestamp": 2154, "startTimestamp": 2154, "endTimestamp": 2154, "billingAnchorTimestamp": 2154, "currentBillingStartTimestamp": 2154, "currentBillingEndTimestamp": 2154, "nextBillingTimestamp": 2154, "nextBillingAnchorTimestamp": 2154, "cancelAtTheEndOfPeriod": true, "invoiceImmediately": true, "billingClockId": "<string>", "promotionInstances": [ {} ], "chargeQuantityList": [ { "chargeElement": "<string>", "quantity": 2154 } ], "trial": {}, "invoiceSettings": {}, "pauseBilling": {} }, "planObj": { "id": "<string>", "type": "<string>", "sku": "<string>", "hostingType": "<string>", "cycle": {} }, "entitlementId": "<string>", "entitlementNumber": "<string>", "relationship": { "relatesToEntitlements": [ {} ], "relatesFromEntitlements": [ {} ] }, "orderItemId": "<string>", "offeringKey": "<string>", "tax": 2154, "taxPercent": 2154, "originalInvoiceReferral": { "invoice": "<string>", "invoiceNumber": "<string>", "invoiceCreatedAt": "<string>", "invoiceItems": [ "<string>" ] }, "exchangeRate": 2154, "exchangeRateDate": "<string>", "proration": true, "metadata": {}, "orderId": "<string>" } ], "dunningHistory": [ { "attempt": "ONE", "errorCode": "<string>", "declineCode": "<string>", "message": "<string>", "updatedAt": "<string>", "nextPaymentAttemptDate": "<string>", "attemptCount": 2154 } ], "dunningStatus": { "attempt": "ONE", "errorCode": "<string>", "declineCode": "<string>", "message": "<string>", "updatedAt": "<string>", "nextPaymentAttemptDate": "<string>", "attemptCount": 2154 }, "purchaseOrderNumber": "<string>", "appliedBalance": 162, "reInvoiced": true, "prePaymentCreditNotesAmount": 73, "userDefinedNotes": {}, "paymentStatus": { "status": "NO_ACTION", "updatedAt": "<string>", "message": "<string>" } }

Rate this page: