credits
Creates, updates, deletes, gets or lists a credits resource.
Overview
| Name | credits |
| Type | Resource |
| Id | vercel.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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
buy | exec | item | source, teamId, slug | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
slug | string | The Team slug to perform the request on behalf of. |
source | string | The source of the purchase request. Defaults to api if not specified. |
teamId | string | The Team identifier to perform the request on behalf of. |
Lifecycle Methods
EXEC variables use wire (API) names.
- buy
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 }}"
}'
;