Menu

Provision Purchase

POST/v1/installations/{installationId}/billing/provision
Optional endpoint, only required if your integration supports billing plans with type prepayment.
/v1/installations/{installationId}/billing/provision
const response = await fetch('/v1/installations/string/billing/provision', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"invoiceId": "string"
}),
});
const data = await response.json();
console.log(data);
Response
{
"timestamp": "string",
"balances": []
}
AuthorizationUser Authentication

Default authentication mechanism

AuthorizationSystem Authentication

Default authentication mechanism

installationIdstringRequired
X-Vercel-AuthstringOptional
The auth style used in the request (system, user, etc)
Idempotency-KeystringOptional
A unique key to identify a request across multiple retries

This endpoint expects an object.

invoiceIdstringRequired
ID of the invoice in Vercel proving the purchase of credits
Return a timestamp alongside a list of balances for the installation with the most up-to-date values
timestampstringRequired
Server time of your integration, used to determine the most recent data for race conditions & updates. Format is ISO 8601 YYYY-MM-DDTHH:mm:ss.SSSZ
balancesarrayRequired
400Input has failed validation
403Operation failed because the authentication is not allowed to perform this operation
409Operation failed because of a conflict with the current state of the resource
422Operation is well-formed, but cannot be executed due to semantic errors
Provision Purchase | Partner API