POST /v1/billing/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.
Servers
- https://api.vercel.com
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
source |
String | No |
The source of the purchase request. Defaults to |
teamId |
String | No |
The Team identifier to perform the request on behalf of. |
slug |
String | No |
The Team slug to perform the request on behalf of. |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
item |
Object | Yes | |
item.creditType |
String | Yes |
The type of credits to purchase. Valid values:
|
item.amount |
Integer | Yes |
The amount of credits to purchase. |
item.type |
String | Yes |
The type of item to purchase. Valid values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.