Endpoints
- access-groups
- artifacts
- checks
- projects
- deployments
- domains
- dns
- API Reference
- logDrains
- edge-config
- user
- marketplace
- GETGet Account Information
- GETGet Member Information
- POSTCreate Event
- POSTSubmit Billing Data
- POSTSubmit Invoice
- GETGet Invoice
- POSTInvoice Actions
- POSTSubmit Prepayment Balances
- PUTUpdate Resource Secrets (Deprecated)
- PUTUpdate Resource Secrets
- PUTImport Resource
- POSTCreate one or multiple experimentation items
- DELDelete an existing experimentation item
- PATCHPatch an existing experimentation item
- PUTPush data into a user-provided Edge Config
- HEADGet the data of a user-provided Edge Config
- GET
- integrations
- authentication
- logs
- projectMembers
- environment
- security
- teams
- webhooks
- aliases
- certs
marketplace
Get Invoice
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.
GET
/
v1
/
installations
/
{integrationConfigurationId}
/
billing
/
invoices
/
{invoiceId}
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>",
});
// Handle the result
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>"
}
Authorizations
Default authentication mechanism
Response
200
application/json
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>",
});
// Handle the result
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>"
}