Prices
Manage Stripe prices via the Admin API
Prices API
Manage pricing for your Stripe products. Prices define how much and how often to charge for products.
Endpoints
GET /api/admin/stripe/prices
List all prices from your Stripe account.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of prices to return (default: 10, max: 100) |
starting_after | string | Cursor for pagination |
product | string | Filter by product ID |
Response
{
"data": [
{
"id": "price_1234567890",
"object": "price",
"active": true,
"currency": "usd",
"unit_amount": 999,
"product": "prod_1234567890",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1
},
"created": 1234567890
}
],
"has_more": false
}POST /api/admin/stripe/prices
Create a new price for a product.
Request Body
{
"product": "prod_1234567890",
"unit_amount": 999,
"currency": "usd",
"active": true,
"metadata": {
"plan": "monthly"
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
product | string | Yes | The product ID to attach the price to |
unit_amount | number | Yes | The amount in cents (e.g., 999 = $9.99) |
currency | string | Yes | Three-letter ISO currency code (e.g., "usd") |
active | boolean | No | Whether the price is active (default: true) |
metadata | object | No | Key-value pairs for storing additional information |
Recurring Prices
For subscription pricing, include the recurring object:
{
"product": "prod_1234567890",
"unit_amount": 999,
"currency": "usd",
"recurring": {
"interval": "month",
"interval_count": 1
}
}Recurring Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
recurring.interval | string | Yes | Billing interval: day, week, month, or year |
recurring.interval_count | number | No | Number of intervals between billings (default: 1) |
Response
{
"id": "price_1234567890",
"object": "price",
"active": true,
"currency": "usd",
"unit_amount": 999,
"product": "prod_1234567890",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1
},
"metadata": {},
"created": 1234567890
}PATCH /api/admin/stripe/prices
Update an existing price. Note: Only active and metadata can be updated.
Request Body
{
"id": "price_1234567890",
"active": false,
"metadata": {
"deprecated": "true"
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The price ID to update |
active | boolean | No | Active status |
metadata | object | No | Updated metadata |
Response
{
"id": "price_1234567890",
"object": "price",
"active": false,
"currency": "usd",
"unit_amount": 999,
"product": "prod_1234567890",
"type": "recurring",
"recurring": {
"interval": "month",
"interval_count": 1
},
"metadata": {
"deprecated": "true"
},
"created": 1234567890
}Example Usage
Create a One-Time Price
curl -X POST /api/admin/stripe/prices \
-H "Content-Type: application/json" \
-d '{
"product": "prod_1234567890",
"unit_amount": 4999,
"currency": "usd"
}'Create a Subscription Price
curl -X POST /api/admin/stripe/prices \
-H "Content-Type: application/json" \
-d '{
"product": "prod_1234567890",
"unit_amount": 999,
"currency": "usd",
"recurring": {
"interval": "month",
"interval_count": 1
}
}'List Prices for a Product
curl "/api/admin/stripe/prices?product=prod_1234567890&limit=10"Deactivate a Price
curl -X PATCH /api/admin/stripe/prices \
-H "Content-Type: application/json" \
-d '{
"id": "price_1234567890",
"active": false
}'