Update Stripe price

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Updates the price identified by price_id. Changes only the fields you send. Anything you leave out keeps its current value. Sending null has the same effect. The amount, currency, and recurring schedule cannot be changed here.

The response does not include the nickname even when it was updated.

Uses the Stripe account selected by the app's stored credentials. Live keys select the live catalog and test keys select the test catalog. Products and prices belong to that Stripe account, so multiple apps configured with the same account share the same catalog.

Requires write access to the app. Workspace viewers cannot call this operation.

put/api/apps/{app_id}/payments/stripe/prices/{price_id}

Path parameters

price_idstring required

Stripe price ID in the configured account.

Stripe price ID in the configured account.

app_idstring required

ID of the Base44 app.

ID of the Base44 app.

Request body

activeboolean nullable

Whether the price is active. Leave it out to keep the current value. Sending null has the same effect. Defaults to null.

metadataobject nullable

Metadata to store, as string key-value pairs. Stripe's metadata rules limit it to 50 keys, 40 characters per key, and 500 characters per value. Defaults to null. Leave it out to keep the current value. Sending null has the same effect.

nicknamestring nullable

New internal price label. Leave it out to keep the current value. Sending null has the same effect. Defaults to null.

Example request

{
  "metadata": {
    "tier": "standard"
  },
  "nickname": "Monthly membership"
}

Response

The operation result.

idstring required

Stripe price ID.

productstring required

Stripe product ID this price belongs to.

unit_amountinteger nullable required

Amount in the currency's smallest unit, or null for pricing without a fixed integer unit amount.

currencystring required

Currency as a lowercase three-letter ISO 4217 code.

activeboolean required

Whether the price is active.

metadataobject required

Metadata stored on the price.

Example response

{
  "id": "price_1T7mK2Q4r6S8v9Ab",
  "product": "prod_T7mK2p9Q4r6S8v",
  "unit_amount": 2500,
  "currency": "usd",
  "active": true,
  "metadata": {
    "tier": "standard"
  },
  "recurring": {
    "interval": "month",
    "interval_count": 1,
    "usage_type": "licensed"
  }
}

Changes

Changed in 1 of the 18 revisions of this API.1

Of the 18 revisions, 1 has no diff computed.