Menu

Submit Invoice

POSThttps://api.vercel.com/v1/installations/{integrationConfigurationId}/billing/invoices
This endpoint allows the partner to submit an invoice to Vercel. The invoice is created in Vercel's billing system and sent to the customer. Depending on the type of billing plan, the invoice can be sent at a time of signup, at the start of the billing period, or at the end of the billing period.

Use the credentials.access_token we provided in the Upsert Installation body to authorize this request.
There are several limitations to the invoice submission:

1. A resource can only be billed once per the billing period and the billing plan.
2. The billing plan used to bill the resource must have been active for this resource during the billing period.
3. The billing plan used must be a subscription plan.
4. The interim usage data must be sent hourly for all types of subscriptions. See Send subscription billing and usage data API on how to send interim billing and usage data.
https://api.vercel.com/v1/installations/{integrationConfigurationId}/billing/invoices
const response = await fetch('https://api.vercel.com/v1/installations/string/billing/invoices', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"externalId": "string",
"invoiceDate": "string",
"memo": "string",
"period": {
"start": "string",
"end": "string"
},
"items": [],
"discounts": [],
"test": {
"validate": "true",
"result": "paid"
}
}),
});
const data = await response.json();
console.log(data);
Response
{
"invoiceId": "string",
"test": "false",
"validationErrors": []
}
AuthorizationbearerToken

Default authentication mechanism

integrationConfigurationIdstringRequired

This endpoint expects an object.

externalIdstringOptional
invoiceDatestringRequired
Invoice date. Must be within the period's start and end.
memostringOptional
Additional memo for the invoice.
periodobjectRequired
Subscription period for this billing cycle.
itemsarrayRequired
discountsarrayOptional
testobjectOptional
Test mode
invoiceIdstringOptional
testbooleanOptional
validationErrorsarrayOptional
400One of the provided values in the request body is invalid. One 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
409Error
Submit Invoice | Vercel API