Skip to content
Proud to collaborate with Microsoft for Startups

stripe.catalog.ensure_product ​

Idempotently ensure a Stripe product and price exist for an external id

Idempotently ensure a product (and optionally one price) exists.

Keyed on a caller-owned external_id stored in product metadata, so the same call can be replayed by a setup script or an agent without filling the customer's Stripe catalog with duplicates.

Mirrors abacatepay.catalog.ensure-product so both payment libraries have the same catalog primitive.

Overview ​

PropertyValue
Workflow typeDag
LibraryApp-stripe
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloud_connection_uuiduuidYes—Org-scoped Stripe connection (customer's own account)
external_idstringYes—Your own stable id for this product; idempotency key
namestringNo—Product name (defaults to external_id)
descriptionstringNo—Product description shown at checkout
unit_amountintegerNo—Price in the smallest currency unit; omit to skip pricing
currencystringNo—Three-letter ISO currency, required with unit_amount
recurring_intervalstringNo—day
recurring_interval_countintegerNo—Intervals between charges (default: 1)
nicknamestringNo—Internal label for the price
metadatajsonNo—Extra product metadata (external_id is always added)

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
cloud_connection_uuiduuidYes——
product_idstringNo——
price_idstringNo——
created_productbooleanNo——
created_pricebooleanNo——
external_idstringNo——
find_productsjsonNo——
create_productjsonNo——
find_pricesjsonNo——
create_pricejsonNo——
namestringNo——
descriptionstringNo——
unit_amountintegerNo——
currencystringNo——
recurring_intervalstringNo——
recurring_interval_countintegerNo——
nicknamestringNo——
metadatajsonNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerintegerNo——
errorstringNo——
error_typestringNo——

DAG Layers ​

#LayerStepsCompensation
1lookupstripe.products.list_products—
2productstripe.products.create_product—
3price-lookupstripe.prices.list_prices—
4pricestripe.prices.create_price—

Execution Flow ​

Sub-workflows ​

Sub-workflowStep name
stripe.products.list_productsfind_products
stripe.products.create_productcreate_product
stripe.prices.list_pricesfind_prices
stripe.prices.create_pricecreate_price

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "stripe.catalog.ensure_product",
  "initial_data": {
    "organization_uuid": "value",
    "cloud_connection_uuid": "value",
    "external_id": "value"
  }
}