Get Invoice
GET
/__remote/api.vercel.com/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}Get Invoice details and status for a given invoice ID.
See Billing Events with Webhooks documentation on how to receive invoice events. This endpoint is used to retrieve the invoice details.
See Billing Events with Webhooks documentation on how to receive invoice events. This endpoint is used to retrieve the invoice details.
/__remote/api.vercel.com/v1/installations/{integrationConfigurationId}/billing/invoices/{invoiceId}
const response = await fetch('/__remote/api.vercel.com/v1/installations/integrationConfigurationId/billing/invoices/invoiceId', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "created": "string", "discounts": [ { "amount": "100.00", "billingPlanId": "example_id", "details": "Example details", "end": "string", "name": "Example Name", "resourceId": "example_id", "start": "string" } ], "externalId": "example_id", "invoiceDate": "string", "invoiceId": "example_id", "invoiceNumber": "string", "items": [ { "billingPlanId": "example_id", "details": "Example details", "end": "string", "name": "Example Name", "price": "100.00", "quantity": "1", "resourceId": "example_id", "start": "string", "total": "100.00", "units": "units" } ], "memo": "string", "outstandingTotal": "100.00", "paidAt": "example_id", "paidTotal": "100.00", "pendingRefundTotal": "100.00", "period": { "end": "string", "start": "string" }, "refundedAt": "string", "refundedTotal": "100.00", "refundReason": "Customer requested refund", "refundTotal": "100.00", "state": "draft", "test": "false", "total": "100.00", "updated": "string"}AuthorizationbearerToken
Default authentication mechanism
integrationConfigurationIdstringRequired
invoiceIdstringRequired
200Success
createdstringRequired
System creation date. ISO 8601 timestamp.
discountsarrayOptional
Invoice discounts.
externalIdstringOptional
Partner-supplied Invoice ID, if applicable.
invoiceDatestringRequired
Invoice date. ISO 8601 timestamp.
invoiceIdstringRequired
Edgenivo Marketplace Invoice ID.
invoiceNumberstringOptional
User-readable invoice number.
itemsarrayRequired
Invoice items.
memostringOptional
Additional memo for the invoice.
outstandingTotalstringOptional
Amount still owed on the invoice, per the payment processor. Can be positive even for states "refunded" or "refund_requested", since a refund does not settle an unpaid remainder. A dollar-based decimal string. Absent when no payment data is available yet.
paidAtstringOptional
Moment the invoice was paid. ISO 8601 timestamp.
paidTotalstringOptional
Total amount paid and retained: payments received minus refunds applied. A dollar-based decimal string. Absent when no payment data is available yet.
pendingRefundTotalstringOptional
Requested refund amount not yet applied by the payment processor: "refundTotal" minus "refundedTotal". A dollar-based decimal string. Only present when a refund was requested or applied.
periodobjectRequired
Subscription period for this billing cycle. ISO 8601 timestamps.
refundedAtstringOptional
Most recent moment the invoice was refunded. ISO 8601 timestamp.
refundedTotalstringOptional
Total refund amount applied by the payment processor, on the same pre-tax basis as "refundTotal". Counts both money returned and debt cancelled on unpaid invoices. May be lower than "refundTotal", which is the requested amount. A dollar-based decimal string. Only present when a refund was requested or applied.
refundReasonstringOptional
The reason for refund. Only present when a refund has been requested.
refundTotalstringOptional
Total refund amount requested. Only present when a refund has been requested. A dollar-based decimal string.
statestringRequired
Invoice state. Reports the payment state of the invoice; refund progress is reported separately via "refundedTotal" and "pendingRefundTotal". The states "refunded" and "refund_requested" only appear when the payment state cannot be determined.
testbooleanOptional
Whether the invoice is in the testmode (no real transaction created).
totalstringRequired
Invoice total amount. A dollar-based decimal string.
updatedstringRequired
System update date. ISO 8601 timestamp.
400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
429Error