Skip to main content

credits

Creates, updates, deletes, gets or lists a credits resource.

Overview

Namecredits
TypeResource
Idvercel.billing.credits

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
buyexecitemsource, teamId, slugPurchases credits for a Vercel team using the default payment method on file. The purchase is charged immediately via Stripe invoice. Supported credit types are v0, gateway, and agent. The amount field specifies the number of credits to purchase and must be a positive integer. An optional source query parameter can be provided to identify the caller. Defaults to api if not specified. This is only available for Owner, Member, Developer, Security, and Billing roles for the supplied team.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
slugstringThe Team slug to perform the request on behalf of.
sourcestringThe source of the purchase request. Defaults to api if not specified.
teamIdstringThe Team identifier to perform the request on behalf of.

Lifecycle Methods

EXEC variables use wire (API) names.

Purchases credits for a Vercel team using the default payment method on file. The purchase is charged immediately via Stripe invoice. Supported credit types are v0, gateway, and agent. The amount field specifies the number of credits to purchase and must be a positive integer. An optional source query parameter can be provided to identify the caller. Defaults to api if not specified. This is only available for Owner, Member, Developer, Security, and Billing roles for the supplied team.

EXEC vercel.billing.credits.buy
@source='{{ source }}',
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"item": "{{ item }}"
}'
;