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 ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-stripe |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | Org-scoped Stripe connection (customer's own account) |
external_id | string | Yes | — | Your own stable id for this product; idempotency key |
name | string | No | — | Product name (defaults to external_id) |
description | string | No | — | Product description shown at checkout |
unit_amount | integer | No | — | Price in the smallest currency unit; omit to skip pricing |
currency | string | No | — | Three-letter ISO currency, required with unit_amount |
recurring_interval | string | No | — | day |
recurring_interval_count | integer | No | — | Intervals between charges (default: 1) |
nickname | string | No | — | Internal label for the price |
metadata | json | No | — | Extra product metadata (external_id is always added) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
product_id | string | No | — | — |
price_id | string | No | — | — |
created_product | boolean | No | — | — |
created_price | boolean | No | — | — |
external_id | string | No | — | — |
find_products | json | No | — | — |
create_product | json | No | — | — |
find_prices | json | No | — | — |
create_price | json | No | — | — |
name | string | No | — | — |
description | string | No | — | — |
unit_amount | integer | No | — | — |
currency | string | No | — | — |
recurring_interval | string | No | — | — |
recurring_interval_count | integer | No | — | — |
nickname | string | No | — | — |
metadata | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | lookup | stripe.products.list_products | — |
| 2 | product | stripe.products.create_product | — |
| 3 | price-lookup | stripe.prices.list_prices | — |
| 4 | price | stripe.prices.create_price | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
stripe.products.list_products | find_products |
stripe.products.create_product | create_product |
stripe.prices.list_prices | find_prices |
stripe.prices.create_price | create_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"
}
}