{"object":"doc","slug":"migrate-from-stripe-catalog","title":"Move a catalog from Stripe","summary":"Recreate your Stripe products, prices, coupons and promotion codes in one ZeroPoint merchant with a Stripe restricted read-only key; the dry run, what is recreated, what is not and why, and why customers and saved cards do not move this way.","tags":["guide","catalog","stripe","migration","prices","discounts"],"body":"# Move a catalog from Stripe\n\nThe Stripe import reads your Stripe products, prices, coupons and promotion codes and makes the same objects in one ZeroPoint merchant. Each new object keeps its Stripe id in `stripe_id`, so you can run it again at any time: it creates nothing twice. It never changes anything in Stripe.\n\nIt does not move customers, saved cards or subscriptions (see the last section).\n\n## 1. Create a restricted key in Stripe\n\nUse a Stripe restricted key, never your secret key. In the Stripe Dashboard open Developers, API keys, and choose Create restricted key. Set Read on Products, Prices, Coupons and Promotion codes. Leave everything else at None. Copy the key: it starts with `rk_test_` in test mode and `rk_live_` in live mode.\n\n**A key you give an AI assistant is visible to that assistant and to its AI provider, and may be kept in the conversation.** Anything you paste into a chat, or that your agent sends as a tool argument, is part of the conversation. So with the MCP tool `import_stripe_catalog`, use a test-mode restricted read-only key (`rk_test_`) made for this import only, with Read on the four catalog items and nothing else, and delete it in Stripe as soon as the import is done. The MCP tool refuses `rk_live_` keys with `parameter_invalid`, without repeating the key. A live import is run by the ZeroPoint operator with the command line tool on the host (section 3), so a live key never enters a conversation.\n\nThe import refuses a secret key (`sk_test_`, `sk_live_`) and a publishable key (`pk_`) with `parameter_invalid`, before it sends anything. It cannot tell from the key whether you also gave it write access, so give it Read only. It sends only `GET` requests, only to `https://api.stripe.com`, and only to the four catalog lists (plus Stripe's account endpoint, to record your Stripe account id; if the key cannot read that, the import still runs and records the account as unknown).\n\nZeroPoint uses the key for that one call. ZeroPoint never stores it, never logs it, and never puts it in an error message, the audit record or the answer. That promise covers ZeroPoint only, not your AI assistant or its provider (see above). Delete the key in Stripe when you are done.\n\n## 2. Run the dry run\n\nThe dry run reads Stripe and writes nothing. It is the default. With the MCP tool:\n\n```\nimport_stripe_catalog\n{\"merchant_id\":\"mch_...\",\"stripe_key\":\"rk_test_...\"}\n```\n\n`merchant_id` can be left out when the platform has only one merchant in the key's mode; that merchant is used. With more than one, the tool answers `parameter_invalid` and asks for it.\n\nOn the host, an operator can run the same import from the command line; the key comes from an environment variable, never the command line. Read it without echo, so it stays off the screen and out of the shell history, and remove it when the run is done:\n\n```\nread -rs STRIPE_RESTRICTED_KEY && export STRIPE_RESTRICTED_KEY\npoyntmcp stripe-catalog-import mch_... --stripe-key-env STRIPE_RESTRICTED_KEY --confirm \"Your name\"\nunset STRIPE_RESTRICTED_KEY\n```\n\nThe answer has `counts` for each kind of object and one item for every Stripe object, with an `action`:\n\n| `action` | Meaning |\n|---|---|\n| `create` | Dry run: it would be created |\n| `created` | It was created; `id` is the new ZeroPoint id |\n| `exists` | An object of this merchant already has this `stripe_id`. Nothing is changed. `differences` lists any field that differs from Stripe |\n| `unsupported` | This version cannot hold it exactly. `reasons` says why. It is not created |\n| `failed` | Creating it was refused; `reasons` has the code and message |\n\n`notes` lists what was copied in a different way or not copied, such as a product's `images`, and any Stripe field this import does not know (named, never dropped without a word). Read every `unsupported` item and every note before you run it for real.\n\nThe dry run applies the same limits as the real run, including clashes inside the import itself (two active codes with the same text, two prices with the same `lookup_key`). A few checks can only happen when the object is made, such as your sandbox's object limit, so an item can still answer `failed` on the real run. Its `reasons` say why, and the rest of the run carries on.\n\n## 3. Run it for real\n\nSend `dry_run: false` (CLI: `--apply`). Applying needs the `catalog:write` scope; the dry run needs only `catalog:read`.\n\nTest mode is the default. A test Stripe key (`rk_test_`) imports into a test merchant with a test ZeroPoint key. A Stripe key whose mode differs from your ZeroPoint key answers `processor_mode_mismatch`, before Stripe is called.\n\nA live import goes through the operator command line only: ask ZeroPoint, and the operator runs it with `--live` (needed for a live merchant) and your `rk_live_` key set as in section 2. The MCP tool refuses `rk_live_` keys (section 1).\n\nA Stripe test key reads your Stripe test catalog, which is a different set of objects, with different ids, from your live catalog. A dry run with a test key shows how the test catalog would import, not the live one.\n\nRun it again whenever you like. Objects that exist are reported as `exists` and left as they are. A price never changes after it is made, so a price whose amount changed in Stripe is reported with the difference, not overwritten: make a new price in Stripe and run the import again, or make it here.\n\nIf a run stops part way (a restart, an error), run it again: it makes what is missing and fills a product's `default_price` when it is still empty here. It ends in the same state as a run that was never stopped.\n\n`differences` compares these fields: product `name`, `description`, `active`, `metadata`, `default_price`; price `unit_amount`, `currency`, `recurring.interval`, `recurring.interval_count`, `product`, `active`, `lookup_key`, `nickname`, `metadata`; coupon `percent_off`, `amount_off`, `currency`, `duration`, `duration_in_months`, `max_redemptions` (as uses left), `redeem_by`, `applies_to.products`, `name`, `metadata`; promotion code `code`, `active`, coupon, `expires_at`, `max_redemptions` (as uses left), `restrictions.minimum_amount`, `metadata`. Each value shown is cut at 200 characters.\n\n## What is recreated\n\n| Stripe | ZeroPoint |\n|---|---|\n| Product: `name`, `description`, `active`, `metadata`, `default_price` | The same fields. An archived product is made archived, and its prices are made under it |\n| Price: `unit_amount`, `currency` (usd), `recurring.interval` (month or year), `product`, `active`, `lookup_key`, `nickname`, `metadata` | The same fields. Amounts stay integer cents |\n| Coupon: `percent_off` or `amount_off` (usd), `duration`, `duration_in_months`, `max_redemptions`, `redeem_by`, `name`, `applies_to.products`, `metadata` | The same fields; `applies_to` names the new product ids |\n| Promotion code: `code`, `active`, coupon, `expires_at`, `max_redemptions`, `restrictions.minimum_amount` (usd), `metadata` | The same fields |\n\nEvery object is made by the same checks and the same service as `POST /v1/products`, `POST /v1/prices`, `POST /v1/coupons` and `POST /v1/promotion_codes`.\n\nUses already spent in Stripe do not move: `times_redeemed` starts at 0. So that a nearly used coupon or code is not reopened, its `max_redemptions` here is the uses left (Stripe's `max_redemptions` less `times_redeemed`), and the item's notes say so. One that is used up is not recreated.\n\n## What is not recreated, and why\n\nEach of these is listed as `unsupported` with its reason. Nothing is cut down to fit.\n\n| Stripe object | Why |\n|---|---|\n| A price or coupon in a currency other than `usd`, or with amounts in other currencies (`currency_options`, which the import asks Stripe for) | This version is USD only. Nothing is cut down to the USD amount |\n| A tiered, metered (usage-based), package (`transform_quantity`) or pay-what-you-want price | Prices here are one flat amount |\n| A price billed every day or week, or every 2 or more months or years | Recurring prices are monthly or yearly |\n| A price with a trial (`trial_period_days`) | Trials are not part of this version |\n| A price with `tax_behavior: inclusive` | ZeroPoint calculates no tax, so an amount that includes tax would mean something else here. An `exclusive` price is made, with a note that no tax is added. An `unspecified` price is made with a note: if your Stripe Tax default is inclusive, that amount includes tax in Stripe |\n| A price of 0, or with a fraction of a cent | The smallest price is 1 cent, in whole cents |\n| A promotion code for one Stripe customer (`customer` or `customer_account`) | Customers do not move with the catalog, and the code must not become open to everyone |\n| A promotion code with `restrictions.first_time_transaction` | There is no equal rule. The nearest, `once_per_customer`, limits each customer to one use, which is different. Make the code by hand if that is what you want |\n| A promotion code whose minimum is not in `usd` | USD only |\n| A coupon that is not valid in Stripe, or past `redeem_by`; a code past `expires_at`; anything used up | Recreating it would reopen it |\n| A repeating coupon for more than 60 months; a coupon or code with more than 1000000 uses left | The same limits as the API |\n| An active promotion code whose text another active code of this merchant, or of this import, already has | Active codes are unique, ignoring case |\n| A price whose `lookup_key` another price of this merchant, or of this import, already holds | The import never moves a lookup key; move it yourself with `transfer_lookup_key` |\n| A price of a product that you archived here while it is active in Stripe | Reactivate the product, then run the import again |\n| A name, description or metadata outside the API's limits, or text that looks like a card number | The same checks as the API |\n\nFields that have no place here (product `images`, `url`, `statement_descriptor`, `unit_label`, `tax_code`, `marketing_features`, `package_dimensions`, `shippable`) are listed in the product's notes.\n\n## Limits\n\nAt most 1000 objects of each kind. A larger catalog is refused whole with `stripe_catalog_too_large`, never imported in part: archive what you no longer sell in Stripe first. A platform can run the import 10 times an hour, dry runs included; past that it answers `rate_limited`. The import reads Stripe at most 10 requests a second.\n\nErrors from Stripe: `stripe_key_refused` (Stripe does not accept the key), `stripe_permission_missing` (the key cannot read one of the four lists; the message names it), `stripe_unavailable` (Stripe could not be reached, limited the key, redirected, sent a page over 4 MB or something unreadable, or the whole read took more than 120 seconds). Stripe's own error text is never shown, because it can repeat part of the key. Nothing is imported when any of these happen. One more, `stripe_response_unreadable`, names one Stripe object whose shape the import cannot read: the run stops there, a dry run changes nothing, an apply keeps what it made before that object, and running the import again finishes the job without making anything twice. A field of the wrong kind that the import knows (`currency`, `restrictions`, `applies_to.products`) is not this error: that object alone is listed as unsupported with a reason naming the field, and the rest is imported.\n\nEvery request to Stripe pins Stripe API version `2025-09-30.clover`, so the objects read have the same shape whatever your Stripe account's default version is.\n\nEvery run is recorded for audit with who ran it, the merchant, the mode, the counts and the Stripe account id, including a run refused before Stripe is read. Never the key.\n\n## Customers, saved cards and subscriptions do not move this way\n\nThe import does not read them, and the key does not need access to them. Saved cards cannot move through any API: Stripe sends full card numbers only through its card data export to a PCI DSS Level 1 processor, which you ask Stripe support for. Subscriptions move after their customers and cards. Talk to ZeroPoint before you move subscribers.\n\n## Worked example\n\nA Stripe test account sells Pro at $29 a month and Premium at $52 a month, each with an annual price, a $15 one-time 7-day pass, and a launch code `LAUNCH20` for 20% off the first charge. It also has a Pro price in euros and a `WELCOME` code limited to first-time buyers.\n\nThe dry run:\n\n```\nimport_stripe_catalog\n{\"merchant_id\":\"mch_...\",\"stripe_key\":\"rk_test_...\"}\n```\n\nanswers, in part:\n\n```json\n{\n  \"object\": \"stripe_catalog_import\",\n  \"dry_run\": true,\n  \"livemode\": false,\n  \"stripe_account\": \"acct_1...\",\n  \"counts\": {\n    \"product\": {\"create\": 3, \"created\": 0, \"exists\": 0, \"unsupported\": 0, \"failed\": 0},\n    \"price\": {\"create\": 5, \"created\": 0, \"exists\": 0, \"unsupported\": 1, \"failed\": 0},\n    \"coupon\": {\"create\": 1, \"created\": 0, \"exists\": 0, \"unsupported\": 0, \"failed\": 0},\n    \"promotion_code\": {\"create\": 1, \"created\": 0, \"exists\": 0, \"unsupported\": 1, \"failed\": 0}\n  },\n  \"items\": [\n    {\"object\": \"price\", \"stripe_id\": \"price_pro_eur\", \"action\": \"unsupported\", \"id\": null,\n     \"reasons\": [\"Currency 'eur': this version is USD only.\"], \"notes\": [], \"differences\": []},\n    {\"object\": \"promotion_code\", \"stripe_id\": \"promo_welcome\", \"action\": \"unsupported\", \"id\": null,\n     \"reasons\": [\"restrictions.first_time_transaction has no equal here (the nearest, once_per_customer, is a different rule); not recreated.\"],\n     \"notes\": [], \"differences\": []}\n  ]\n}\n```\n\nThen `dry_run: false` makes:\n\n| Stripe | Here | `unit_amount` | `recurring` | `lookup_key` |\n|---|---|---|---|---|\n| Pro monthly | price on the Pro product | 2900 | `{\"interval\":\"month\"}` | `pro_monthly` |\n| Pro annual | price on the Pro product | 25056 | `{\"interval\":\"year\"}` | `pro_annual` |\n| Premium monthly | price on the Premium product | 5200 | `{\"interval\":\"month\"}` | `premium_monthly` |\n| Premium annual | price on the Premium product | 44928 | `{\"interval\":\"year\"}` | `premium_annual` |\n| 7-day pass | price on the pass product | 1500 | none | `pro_pass_7d` |\n\nplus the coupon (`percent_off` 20, `duration` once) and the `LAUNCH20` code. Your code that finds prices by `lookup_key` keeps working. Your code that stored Stripe ids finds the new objects with `GET /v1/prices` or `GET /v1/products` and the `stripe_id` filter. The euro price and the `WELCOME` code stay in Stripe until you decide what to do with them.\n\nNext: `catalog` for how prices and codes work here, and `customers` for the `stripe_id` link on customers.","updated":1795275945}