Submit Invoice
https://api.vercel.com/v1/installations/{integrationConfigurationId}/billing/invoicesUse 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.
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);{ "invoiceId": "string", "test": "false", "validationErrors": []}Default authentication mechanism
This endpoint expects an object.