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.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.marketplace.getInvoice({
integrationConfigurationId: "<id>",
invoiceId: "<id>",
});
console.log(result);
}
run();
{
"test": true,
"invoiceId": "<string>",
"externalId": "<string>",
"state": "pending",
"invoiceNumber": "<string>",
"invoiceDate": "<string>",
"period": {
"start": "<string>",
"end": "<string>"
},
"memo": "<string>",
"items": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"price": "<string>",
"quantity": 123,
"units": "<string>",
"total": "<string>"
}
],
"discounts": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"amount": "<string>"
}
],
"total": "<string>",
"refundReason": "<string>",
"refundTotal": "<string>",
"created": "<string>",
"updated": "<string>"
}
Default authentication mechanism
The response is of type object
.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.marketplace.getInvoice({
integrationConfigurationId: "<id>",
invoiceId: "<id>",
});
console.log(result);
}
run();
{
"test": true,
"invoiceId": "<string>",
"externalId": "<string>",
"state": "pending",
"invoiceNumber": "<string>",
"invoiceDate": "<string>",
"period": {
"start": "<string>",
"end": "<string>"
},
"memo": "<string>",
"items": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"price": "<string>",
"quantity": 123,
"units": "<string>",
"total": "<string>"
}
],
"discounts": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"amount": "<string>"
}
],
"total": "<string>",
"refundReason": "<string>",
"refundTotal": "<string>",
"created": "<string>",
"updated": "<string>"
}
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.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.marketplace.getInvoice({
integrationConfigurationId: "<id>",
invoiceId: "<id>",
});
console.log(result);
}
run();
{
"test": true,
"invoiceId": "<string>",
"externalId": "<string>",
"state": "pending",
"invoiceNumber": "<string>",
"invoiceDate": "<string>",
"period": {
"start": "<string>",
"end": "<string>"
},
"memo": "<string>",
"items": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"price": "<string>",
"quantity": 123,
"units": "<string>",
"total": "<string>"
}
],
"discounts": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"amount": "<string>"
}
],
"total": "<string>",
"refundReason": "<string>",
"refundTotal": "<string>",
"created": "<string>",
"updated": "<string>"
}
Default authentication mechanism
The response is of type object
.
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.marketplace.getInvoice({
integrationConfigurationId: "<id>",
invoiceId: "<id>",
});
console.log(result);
}
run();
{
"test": true,
"invoiceId": "<string>",
"externalId": "<string>",
"state": "pending",
"invoiceNumber": "<string>",
"invoiceDate": "<string>",
"period": {
"start": "<string>",
"end": "<string>"
},
"memo": "<string>",
"items": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"price": "<string>",
"quantity": 123,
"units": "<string>",
"total": "<string>"
}
],
"discounts": [
{
"billingPlanId": "<string>",
"resourceId": "<string>",
"start": "<string>",
"end": "<string>",
"name": "<string>",
"details": "<string>",
"amount": "<string>"
}
],
"total": "<string>",
"refundReason": "<string>",
"refundTotal": "<string>",
"created": "<string>",
"updated": "<string>"
}