Docs

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

ParameterTypeDescription
limitnumberMaximum number of prices to return (default: 10, max: 100)
starting_afterstringCursor for pagination
productstringFilter 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

ParameterTypeRequiredDescription
productstringYesThe product ID to attach the price to
unit_amountnumberYesThe amount in cents (e.g., 999 = $9.99)
currencystringYesThree-letter ISO currency code (e.g., "usd")
activebooleanNoWhether the price is active (default: true)
metadataobjectNoKey-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

ParameterTypeRequiredDescription
recurring.intervalstringYesBilling interval: day, week, month, or year
recurring.interval_countnumberNoNumber 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

ParameterTypeRequiredDescription
idstringYesThe price ID to update
activebooleanNoActive status
metadataobjectNoUpdated 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
  }'

On this page