Create Price
Cookie members require Hms-Company and Hms-Livemode; Idempotency-Key returns 400 invalid_request with idempotency_not_supported_for_member_routes. Bearer callers require Idempotency-Key.
/pricesCookie members require Hms-Company and Hms-Livemode; Idempotency-Key returns 400 invalid_request with idempotency_not_supported_for_member_routes. Bearer callers require Idempotency-Key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/prices" \ -H "Content-Type: application/json" \ -d '{ "plan": "string", "slot": "string", "terms": { "type": "one_time", "currency": "string" } }'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "livemode": true, "plan_id": "00713021-9aea-41da-9a88-87760c08fa72", "scope": "catalog", "slot": "string", "fingerprint": "string", "revision_of_price_id": "c501c243-78bd-44f5-95af-3c25aed17bcd", "pending_slot": "string", "component": "string", "label": "current", "status": "pending", "terms": { "type": "one_time", "unit_amount": 0, "unit_amount_decimal": 0, "custom_unit_amount": { "minimum": 0, "maximum": 0, "preset": 0 }, "currency": "string", "interval": "day", "interval_count": 1, "usage_type": "licensed", "billing_scheme": "per_unit", "tiers": [ { "up_to": 0, "unit_amount": 0, "unit_amount_decimal": 0, "flat_amount": 0, "flat_amount_decimal": 0 } ], "tiers_mode": "graduated", "transform_quantity": { "divide_by": 2, "round": "up" }, "meter": "string", "tax_behavior": "inclusive", "currency_options": { "property1": { "unit_amount": 0, "unit_amount_decimal": 0, "custom_unit_amount": { "minimum": 0, "maximum": 0, "preset": 0 }, "tax_behavior": "inclusive", "tiers": [ { "up_to": 0, "unit_amount": 0, "unit_amount_decimal": 0, "flat_amount": 0, "flat_amount_decimal": 0 } ] }, "property2": { "unit_amount": 0, "unit_amount_decimal": 0, "custom_unit_amount": { "minimum": 0, "maximum": 0, "preset": 0 }, "tax_behavior": "inclusive", "tiers": [ { "up_to": 0, "unit_amount": 0, "unit_amount_decimal": 0, "flat_amount": 0, "flat_amount_decimal": 0 } ] } }, "hermos": { "component": "string", "component_kind": "flat", "installments_total": 2, "pwyw_minimum_amount": 0, "usage_percent_of_reported": 0, "usage_free_threshold": 0, "billing_anchor_day": 1, "billing_anchor_month": 1, "first_period_mode": "part_month_now", "access_term": "string", "trial_usage_pricing": "free", "trial_usage_discount_percent": 0 }, "unsupported": { "property1": null, "property2": null } }, "hydrated": true, "quantity_enabled": true, "quantity_min": 0, "quantity_max": 0, "access_starts_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "request_id": "266ea41d-adf5-480b-af50-15b940c2b846"}Create Plan POST
Cookie members require Hms-Company and Hms-Livemode; Idempotency-Key returns 400 invalid_request with idempotency_not_supported_for_member_routes. Bearer callers require Idempotency-Key.
Preview moving the subscribers of one price to another POST
Creates a run in preview with one item per live line on from_price: eligible, or excluded with a reason (two or more lines on the price exclude every line multiple_lines_on_price; target_not_on_account per subscription). The frozen preview counts eligible subscriptions, quantity, old and new amounts and exclusions. Prices must share plan, currency, interval and terms apart from unit_amount (422 price_shape_unsupported naming each differing field). notice_days defaults to the product setting and must be 30–365 (422 notice_below_floor / notice_above_ceiling). One open run per old price (409 migration_in_progress). The preview expires 24 hours after creation; a lapsed preview is expired, its eligible items withdrawn run_expired, before this check. People and keys with catalog:publish; agents 403 agent_not_available.