Skip to content
Docs

Submit Prepayment Balances

POSThttps://api.vercel.com/v1/installations/{integrationConfigurationId}/billing/balance
Sends the prepayment balances. The partner should do this at least once a day and ideally once per hour.
Use the credentials.access_token we provided in the Upsert Installation body to authorize this request.
https://api.vercel.com/v1/installations/{integrationConfigurationId}/billing/balance
const response = await fetch('https://api.vercel.com/v1/installations/integrationConfigurationId/billing/balance', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"timestamp": "2024-01-01T00:00:00Z",
"balances": [
{
"resourceId": "example_id",
"credit": "string",
"nameLabel": "Example Name",
"currencyValueInCents": "123"
}
]
}),
});
const data = await response.json();
console.log(data);
Response
{}
AuthorizationbearerToken

Default authentication mechanism

integrationConfigurationIdstringRequired
application/json
timestampstringRequired
Server time of your integration, used to determine the most recent data for race conditions & updates. Only the latest usage data for a given day, week, and month will be kept.
balancesarrayRequired
201Success
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
410Error