{"info":{"title":"Hyperline API","version":"0.0.0"},"servers":[{"url":"https://api.hyperline.co"},{"url":"https://sandbox.api.hyperline.co"}],"openapi":"3.1.0","components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CustomProperty":{"type":"object","properties":{"id":{"type":"string","description":"Custom property ID.","example":"cfi_efnjehRH304"},"name":{"type":"string","description":"Custom property name.","example":"Test custom property"},"slug":{"type":"string","description":"Custom property unique slug.","example":"test_custom_property"},"type":{"type":"string","enum":["date","boolean","number","text","select","multi_select"],"description":"Custom property type."},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription"]},"description":"Entities on which the custom property is available."},"authorized_values":{"type":["array","null"],"items":{"type":"string"},"description":"If the custom property is of type `select` this is the list of available values."},"api_only":{"type":"boolean","default":false,"description":"If true the custom property will not be displayed in the interface."},"created_at":{"type":"string","format":"date-time","description":"Creation date of the custom property.","example":"2024-01-01T22:00:00Z"},"updated_at":{"type":"string","format":"date-time","description":"Update date of the custom property.","example":"2024-01-01T22:00:00Z"}},"required":["id","name","slug","type","entities","authorized_values","created_at","updated_at"]},"PaginatedCustomProperty":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomProperty"},"description":"List of CustomProperty."}},"required":["meta","data"]},"Coupon":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["id","name","description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["id","name","description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},"PaginatedCoupon":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Coupon"},"description":"List of Coupon."}},"required":["meta","data"]},"CreateCoupon":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":null}},"required":["name"]},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["type","discount_percent"],"title":"Coupon percent"}]}]},"UpdateCoupon":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Coupon name.","example":"Partner discount"},"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":["array","null"],"items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":null}},"required":["name"]},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["type","discount_percent"],"title":"Coupon percent"}]}]},"PaginatedPromotionCode":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]},"description":"List of PromotionCode."}},"required":["meta","data"]},"ProductAccounting":{"type":"object","additionalProperties":{"type":"object","properties":{"tax_rate_id":{"type":["string","null"],"description":"Custom tax rate ID.","example":"taxr_YfiSnLIYORD9VN"},"product_code":{"type":["string","null"],"description":"Code used to reconcile the product with the external accounting tool. Usually, it corresponds to the product ID in the accounting software.","example":"PROD-23"},"account_code":{"type":["string","null"],"description":"Code used to assign related invoices line items to a General Ledger account in your external accounting tool.","example":"GL-001"}},"required":["tax_rate_id","product_code","account_code"]},"description":"Mapping invoicing entity ID/accounting settings."},"AggregatorThreshold":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"threshold_value":{"type":"number"},"comparison_operator":{"type":"string","enum":["gte","lte"]}},"required":["id","name","threshold_value","comparison_operator"]},"Aggregator":{"type":["object","null"],"properties":{"id":{"type":"string"},"entity":{"type":"string"},"operation":{"type":"string","enum":["count","sum"]},"property":{"type":["string","null"]},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"]},"type":{"type":"string","enum":["metered","licensed"]},"name":{"type":["string","null"]},"description":{"type":["string","null"]},"allow_negative_values":{"type":"boolean"},"aggregate_on_customers_enabled":{"type":"boolean"},"default_interval_count":{"type":["integer","null"]},"default_interval_period":{"type":["string","null"],"enum":["days","weeks","months","years"]},"custom_event_name":{"type":["string","null"]},"exposed_event_keys":{"type":"array","items":{"type":"string"}},"unit_name":{"type":["string","null"]},"thresholds":{"type":"array","items":{"$ref":"#/components/schemas/AggregatorThreshold"}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","entity","operation","property","where","type","name","description","allow_negative_values","aggregate_on_customers_enabled","default_interval_count","default_interval_period","custom_event_name","exposed_event_keys","unit_name","thresholds","created_at","updated_at"]},"CreditAggregatorResponse":{"type":"object","properties":{"aggregator_id":{"type":"string"},"aggregator":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":"object"}]},"weight":{"type":"number"}},"required":["aggregator_id","aggregator","weight"]},"ProductSimple":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["flat_fee"],"description":"Product type."},"is_available_on_demand":{"type":"boolean","description":"Enable the product to be billed at any time as a one-time payment.","example":true,"deprecated":true},"is_available_on_subscription":{"type":"boolean","description":"Enable the product to be added as part of a subscription.","example":true,"deprecated":true}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","is_available_on_demand","is_available_on_subscription"],"title":"Fee product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["seat"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator"],"title":"Seat product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["dynamic"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator"],"title":"Dynamic product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["credit"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"},"credit_aggregators":{"type":"array","items":{"$ref":"#/components/schemas/CreditAggregatorResponse"},"description":"Multiple aggregators with weights for multi-aggregator credit consumption."},"low_credits_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of credits.","example":null}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator","low_credits_threshold"],"title":"Credit product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["bundle"],"description":"Product type."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"exclusive_items_enabled":{"type":["boolean","null"],"description":"When true, only one item in the bundle can be active at a time"}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","display_mode","exclusive_items_enabled"],"title":"Bundle product"}]},"PaginatedProduct":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductSimple"},"description":"List of Product."}},"required":["meta","data"]},"PriceFee":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"]},"ProductFee":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["flat_fee"],"description":"Product type."},"is_available_on_demand":{"type":"boolean","description":"Enable the product to be billed at any time as a one-time payment.","example":true,"deprecated":true},"is_available_on_subscription":{"type":"boolean","description":"Enable the product to be added as part of a subscription.","example":true,"deprecated":true},"price_configurations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","prices"]}}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","is_available_on_demand","is_available_on_subscription","price_configurations"],"title":"Fee product"},"MeteringFilterConfiguration":{"type":"object","properties":{"conditional":{"type":"string","enum":["and","or"],"description":"Logical operator used to combine multiple filter fields. `and` requires all fields to match, `or` requires at least one."},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string","description":"Name of the event property to filter on."}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["is_null","is_not_null"],"description":"Comparison operator to apply on the property value."}},"required":["operator"],"title":"Null check"},{"type":"object","properties":{"operator":{"type":"string","enum":["in","not_in"],"description":"Comparison operator to apply on the property value."},"value":{"type":"string"}},"required":["operator","value"],"title":"List match"},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"],"description":"Comparison operator to apply on the property value."},"value":{"type":"number"}},"required":["operator","value"],"title":"Numeric comparison"},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","not_equal"],"description":"Comparison operator to apply on the property value."},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"],"title":"Equality check"}]}]}}},"required":["conditional","fields"],"description":"Configuration of the rules used to filter eligible events.","example":{"conditional":"and","fields":[{"property":"card_type","operator":"equals","value":"visa"},{"property":"kind","operator":"equals","value":"credit_card"}]}},"MeteringFilter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter to scope eligible billable events."},"PriceVolume":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "}},"required":["type","amount","unit_count","from","to"]},"PricePackaged":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "}},"required":["type","amount","unit_count","from","to"]},"PriceBulk":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "}},"required":["type","amount","unit_count","to"]},"PriceBundle":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"id":{"type":"string","description":"Price ID."},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"]},"ProductSeat":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["seat"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["volume"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["packaged"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bulk"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","allow_on_portal","prices"]}]}}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator","price_configurations"],"title":"Seat product"},"PriceBps":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"id":{"type":"string","description":"Price ID."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"ProductDynamic":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["dynamic"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["volume"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["packaged"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bulk"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bps"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]}]}}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator","price_configurations"],"title":"Dynamic product"},"ProductCredit":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["credit"],"description":"Product type."},"aggregator":{"$ref":"#/components/schemas/Aggregator"},"credit_aggregators":{"type":"array","items":{"$ref":"#/components/schemas/CreditAggregatorResponse"},"description":"Multiple aggregators with weights for multi-aggregator credit consumption."},"low_credits_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of credits.","example":null},"price_configurations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","allow_on_portal","prices"]}}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","aggregator","low_credits_threshold","price_configurations"],"title":"Credit product"},"BundleProductItem":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"percentage":{"type":"number"},"product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}},"required":["id","name","type"]}},"required":["id","product_id","percentage"]},"ProductBundle":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name.","example":"Product name"},"status":{"type":"string","enum":["active","archived"],"description":"\nProduct status.\n\n- `active`: The product is active and can be used in new quotes/subscriptions/invoices.\n- `archived`: The product is archived and can't be used anymore.\n","example":"active"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["bundle"],"description":"Product type."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"exclusive_items_enabled":{"type":["boolean","null"],"description":"When true, only one item in the bundle can be active at a time"},"bundle_items":{"type":"array","items":{"$ref":"#/components/schemas/BundleProductItem"},"description":"Products included in this bundle with their percentages"},"price_configurations":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["volume"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["packaged"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bulk"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"]},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","allow_on_portal","prices"]}]}}},"required":["id","name","status","description","description_display_interval_dates","public_description","translations","properties","custom_properties","accounting","type","display_mode","exclusive_items_enabled","bundle_items","price_configurations"],"title":"Bundle product"},"Product":{"oneOf":[{"$ref":"#/components/schemas/ProductFee"},{"$ref":"#/components/schemas/ProductSeat"},{"$ref":"#/components/schemas/ProductDynamic"},{"$ref":"#/components/schemas/ProductCredit"},{"$ref":"#/components/schemas/ProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/ProductFee","seat":"#/components/schemas/ProductSeat","dynamic":"#/components/schemas/ProductDynamic","credit":"#/components/schemas/ProductCredit","bundle":"#/components/schemas/ProductBundle"}}},"CreateProductFlatFee":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["flat_fee"],"description":"Product type for fixed fee products."},"price_configurations":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreateCountAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."}},"required":["entity","operation"],"description":"Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products."},"CreateProductSeat":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["seat"],"description":"Product type for seat-based products."},"aggregator":{"$ref":"#/components/schemas/CreateCountAggregator"},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product."},"unit_name":{"type":"string","description":"Name of the unit (e.g., 'user', 'seat').","example":"user"},"is_connected_seat_item":{"type":"boolean","default":false,"description":"When true, the seat count is automatically synced from an external source (e.g., CRM users)."},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]}]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreateAggregator":{"oneOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"operation":{"type":"string","enum":["sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum.","example":"amount"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."}},"required":["entity","operation","property"]}],"description":"Aggregator configuration to compute usage from billable events. Either aggregator or aggregator_id is required."},"CreateProductDynamic":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["dynamic"],"description":"Product type for usage-based dynamic products."},"aggregator":{"$ref":"#/components/schemas/CreateAggregator"},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product. Either aggregator or aggregator_id is required."},"unit_name":{"type":"string","description":"Name of the unit (e.g., 'API call', 'GB').","example":"API call"},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bps"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."}},"required":["currency","billing_interval","type","prices"]}]},"description":"Price configurations for the product."}},"required":["name","type","price_configurations"]},"CreditAggregatorEntry":{"type":"object","properties":{"aggregator_id":{"type":"string","description":"ID of an existing aggregator."},"weight":{"type":"number","default":1,"description":"Weight (credits consumed per 1 unit of usage from this aggregator).","example":1}},"required":["aggregator_id"]},"CreateProductCredit":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["credit"],"description":"Product type for credit-based products."},"aggregator":{"allOf":[{"$ref":"#/components/schemas/CreateAggregator"},{"description":"Aggregator configuration to compute credit consumption from billable events. Either aggregator, aggregator_id, or credit_aggregators is required."}]},"aggregator_id":{"type":"string","description":"ID of an existing aggregator to link to this product. Either aggregator, aggregator_id, or credit_aggregators is required."},"credit_aggregators":{"type":"array","items":{"$ref":"#/components/schemas/CreditAggregatorEntry"},"description":"Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id."},"unit_name":{"type":"string","description":"Name of the credit unit.","example":"credit"},"low_credits_threshold":{"type":"number","description":"Threshold indicating a low level of credits.","example":10},"price_configurations":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},"description":"Bundle price configurations for credit packages."}},"required":["name","type","price_configurations"]},"CreateBundleProductItem":{"type":"object","properties":{"product_id":{"type":"string","description":"ID of the product to include in the bundle."},"percentage":{"type":"number","exclusiveMinimum":0,"description":"Revenue share percentage for this item. All percentages must sum to 100.","example":50}},"required":["product_id","percentage"]},"CreateProductBundle":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean","default":true},"is_available_on_subscription":{"type":"boolean","default":true},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"},"type":{"type":"string","enum":["bundle"],"description":"Product type for bundle products."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices."},"exclusive_items_enabled":{"type":"boolean","default":false,"description":"When true, only one item in the bundle can be active at a time."},"bundle_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateBundleProductItem"},"minItems":1,"description":"Products included in this bundle. Percentages must sum to 100."},"price_configurations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["currency","billing_interval","type","prices"]}]},"default":[],"description":"Price configurations for the product."}},"required":["name","type","display_mode","bundle_items"]},"CreateProduct":{"oneOf":[{"$ref":"#/components/schemas/CreateProductFlatFee"},{"$ref":"#/components/schemas/CreateProductSeat"},{"$ref":"#/components/schemas/CreateProductDynamic"},{"$ref":"#/components/schemas/CreateProductCredit"},{"$ref":"#/components/schemas/CreateProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/CreateProductFlatFee","seat":"#/components/schemas/CreateProductSeat","dynamic":"#/components/schemas/CreateProductDynamic","credit":"#/components/schemas/CreateProductCredit","bundle":"#/components/schemas/CreateProductBundle"}}},"PriceConfiguration":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","prices"],"title":"Fee"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["volume"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceVolume"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"],"title":"Volume"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["packaged"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PricePackaged"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"],"title":"Packaged"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bulk"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBulk"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"],"title":"Bulk"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bps"]},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBps"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","metering_filter","prices"],"title":"BPS"},{"type":"object","properties":{"id":{"type":"string","description":"Price configuration ID."},"product_id":{"type":"string","description":"ID of the product this price configuration belongs to."},"price_book_id":{"type":["string","null"],"description":"ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book."},"status":{"type":"string","enum":["active","archived"],"description":"Price configuration status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"updated_at":{"type":"string","format":"date","description":"Last edition date of the price configuration."},"archived_at":{"type":["string","null"],"format":"date","description":"Date of the price configuration archival."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceBundle"},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}},"required":["id","product_id","price_book_id","status","currency","country","plan_id","billing_interval","commitment_interval","updated_at","archived_at","type","allow_on_portal","prices"],"title":"Bundle"}]},"PaginatedPriceConfiguration":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceConfiguration"},"description":"List of PriceConfiguration."}},"required":["meta","data"]},"CreatePriceConfiguration":{"oneOf":[{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["volume"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bulk"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["packaged"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bps"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Filter to scope which billable events are eligible for this price configuration."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]},{"type":"object","properties":{"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"plan_id":{"type":["string","null"],"description":"ID of the plan on which this price configuration is eligible","deprecated":true},"billing_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]}],"description":"Billing interval on which the price configuration is eligible."},"commitment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["all"]}},"required":["period"]},{"type":"object","properties":{"period":{"type":"string","enum":["weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"]},{"type":"null"}],"description":"Commitment interval on which the price configuration is eligible."},"type":{"type":"string","enum":["bundle"]},"allow_on_portal":{"type":"boolean","default":true},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]},"description":"Price tiers of the price configuration. If fixed amount, only one price is available."},"product_id":{"type":"string","description":"ID of the product to add the price configuration to."}},"required":["currency","billing_interval","type","prices","product_id"]}]},"BankAccount":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}},"required":["id","currency","bank_name"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}]},"PaginatedBankAccount":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"},"description":"List of BankAccount."}},"required":["meta","data"]},"Address":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"enum":["AA","AE","AK","AL","AP","AR","AS","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MP","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY"],"description":"Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}},"description":"Customer billing address."},"InvoiceLineItem":{"type":"object","properties":{"id":{"type":"string","description":"Invoice line item ID.","example":"ili_0FACNpeoEFkGu3"},"name":{"type":"string","description":"Name of the line item, corresponding to the related product.","example":"Platform access"},"entry_type":{"type":"string","enum":["debit","credit"],"description":"Indicates whether the line item is a debit or credit.","example":"debit"},"product_id":{"type":["string","null"],"description":"Product ID related to the invoice line item.","example":"itm_KbLcWt2qm5p1S2"},"product_type":{"type":["string","null"],"enum":["flat_fee","seat","dynamic","credit","bundle"],"description":"Product type related to the invoice line item.","example":"flat_fee"},"units_count":{"type":"number","description":"Count of units of the product related to the invoice line item.","example":1},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Expressed in currency's smallest unit.","example":24000},"amount":{"type":"number","description":"Total amount of the invoice line item. Debit or credit can be distinguished using the `entry_type` field. Expressed in currency's smallest unit.","example":24000},"amount_excluding_tax":{"type":"number","description":"Total amount without the taxes amount of the invoice line item. Expressed in currency's smallest unit.","example":20000},"tax_rate":{"type":"number","description":"Tax rate of the invoice line item.","example":20},"tax_rate_id":{"type":["string","null"],"description":"Custom tax rate ID applied to the invoice line item.","example":null},"tax_amount":{"type":"number","description":"Tax amount of the invoice line item. Expressed in currency's smallest unit.","example":4000},"discount_amount":{"type":"number","description":"Amount corresponding to the discounted part of the total amount of the invoice line item. Expressed in currency's smallest unit.","example":0},"discount_percent":{"type":["number","null"],"description":"Percentage applied to compute the discounted part of the invoice line amount. Only if coupons applied are percentage based."},"period_starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the period corresponding to the line item charge.","example":"2024-10-13T00:00:00.000Z"},"period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the period corresponding to the line item charge.","example":"2024-11-13T00:00:00.000Z"},"revenue_type":{"type":["string","null"],"enum":["recurring","variable","one_off"],"description":"Revenue type classification of the line item.\n\n- `recurring`: Recurring revenue (MRR) from subscription products billed at regular intervals.\n- `variable`: Variable revenue from usage-based products.\n- `one_off`: One-time revenue from single charges or products billed once.","example":"recurring"},"revenue_interval_count":{"type":["number","null"],"description":"For recurring revenue, the number of interval periods between billings (e.g., 1 for monthly, 12 for annual).","example":1},"revenue_interval_period":{"type":["string","null"],"enum":["days","weeks","months","quarters","years","once","all"],"description":"For recurring revenue, the interval period (days, weeks, months, quarters, years).","example":"months"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true},"original_line_item_id":{"type":["string","null"],"description":"ID of the original line item this line item is linked to (used for organisation-based billing).","example":null}},"required":["id","name","entry_type","product_id","product_type","units_count","unit_amount","amount","amount_excluding_tax","tax_rate","tax_rate_id","tax_amount","discount_amount","discount_percent","period_starts_at","period_ends_at","revenue_type","revenue_interval_count","revenue_interval_period","display_unit_amount","display_service_period","original_line_item_id"]},"InvoiceCoupon":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"discount_amount":{"type":["number","null"],"description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"discount_percent":{"type":["number","null"],"description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":null},"line_item_ids":{"type":["array","null"],"items":{"type":"string"},"description":"IDs of the line items to which the coupon applies. Null means all line items.","example":["ili_0FACNpeoEFkGu3"]}},"required":["id","name","discount_amount","discount_percent","line_item_ids"]},"PaymentMethod":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]}},"required":["id","status","type","last_4_digits","expiration_date","brand"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","type","account_number_ending"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","error_type","type","account_number_ending"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"}},"required":["id","status","type"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"}},"required":["id","status","error_type","type"],"title":"Stripe Link (errored)"},{"type":"null"}]},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"Invoice ID.","example":"inv_1eTaiytfA0i2Va"},"number":{"type":"string","description":"Invoice number. Generated by Hyperline using the sequential numbering and format defined in your settings.","example":"INV-35"},"type":{"type":"string","enum":["invoice","credit_note","document","child_invoice_ref","child_creditnote_ref"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":["string","null"],"description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF).","example":null},"status":{"type":"string","enum":["draft","open","to_pay","grace_period","partially_paid","paid","voided","closed","error","missing_info","archived","charged_on_parent","pending_parent_concat","uncollectible"],"description":"Current invoice status.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data).\n- `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment.\n- `to_pay`: Invoice is awaiting payment.\n- `partially_paid`: Invoice is partially paid.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice has been voided and is no longer valid.\n- `closed`: Invoice was not issued and has been discarded.\n- `error`: Invoice failed to be paid.\n- `archived`: A previous version of an invoice.\n- `charged_on_parent`: Invoice is charged on the parent customer.\n- `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped.\n- `uncollectible`: Invoice is uncollectible (bad debt).\n","example":"paid"},"reference":{"type":["string","null"],"description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"source":{"type":"string","enum":["hyperline","api","pennylane","chargebee","stripe","lago","sequence","other"],"description":"Source of the invoice.\n    - `hyperline`: Invoice created by Hyperline.\n    - `api`: Invoice created through the API.\n    - `other`: Invoice created by an external source.\n","example":"hyperline"},"total_amount":{"type":"number","description":"Sum of the amount and taxes amount of all products on the invoice. Expressed in currency's smallest unit.","example":24000},"amount_due":{"type":"number","description":"Amount still need to be paid for the invoice. Expressed in currency's smallest unit.","example":0},"amount_paid":{"type":"number","description":"Amount already paid for the invoice. Expressed in currency's smallest unit.","example":24000},"amount_fixed":{"type":"number","description":"Amount corresponding to the recurring non-variable part of the total amount. Expressed in currency's smallest unit.","example":20000},"amount_excluding_tax":{"type":"number","description":"Total amount without the taxes amount. Expressed in currency's smallest unit.","example":20000},"tax_rate":{"type":"number","description":"Deprecated field, please use `line_items[].tax_rate`.","deprecated":true},"tax_amount":{"type":"number","description":"Tax amount of the invoice. Expressed in currency's smallest unit.","example":4000},"tax_scheme":{"type":"string","enum":["exempt","standard","reverse_charge","manual","not_eligible"],"description":"Tax scheme of the invoice.\n\n- `standard`: Tax rate is resolved depending on local tax regulations.\n- `exempt`: No tax rate applied because the customer country doesn't require it.\n- `reverse_charge`: No tax rate applied because the customer is eligible to EU reverse charge.\n- `manual`: Tax rate has been manually specified when creating the invoice.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"standard"},"discount_amount":{"type":"number","description":"Amount corresponding to the discounted part of the total amount. Expressed in currency's smallest unit.","example":0},"conversion_rate":{"type":["number","null"],"description":"Conversion rate used between the invoice currency and your accounting currency.","example":1},"converted_amount":{"type":["number","null"],"description":"Amount converted using the conversion rate. Expressed in currency's smallest unit.","example":24000},"converted_at":{"type":["string","null"],"format":"date-time","description":"Date of the conversion of the amount.","example":"2024-10-13T02:00:00.000Z"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"custom_note":{"type":["string","null"],"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":["string","null"],"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":["string","null"],"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"email":{"type":["string","null"],"description":"Email to which all communications will be sent.","example":"billing@acme.com"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline.","example":null},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_id`.","deprecated":true},"tax_id":{"type":["string","null"],"description":"Value of the customer tax ID.","example":"FR123456789"},"address":{"$ref":"#/components/schemas/Address"}},"required":["id","name","email","external_id","vat_number","tax_id","address"]},"seller":{"type":"object","properties":{"id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"name":{"type":"string","description":"Name of the invoicing entity","example":"Name of the invoicing entity"},"tax_id":{"type":["string","null"],"description":"Tax identifier / VAT number of the invoicing entity","example":"FR5878986578"},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"description":"Seller address."}]}},"required":["id","name","tax_id","address"]},"subscription_id":{"type":["string","null"],"description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"period_starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the billing period of the invoice.","example":"2024-10-13T00:00:00.000Z"},"period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the billing period of the invoice.","example":"2024-11-13T00:00:00.000Z"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2024-10-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2024-11-12T00:00:00.000Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the invoice, previously paid. A credit note exists with an original invoice ID equals to this invoice ID.","example":null},"grace_period_ended_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice grace period ended. This happens at the issue date + the grace period duration configured in your settings.","example":null},"settled_at":{"type":["string","null"],"format":"date-time","description":"Date the invoice was fully paid.","example":"2024-10-15T14:01:56.000Z"},"updated_at":{"type":["string","null"],"format":"date-time","description":"Date of the last update.","example":"2024-10-15T14:01:56.000Z"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"original_invoice_id":{"type":["string","null"],"description":"ID of the original invoice this entity is linked to (only used for credit note or organisation-based billing).","example":null},"original_invoice_number":{"type":["string","null"],"description":"Number of the original invoice this entity is linked to (only used for credit note).","example":null},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineItem"},"description":"List of line items composing the invoice."},"coupons":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCoupon"},"description":"List of coupons applied to the invoice."},"transactions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Transaction ID.","example":"tra_2QdJDDUej969ev"},"type":{"type":"string","enum":["subscription","one_time","refund"],"description":"\nTransaction type.\n\n- `subscription`: The transaction is related to a subscription payment.\n- `one_time`: The transaction is related to a one-time payment.\n- `refund`: The transaction is related to a refund payment.\n  ","example":"subscription"},"amount":{"type":"number","description":"Transaction amount.","example":31500},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Transaction currency.","example":"EUR"},"customer_id":{"type":"string","description":"ID of the customer linked to the transaction.","example":"cus_QalW2vTAdkR6IY"},"provider_id":{"type":["string","null"],"description":"Deprecated field, please use `integrations[].entity_id`.","deprecated":true},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"refunded_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the refund of the transaction.","example":null},"last_refreshed_at":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the last synchronization of the details with the payment provider.","example":null},"provider_fee":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"exchange_rate":{"type":["number","null"]}},"required":["amount","currency","exchange_rate"],"description":"Fee applied by the Payment Service Provider. Only supported for Stripe.","example":null},"chargeback":{"type":["object","null"],"properties":{"amount":{"type":"number","description":"Total chargeback loss amount.","example":31500},"last_chargeback_at":{"type":"string","format":"date-time","description":"Date corresponding to the last chargeback loss event.","example":"2024-10-13T10:00:01.860Z"}},"required":["amount","last_chargeback_at"],"description":"Chargeback details related to the transaction.","example":null},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["id","type","amount","currency","customer_id","provider_id","process_at","refunded_at","last_refreshed_at","provider_fee","chargeback","integrations"]},{"oneOf":[{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs"]},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method_type","payment_method"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["transfer","transfer_automated"]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}},"required":["id","currency","bank_name"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}]},{"type":"null"}]}]}},"required":["payment_method_type","bank_account"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["wallet"]},"wallet_id":{"type":"string","example":"wal_PPpxP5d3uvgiTT"}},"required":["payment_method_type","wallet_id"]},{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["external"]}},"required":["payment_method_type"]}]},{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","to_process","pending","settled","cancelled"],"description":"\nTransaction status.\n\n- `scheduled`: The transaction is scheduled to be processed in the future.\n- `to_process`: The transaction is waiting to be processed by our system.\n- `pending`: The transaction has been authorized by the related payment processor, but the banking transaction is not yet settled.\n- `settled`: The transaction has been cleared on the banking side, the money transfer is fully completed.\n- `cancelled`: The transaction has been cancelled and won't be processed again.\n  ","example":"settled"}},"required":["status"]},{"type":"object","properties":{"status":{"type":"string","enum":["failed"],"description":"\nTransaction status.\n\n- `failed`: The transaction failed.\n  ","example":"failed"},"error_type":{"type":["string","null"],"enum":["authentication_required","declined","fraud","insufficient_funds","payment_method_authorization_error","payment_method_declined","payment_method_expired","payment_method_invalid","payment_method_not_supported","processing_error","provider_error","unknown"],"description":"\nTransaction error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `payment_method_authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `payment_method_declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `payment_method_expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `payment_method_invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `payment_method_not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `declined`: The payment was declined for a variety of reasons such as security violation, banking service not available, transaction not allowed, etc.\n- `fraud`: The payment provider suspected the transaction was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `processing_error`: The payment couldn't be processed by the issuer for an unknown reason.\n- `provider_error`: An error occurred when contacting the payment provider to initiate the transaction.\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":null},"error_message":{"type":["string","null"],"description":"Details of the error.","example":null}},"required":["status","error_type","error_message"]}]}]},"description":"List of transactions related to the invoice."},"public_url":{"type":"string","format":"uri","description":"Public URL of the invoice page where the customer can pay the invoice."}},"required":["id","number","type","document_name","status","reference","purchase_order","currency","source","total_amount","amount_due","amount_paid","amount_fixed","amount_excluding_tax","tax_rate","tax_amount","tax_scheme","discount_amount","conversion_rate","converted_amount","converted_at","payment_method_id","bank_account_id","custom_note","additional_info","footer","customer","seller","subscription_id","period_starts_at","period_ends_at","emitted_at","due_at","refunded_at","grace_period_ended_at","settled_at","updated_at","properties","original_invoice_id","original_invoice_number","line_items","coupons","transactions","public_url"]},"PaginatedInvoice":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"},"description":"List of Invoice."}},"required":["meta","data"]},"InvoiceDetails":{"allOf":[{"$ref":"#/components/schemas/Invoice"},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["integrations"]}]},"CreateInvoiceLineItem":{"allOf":[{"type":"object","properties":{"description":{"type":"string","description":"Description of the line item as it will appear on the invoice. Default to the product description.","example":"Access fee for the period of November 2024"},"units_count":{"type":"number","default":1,"description":"Count of units of the product related to the invoice line item.","example":1},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Tax rate of the invoice line item.","example":20},"period_start":{"type":"string","format":"date-time","description":"Start date of the period corresponding to the line item charge.","example":"2024-10-13T00:00:00.000Z"},"period_end":{"type":"string","format":"date-time","description":"End date of the period corresponding to the line item charge.","example":"2024-11-13T00:00:00.000Z"},"display_unit_amount":{"type":"boolean","description":"Whether the unit amount is displayed on the invoice PDF. Defaults to true.","example":true},"display_service_period":{"type":"boolean","description":"Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.","example":true}}},{"anyOf":[{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID related to the invoice line item.","example":"itm_KbLcWt2qm5p1S2"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["name","unit_amount"]},{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID related to the invoice line item.","example":"itm_KbLcWt2qm5p1S2"},"name":{"type":"string","description":"Name of the line item as it will appear on the invoice. Default to the product name.","example":"Platform access"},"unit_amount":{"type":"number","description":"Amount of one unit of the product related to the invoice line item. Default to the product price amount. Expressed in currency's smallest unit.","example":24000}},"required":["product_id"]}]}]},"CreateInvoice":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code of the invoice. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"status":{"type":"string","enum":["to_pay","paid","draft"],"default":"paid","description":"Current invoice status.\n\n- `draft`: Invoice is in draft mode (not finalized yet).\n- `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data).\n- `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment.\n- `to_pay`: Invoice is awaiting payment.\n- `partially_paid`: Invoice is partially paid.\n- `paid`: Invoice is fully paid.\n- `voided`: Invoice has been voided and is no longer valid.\n- `closed`: Invoice was not issued and has been discarded.\n- `error`: Invoice failed to be paid.\n- `archived`: A previous version of an invoice.\n- `charged_on_parent`: Invoice is charged on the parent customer.\n- `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped.\n- `uncollectible`: Invoice is uncollectible (bad debt).\n","example":"paid"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the invoice.","example":"ive_47484fjdhy5"},"number":{"type":"string","description":"Invoice number. If specified, the invoice will be considered as imported from an external source and the number will not be generated by Hyperline. You are responsible for avoiding duplicates and ensuring it does not impact the numbering sequence in Hyperline.","example":"INV-35"},"type":{"type":"string","enum":["invoice","credit_note","document"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":"string","description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF)."},"reference":{"type":"string","description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":"string","description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"custom_note":{"type":"string","description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":"string","description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":"string","description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Deprecated field, please use `line_items[].tax_rate`.","deprecated":true},"tax_scheme":{"type":"string","enum":["auto","not_eligible"],"default":"auto","description":"Tax scheme of the invoice.\n\n- `auto`: Tax is automatically computed and applied.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"auto"},"payment_method_strategy":{"type":"string","enum":["current","external"],"description":"\nPayment method strategy used to charge the invoice. Only applies to `to_pay` status.\n\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payment of the invoice outside of Hyperline.\n","example":"external"},"payment_method_id":{"type":"string","description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":"string","description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"subscription_id":{"type":"string","description":"ID of the subscription related to the invoice.","example":"sub_amiaWZ3lzDIWaoT"},"emitted_at":{"type":"string","format":"date-time","description":"Issue date of the invoice.","example":"2024-10-13T00:00:00.000Z"},"due_at":{"type":"string","format":"date-time","description":"Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.","example":"2024-11-12T00:00:00.000Z"},"settled_at":{"type":"string","format":"date-time","description":"Date the invoice was fully paid.","example":"2024-10-15T14:01:56.000Z"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceLineItem"},"minItems":1},"transactions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_id":{"type":"string","description":"Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.","example":"pm_1xMpj5bwRqN7LM"}},"required":["amount","process_at","payment_method_id"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer"]},"bank_account_id":{"type":"string","description":"Bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"}},"required":["amount","process_at","payment_method_type"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_transaction_id":{"type":"string","description":"ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the `amount` and `process_at` fields may be overridden by the transaction data."}},"required":["provider_name","provider_transaction_id"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["external"]}},"required":["amount","process_at"]}]}},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","description":"Name of the coupon.","example":"Black Friday 2023"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","description":"Name of the coupon.","example":"Black Friday 2023"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["name","discount_amount","line_item_indexes"],"title":"Inline coupon"}]}}},"required":["customer_id","line_items"]},"CreateCreditNote":{"type":"object","properties":{"amount_including_tax":{"type":"number","description":"Amount of the credit note. If not specified, the amount will be computed from the original invoice.","example":24000},"status":{"type":"string","enum":["to_pay","draft"],"description":"Status of the credit note.\n\n- `to_pay`: Credit note is awaiting payment.\n- `draft`: Credit note is in draft mode (not finalized yet).\n","example":"to_pay"}}},"UpdateInvoice":{"type":"object","properties":{"type":{"type":"string","enum":["invoice","credit_note","document"],"description":"Type of the invoice.\n\n- `invoice`: Legal invoice to be paid by your customer.\n- `credit_note`: Legal credit note cancelling an invoice and refunding your customer.\n- `document`: Custom document with no legal value. Can be generated from a subscription to meet specific needs.\n  ","example":"invoice"},"document_name":{"type":["string","null"],"description":"If the invoice is of type `document` you can give it a custom name (displayed on the final PDF)."},"reference":{"type":["string","null"],"description":"Unique identifier to ease reconciliation with payment. Useful for bank transfer.","example":"V0KAHOU6J3"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order linked to the invoice.","example":"PO-12345"},"custom_note":{"type":["string","null"],"description":"Custom note added to the invoice.","example":"Thank you for your purchase!"},"additional_info":{"type":["string","null"],"description":"Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"This invoice must be paid within the payment delay indicated. After this period a late payment penalty of 10% will be applied."},"footer":{"type":["string","null"],"description":"Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.","example":"ACME (Acme SAS) is a company registered in France | SIREN N°123456"},"tax_scheme":{"type":"string","enum":["auto","not_eligible"],"default":"auto","description":"Tax scheme of the invoice.\n\n- `auto`: Tax is automatically computed and applied.\n- `not_eligible`: Tax collection is disabled for the invoice.\n  ","example":"auto"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/CreateInvoiceLineItem"},"minItems":1},"coupons":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_1eTaiytfA0i2Vb"},"name":{"type":"string","description":"Name of the coupon.","example":"Black Friday 2023"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["coupon_id"],"title":"Coupon amount"},{"type":"object","properties":{"name":{"type":"string","description":"Name of the coupon.","example":"Black Friday 2023"},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Amount corresponding to the discounted part of the total amount.","example":500},"line_item_indexes":{"type":["array","null"],"items":{"type":"number"},"description":"Index of the line items to which the coupon applies. Null means all line items.","example":[0,1]}},"required":["name","discount_amount","line_item_indexes"],"title":"Inline coupon"}]}},"payment_method_type":{"type":["string","null"],"enum":["external"]},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.","example":"pm_1ryTrMj4TTAT1N"},"bank_account_id":{"type":["string","null"],"description":"ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.","example":"bac_KJyPrMA1toAqRG"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"customer":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":["string","null"]},"tax_id":{"type":["string","null"]},"address":{"$ref":"#/components/schemas/Address"}},"description":"Override customer details on the invoice. Only allowed for draft or grace period invoices."}}},"AccountingRule":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the accounting rule.","example":"arl_abc123def456"},"code":{"type":"string","description":"Auto-generated rule code (e.g. R-001).","example":"R-001"},"name":{"type":["string","null"],"description":"Optional user-defined name for the rule.","example":"Recurring subscriptions"},"ledger_id":{"type":"string","description":"Identifier of the ledger this rule belongs to.","example":"led_abc123def456"},"category":{"type":["string","null"],"description":"Rule category (e.g. accounting_software, invoice_posted).","example":"accounting_software"},"priority":{"type":"number","description":"Override order. Higher priority wins when multiple rules match.","example":100},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to match. Empty means match all."},"product_types":{"type":"array","items":{"type":"string"},"description":"Product types to match (seat, flat_fee, dynamic, etc.)."},"customer_ids":{"type":"array","items":{"type":"string"},"description":"Customer IDs for customer-specific overrides."},"currencies":{"type":"array","items":{"type":"string"},"description":"Currency codes to match (e.g. EUR, USD)."},"countries":{"type":"array","items":{"type":"string"},"description":"Country codes for jurisdiction-based overrides."},"coupon_ids":{"type":"array","items":{"type":"string"},"description":"Coupon IDs to match. Empty means match all."},"client_provider_ids":{"type":"array","items":{"type":"string"},"description":"Client provider IDs to match. Empty means match all."},"payment_method_types":{"type":"array","items":{"type":"string"},"description":"Payment method types to match. Empty means match all."},"interval_period":{"type":["string","null"],"description":"Billing interval period filter (month, year, etc.)."},"interval_count":{"type":["number","null"],"description":"Billing interval count filter."},"revenue_ledger_account_id":{"type":["string","null"],"description":"Revenue ledger account ID."},"revenue_ledger_account":{"type":["object","null"],"properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"},"client_provider_id":{"type":["string","null"]},"provider":{"type":["object","null"],"properties":{"name":{"type":"string"}},"required":["name"]}},"required":["id","code","name","client_provider_id","provider"]},"deferred_revenue_ledger_account_id":{"type":["string","null"]},"deferred_discount_ledger_account_id":{"type":["string","null"]},"contra_revenue_ledger_account_id":{"type":["string","null"]},"discount_ledger_account_id":{"type":["string","null"]},"ar_ledger_account_id":{"type":["string","null"]},"cash_ledger_account_id":{"type":["string","null"]},"payments_clearing_ledger_account_id":{"type":["string","null"]},"output_tax_ledger_account_id":{"type":["string","null"]},"bad_debt_expense_ledger_account_id":{"type":["string","null"]},"customer_credits_ledger_account_id":{"type":["string","null"]},"journal_id":{"type":["string","null"]},"entity_type":{"type":["string","null"]},"created_at":{"type":"string","format":"date","description":"Timestamp when the rule was created."},"updated_at":{"type":"string","format":"date","description":"Timestamp when the rule was last updated."}},"required":["id","code","name","ledger_id","category","priority","product_ids","product_types","customer_ids","currencies","countries","coupon_ids","client_provider_ids","payment_method_types","interval_period","interval_count","revenue_ledger_account_id","deferred_revenue_ledger_account_id","deferred_discount_ledger_account_id","contra_revenue_ledger_account_id","discount_ledger_account_id","ar_ledger_account_id","cash_ledger_account_id","payments_clearing_ledger_account_id","output_tax_ledger_account_id","bad_debt_expense_ledger_account_id","customer_credits_ledger_account_id","journal_id","entity_type","created_at","updated_at"]},"PaginatedAccountingRule":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountingRule"},"description":"List of AccountingRule."}},"required":["meta","data"]},"ResolvedAccountingRule":{"type":"object","properties":{"revenue_ledger_account_id":{"type":["string","null"]},"deferred_revenue_ledger_account_id":{"type":["string","null"]},"contra_revenue_ledger_account_id":{"type":["string","null"]},"discount_ledger_account_id":{"type":["string","null"]},"ar_ledger_account_id":{"type":["string","null"]},"cash_ledger_account_id":{"type":["string","null"]},"trace":{"type":"array","items":{"type":"object","properties":{"rule_id":{"type":"string"},"applied_fields":{"type":"array","items":{"type":"string"}}},"required":["rule_id","applied_fields"]},"description":"Trace of which rules contributed which fields."}},"required":["revenue_ledger_account_id","deferred_revenue_ledger_account_id","contra_revenue_ledger_account_id","discount_ledger_account_id","ar_ledger_account_id","cash_ledger_account_id","trace"]},"PaginatedAggregator":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":"object"}]},"description":"List of Aggregator."}},"required":["meta","data"]},"CreateSumAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the threshold."},"threshold_value":{"type":"number","description":"The threshold value."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator."},"operation":{"type":"string","enum":["sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum.","example":"amount"}},"required":["entity","operation","property"]},"UpdateAggregator":{"type":"object","properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Threshold ID. Required when updating an existing threshold."},"name":{"type":"string","description":"Name of the threshold."},"threshold_value":{"type":"number","description":"The threshold value."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator. Replaces existing thresholds."},"operation":{"type":"string","enum":["count","sum"],"description":"The aggregation operation to perform."},"property":{"type":"string","description":"The property to sum. Required when operation is 'sum'."}}},"PaginatedCompany":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company ID.","example":"cli_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Company name.","example":"Acme"},"logo_url":{"type":["string","null"],"description":"Logo URL of the default invoicing entity."},"favicon_url":{"type":["string","null"],"description":"Favicon URL of the default invoicing entity."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["id","name","logo_url","favicon_url","address"]},"description":"List of Company."}},"required":["meta","data"]},"Credit":{"type":"object","properties":{"product_id":{"type":"string","description":"Credit product ID.","example":"itm_3kXODDF42QXtnL"},"customer_id":{"type":"string","description":"Customer ID related to the credit.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Credit name.","example":"Credit name"},"current_balance":{"type":"number","description":"Current credit balance.","example":2000},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"last_refreshed_at":{"type":"string","format":"date-time","description":"Credit last refresh date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-23T09:00:01.860Z"},"auto_topup":{"type":["object","null"],"properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":["number","null"],"description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":null},"price_id":{"type":["string","null"],"description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined.","example":null}},"required":["credit_count","amount_excluding_tax","price_id"],"description":"Auto top-up options."},"created_at":{"type":"string","format":"date-time","description":"Credit creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Credit last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-10-13T10:00:01.860Z"}},"required":["product_id","customer_id","name","current_balance","low_count_threshold","last_refreshed_at","auto_topup","created_at","updated_at"]},"PaginatedCredit":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Credit"},"description":"List of Credit."}},"required":["meta","data"]},"CreditTransaction":{"type":"object","properties":{"id":{"type":"string","description":"Credit transaction ID.","example":"cdt_BPZ19obsBS2qyo"},"product_id":{"type":["string","null"],"description":"ID of the product related to the transaction.","example":"itm_3kXODDF42QXtnL"},"price":{"type":["object","null"],"properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."},"pack_size":{"type":"number"}},"required":["id","amount","pack_size"],"description":"Price details related to the transaction.","example":{"id":"pri_0Jv8EbMDOGsHcn","amount":20000,"pack_size":120}},"customer_id":{"type":"string","description":"ID of the customer related to the transaction.","example":"cus_Typ0px2W0aiEtl"},"payment_method_id":{"type":["string","null"],"description":"ID of the payment method related to the transaction.","example":"pm_1xMpj5bwRqN7LM"},"invoice_id":{"type":["string","null"],"description":"ID of the invoice related to the transaction.","example":"inv_1eTaiytfA0i2Va"},"event_id":{"type":["string","null"],"description":"ID of the event related to the credit consumption.","example":null},"aggregator_id":{"type":["string","null"],"description":"ID of the aggregator that triggered this usage (for multi-aggregator credits).","example":null},"expires_at":{"type":["string","null"],"format":"date","description":"Expiration date for credits linked to this transaction","example":null},"type":{"type":"string","enum":["topup","usage","expiration"],"description":"Type of credit transaction.","example":"topup"},"source":{"type":"string","enum":["app","portal","api","system"],"description":"Type of credit transaction.","example":"api"},"amount_excluding_tax":{"type":["number","null"],"description":"Monetary amount. Expressed in currency's smallest unit."},"credit_count":{"type":"number","description":"Value of credits related to the transaction.","example":32},"balance_after":{"type":"number","description":"Credit balance after the transaction.","example":2000},"created_at":{"type":"string","format":"date-time","description":"Credit transaction creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-13T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Credit transaction last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-13T07:00:01.860Z"}},"required":["id","product_id","price","customer_id","payment_method_id","invoice_id","event_id","aggregator_id","expires_at","type","source","amount_excluding_tax","credit_count","balance_after","created_at","updated_at"]},"PaginatedCreditTransaction":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransaction"},"description":"List of CreditTransaction."}},"required":["meta","data"]},"CreateCredit":{"type":"object","properties":{"product_id":{"type":"string","description":"Credit product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Credit name.","example":"Credit name"},"current_balance":{"type":"number","description":"Current credit balance.","example":2000},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"auto_topup":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":2000},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."}},"required":["credit_count"],"description":"Auto top-up options."}},"required":["product_id"]},"UpdateCredit":{"type":"object","properties":{"name":{"type":"string","description":"Credit name.","example":"Credit name"},"low_count_threshold":{"type":["number","null"],"description":"Value indicating a low threshold.","example":10},"auto_topup":{"anyOf":[{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit.","example":2000},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."}},"description":"Auto top-up options."},{"type":"null"},{"type":"null"}],"description":"Auto top-up options."}}},"CreateCreditPurchase":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"amount_excluding_tax":{"type":"number","description":"Custom amount for the added credits. Either `amount_excluding_tax` or `price_id` must be defined. Expressed in currency's smallest unit."},"price_id":{"type":"string","description":"Price ID used to add credits. The price must be of type `bundle`. Either `amount_excluding_tax` or `price_id` must be defined."},"expires_at":{"type":"string","format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["credit_count"]},"UpdateCreditTopupExpiration":{"type":"object","properties":{"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["expires_at"]},"CreateCreditTopup":{"type":"object","properties":{"credit_count":{"type":"number","description":"Value indicating a number of credits to add. If `price_id` is defined, this value must correspond to a full credit pack for the price.","example":32},"expires_at":{"type":"string","format":"date-time","description":"Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["credit_count"]},"CreateCreditUsage":{"type":"object","properties":{"usage_retained":{"type":"number","exclusiveMinimum":0,"description":"Value indicating the number of credits consumed.","example":41},"event_id":{"type":"string","description":"Event ID corresponding to the credit consumption."}},"required":["usage_retained"]},"PaginatedPaymentMethod":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]}},"required":["id","status","type","last_4_digits","expiration_date","brand"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","type","account_number_ending"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"}},"required":["id","status","error_type","type","account_number_ending"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"}},"required":["id","status","type"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"}},"required":["id","status","error_type","type"],"title":"Stripe Link (errored)"}]}]},"description":"List of PaymentMethod."}},"required":["meta","data"]},"PaymentMethodDetails":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","last_4_digits","expiration_date","brand","integration"],"title":"Card"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["card","apple_pay","google_pay"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"card"},"last_4_digits":{"type":["number","null"],"description":"Last four digits of the card.","example":2718},"expiration_date":{"type":["string","null"],"description":"Expiration date of the card using YYYY-MM format.","example":"2027-11"},"brand":{"type":["string","null"],"description":"Brand of the card.","examples":["visa","mastercard","amex"]},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","last_4_digits","expiration_date","brand","integration"],"title":"Card (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","account_number_ending","integration"],"title":"Direct Debit"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["direct_debit","direct_debit_ach","direct_debit_bacs"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"direct_debit"},"account_number_ending":{"type":["string","null"],"description":"Last characters of the account number.","example":"6789"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","account_number_ending","integration"],"title":"Direct Debit (errored)"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["active","pending","expired","errored"],"description":"\nPayment method status.\n\n- `active`: The payment method is ready to be used.\n- `pending`: The payment method is pending activation or being validated.\n  ","example":"active"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","type","integration"],"title":"Stripe Link"},{"type":"object","properties":{"id":{"type":"string","description":"Payment method ID.","example":"pm_1xMpj5bwRqN7LM"},"status":{"type":"string","enum":["errored"],"description":"\nPayment method status.\n\n- `errored`: The payment method has failed and can no longer be used.\n  ","example":"errored"},"error_type":{"type":"string","enum":["authentication_required","authorization_error","insufficient_funds","declined","expired","fraud","invalid","not_supported","unknown"],"description":"\nPayment method error type.\n\n- `authentication_required`: The card was declined as the transaction requires authentication (e.g. 3-D Secure). The customer should go to their portal page and authenticate their card. If the error happened on an already authenticated transaction, the customer needs to contact their card issuer for more information.\n- `authorization_error`: A transaction authorization cannot be created for a variety of reasons such as the card issuer couldn't be reached, or the card requires a PIN.\n- `declined`: The payment method was declined for a variety of reasons such as a card reported as lost or stolen, insufficient funds or reaching the limit available on the method to complete the purchase, a payment method on a known block list, etc.\n- `expired`: The payment method is expired. The customer should go to their portal page and change their payment method.\n- `fraud`: The payment provider suspected the payment method was fraudulent and has been blocked. Don't report more detailed information to your customer, and check on your provider account.\n- `invalid`: The payment method is invalid in most cases because of incorrect details (card/account number, CVC, expiration date, postal code).\n- `not_supported`: The payment method doesn't support this type of purchase (e.g. currency, online payment).\n- `unknown`: A generic error happened on the payment provider side.\n  ","example":"expired"},"type":{"type":"string","enum":["stripe_link"],"description":"\nPayment method type.\n\n- `card`: Credit or debit card\n- `apple_pay`: Apple Pay\n- `google_pay`: Google Pay\n- `direct_debit_sepa`: SEPA Direct Debit\n- `direct_debit_ach`: ACH Direct Debit\n- `direct_debit_bacs`: Bacs Direct Debit\n- `stripe_link`: Stripe Link\n  ","example":"stripe_link"},"integration":{"type":["object","null"],"properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"required":["id","status","error_type","type","integration"],"title":"Stripe Link (errored)"}]},"CreatePaymentMethod":{"type":"object","properties":{"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_payment_method_id":{"type":"string","description":"ID of the payment method on the provider's side."}},"required":["provider_name","provider_payment_method_id"]},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":["string","null"],"enum":["corporate","person","automatically_created"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"status":{"type":"string","enum":["active","archived"],"description":"Customer status.","example":"active"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_number_valid":{"type":"boolean","description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_rate_custom":{"type":["number","null"],"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"},"status":{"type":"string","enum":["valid","invalid","mismatch","unverified","unsupported"],"description":"\nVerification status of the customer tax ID.\n\n- `valid`: Tax ID has been verified and is valid.\n- `invalid`: Tax ID has been verified and is invalid.\n- `mismatch`: Tax ID is valid but is for a different country than the customer's country.\n- `unverified`: Tax ID has not been verified yet.\n- `unsupported`: Tax ID verification for this type not supported yet.\n ","example":"valid"}},"required":["value","status"]},"description":"Customer tax IDs."},"tax_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"is_government_affiliated":{"type":"boolean","description":"Indicates if the customer is affiliated with a government entity.","example":false},"language":{"type":["string","null"],"enum":["fr","en","de","it","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":["string","null"],"enum":["Pacific/Niue","Pacific/Midway","Pacific/Pago_Pago","Pacific/Rarotonga","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","Pacific/Gambier","America/Adak","America/Anchorage","Pacific/Pitcairn","America/Hermosillo","America/Phoenix","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","America/Belize","America/Guatemala","America/Managua","America/Mexico_City","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Easter","Pacific/Galapagos","America/Edmonton","America/Ciudad_Juarez","America/Denver","America/Rio_Branco","America/Chicago","America/Matamoros","America/Winnipeg","America/Bogota","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Panama","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/St_Lucia","America/Port_of_Spain","America/Martinique","America/St_Barthelemy","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Curacao","America/La_Paz","America/Santiago","America/Havana","America/Grand_Turk","America/Nassau","America/New_York","America/Port-au-Prince","America/Toronto","America/Guyana","America/Caracas","America/Argentina/Buenos_Aires","America/Halifax","Atlantic/Bermuda","America/Thule","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Paramaribo","America/Montevideo","America/St_Johns","America/Noronha","Atlantic/South_Georgia","America/Miquelon","Atlantic/Cape_Verde","America/Scoresbysund","America/Nuuk","Atlantic/Azores","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Africa/Sao_Tome","Africa/Banjul","Africa/Algiers","Africa/Tunis","Europe/Isle_of_Man","Europe/Dublin","Europe/London","Europe/Jersey","Europe/Guernsey","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Europe/Kaliningrad","Africa/Tripoli","Antarctica/Troll","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Asia/Almaty","Indian/Kerguelen","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Antarctica/Vostok","Asia/Aqtobe","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Australia/Perth","Asia/Brunei","Antarctica/Casey","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Dili","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Chita","Australia/Adelaide","Australia/Darwin","Australia/Brisbane","Australia/Sydney","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Lord_Howe","Pacific/Bougainville","Pacific/Kosrae","Pacific/Noumea","Pacific/Norfolk","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Pacific/Majuro","Pacific/Nauru","Pacific/Auckland","Antarctica/McMurdo","Asia/Kamchatka","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Chatham","Pacific/Apia","Pacific/Kanton","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline.","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object"}]},"shipping_address":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Address name.","example":"Acme"},"line1":{"type":["string","null"],"description":"Address first line.","example":"5 rue de Paradis"},"line2":{"type":["string","null"],"description":"Address second line (optional).","example":null},"city":{"type":["string","null"],"description":"Address city.","example":"Paris"},"zip":{"type":["string","null"],"description":"Address ZIP code.","example":"75010"},"state":{"type":["string","null"],"enum":["AA","AE","AK","AL","AP","AR","AS","AZ","CA","CO","CT","DC","DE","FL","GA","GU","HI","IA","ID","IL","IN","KS","KY","LA","MA","MD","ME","MI","MN","MO","MP","MS","MT","NC","ND","NE","NH","NJ","NM","NV","NY","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VA","VI","VT","WA","WI","WV","WY"],"description":"Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).","example":"CA"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}},"description":"Customer shipping address."},"billing_email":{"type":["string","null"],"format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to.","example":"ive_484dn4U48E"},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"price_book_id":{"type":["string","null"],"description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"current_payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"current_payment_method_id":{"type":["string","null"],"description":"ID of the default payment method of the customer. Only applies to card and direct debit.","example":"pm_UTclbc1US8GzCe"},"custom_payment_delay":{"type":["number","null"],"description":"Custom payment delay. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":["number","null"],"description":"Custom initiation delay for payment collection. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"subscriptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription ID.","example":"sub_0kIc7jrF7gV00V"},"status":{"type":"string","enum":["draft","pending","trialing","active","paused","errored","cancelled","voided","archived"],"description":"Status of the subscription.","example":"active"},"current_period_started_at":{"type":["string","null"],"format":"date","description":"Start date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"current_period_ends_at":{"type":["string","null"],"format":"date","description":"End date of the current period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-11-12T07:00:01.860Z"},"plan_id":{"type":["string","null"],"description":"Plan ID.","example":"plan_34hdd843hReh","deprecated":true},"checkout_session_id":{"type":["string","null"],"description":"Checkout session ID.","example":"che_949djdj39RJj"}},"required":["id","status","current_period_started_at","current_period_ends_at","plan_id","checkout_session_id"]}},"segment_ids":{"type":"array","items":{"type":"string"},"description":"IDs of segments this customer belongs to.","example":["seg_0kIc7jrF7gV00V"]},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}},"created_at":{"type":"string","format":"date-time","description":"Customer creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Customer last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"deleted_at":{"type":["string","null"],"format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","name","type","status","currency","country","vat_number","vat_number_valid","vat_rate_custom","tax_ids","tax_rate_custom","registration_number","is_government_affiliated","language","timezone","external_id","properties","custom_properties","billing_address","shipping_address","billing_email","invoice_emails","invoicing_entity_id","invoice_reminders_enabled","price_book_id","available_payment_methods","current_payment_method_type","current_payment_method_id","custom_payment_delay","custom_payment_initiation_delay","subscriptions","segment_ids","integrations","created_at","updated_at","deleted_at"]},"PaginatedCustomer":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"},"description":"List of Customer."}},"required":["meta","data"]},"CustomerDetails":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"type":"object","properties":{"providers":{"type":"object","properties":{"adyen":{"type":"string"},"stripe":{"type":"string"},"mollie":{"type":"string"},"gocardless":{"type":"string"},"airwallex":{"type":"string"},"salesforce":{"type":"string"},"hubspot":{"type":"string"},"attio":{"type":"string"},"xero":{"type":"string"},"pennylane":{"type":"string"},"zoho-books":{"type":"string"},"exact-online":{"type":"string"},"quickbooks":{"type":"string"},"netsuite":{"type":"string"},"anrok":{"type":"string"},"chargebee":{"type":"string"},"slack":{"type":"string"},"plain":{"type":"string"},"zendesk":{"type":"string"},"pylon":{"type":"string"},"intercom":{"type":"string"},"claap":{"type":"string"}},"deprecated":true,"description":"Deprecated field, please use `integrations`."},"current_payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Default payment method of the customer. Only applies to card and direct debit."}]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}},"required":["id","currency","bank_name"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}]},{"type":"null"}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."}]},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null}},"required":["providers","current_payment_method","bank_account","organisation_id","organisation_invoicing"]}]},"UpdateBankAccount":{"allOf":[{"type":"object","properties":{"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}}},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."},"CreateCustomer":{"type":"object","properties":{"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":"string","enum":["corporate","person"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated field, please use `billing_address.country`.","example":"FR","deprecated":true},"is_government_affiliated":{"type":"boolean","description":"Indicates if the customer is affiliated with a government entity.","example":false},"vat_number":{"type":"string","description":"Deprecated field, please use `tax_id`.","deprecated":true},"vat_rate_custom":{"type":"number","minimum":0,"maximum":100,"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"}},"required":["value"]},"maxItems":1,"description":"Customer tax IDs."},"tax_rate_custom":{"type":"number","minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"registration_number":{"type":"string","description":"Customer registration number.","example":"36252187900034"},"external_id":{"type":"string","description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to."},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object"}]},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Customer shipping address."}]},"billing_email":{"type":"string","format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":"string","enum":["Pacific/Niue","Pacific/Midway","Pacific/Pago_Pago","Pacific/Rarotonga","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","Pacific/Gambier","America/Adak","America/Anchorage","Pacific/Pitcairn","America/Hermosillo","America/Phoenix","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","America/Belize","America/Guatemala","America/Managua","America/Mexico_City","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Easter","Pacific/Galapagos","America/Edmonton","America/Ciudad_Juarez","America/Denver","America/Rio_Branco","America/Chicago","America/Matamoros","America/Winnipeg","America/Bogota","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Panama","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/St_Lucia","America/Port_of_Spain","America/Martinique","America/St_Barthelemy","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Curacao","America/La_Paz","America/Santiago","America/Havana","America/Grand_Turk","America/Nassau","America/New_York","America/Port-au-Prince","America/Toronto","America/Guyana","America/Caracas","America/Argentina/Buenos_Aires","America/Halifax","Atlantic/Bermuda","America/Thule","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Paramaribo","America/Montevideo","America/St_Johns","America/Noronha","Atlantic/South_Georgia","America/Miquelon","Atlantic/Cape_Verde","America/Scoresbysund","America/Nuuk","Atlantic/Azores","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Africa/Sao_Tome","Africa/Banjul","Africa/Algiers","Africa/Tunis","Europe/Isle_of_Man","Europe/Dublin","Europe/London","Europe/Jersey","Europe/Guernsey","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Europe/Kaliningrad","Africa/Tripoli","Antarctica/Troll","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Asia/Almaty","Indian/Kerguelen","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Antarctica/Vostok","Asia/Aqtobe","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Australia/Perth","Asia/Brunei","Antarctica/Casey","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Dili","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Chita","Australia/Adelaide","Australia/Darwin","Australia/Brisbane","Australia/Sydney","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Lord_Howe","Pacific/Bougainville","Pacific/Kosrae","Pacific/Noumea","Pacific/Norfolk","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Pacific/Majuro","Pacific/Nauru","Pacific/Auckland","Antarctica/McMurdo","Asia/Kamchatka","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Chatham","Pacific/Apia","Pacific/Kanton","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"payment_method_type":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"bank_account":{"$ref":"#/components/schemas/UpdateBankAccount"},"custom_payment_delay":{"type":"number","description":"Custom payment delay. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":"number","description":"Custom initiation delay for payment collection. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"organisation_id":{"type":"string","description":"Parent organization ID to which the client is attached."},"organisation_invoicing":{"type":"string","enum":["none","every_invoice","concat"],"default":"none","description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n "},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"price_book_id":{"type":"string","description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"}}},"UpdateCustomer":{"type":"object","properties":{"name":{"type":"string","description":"Customer name.","example":"Acme"},"type":{"type":["string","null"],"enum":["corporate","person"],"description":"\nCustomer type.\n\n- `corporate`: The customer is a business entity.\n- `person`: The customer is a natural person.\n- `automatically_created`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.\n ","example":"corporate"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Deprecated field, please use `billing_address.country`.","example":"FR","deprecated":true},"vat_number":{"type":["string","null"],"description":"Deprecated field, please use `tax_ids`.","deprecated":true},"vat_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Deprecated field, please use `tax_rate_custom`.","deprecated":true},"tax_ids":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"Value of the customer tax ID.","example":"FR123456789"}},"required":["value"]},"maxItems":1,"description":"Customer tax IDs."},"tax_rate_custom":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements."},"registration_number":{"type":["string","null"],"description":"Customer registration number.","example":"36252187900034"},"is_government_affiliated":{"type":["boolean","null"],"description":"Indicates if the customer is affiliated with a government entity.","example":false},"external_id":{"type":["string","null"],"description":"ID of the customer in your system. This helps matching your customer with the one on Hyperline."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity this customer will be attached to."},"billing_address":{"$ref":"#/components/schemas/Address"},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"description":"Customer shipping address."}]},"billing_email":{"type":["string","null"],"format":"email","description":"Email to which all communications will be sent.","example":"billing@acme.com"},"invoice_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the `billing_email`; otherwise, they won't be sent to the `billing_email`.","example":["accounting@acme.com"]},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"Language used for invoices, emails, and hosted pages.","example":"fr"},"timezone":{"type":"string","enum":["Pacific/Niue","Pacific/Midway","Pacific/Pago_Pago","Pacific/Rarotonga","Pacific/Honolulu","Pacific/Tahiti","Pacific/Marquesas","Pacific/Gambier","America/Adak","America/Anchorage","Pacific/Pitcairn","America/Hermosillo","America/Phoenix","America/Los_Angeles","America/Tijuana","America/Vancouver","America/Whitehorse","America/Belize","America/Guatemala","America/Managua","America/Mexico_City","America/Costa_Rica","America/El_Salvador","America/Regina","America/Tegucigalpa","Pacific/Easter","Pacific/Galapagos","America/Edmonton","America/Ciudad_Juarez","America/Denver","America/Rio_Branco","America/Chicago","America/Matamoros","America/Winnipeg","America/Bogota","America/Atikokan","America/Cancun","America/Cayman","America/Jamaica","America/Panama","America/Guayaquil","America/Lima","America/Manaus","America/St_Kitts","America/Blanc-Sablon","America/Montserrat","America/Barbados","America/St_Lucia","America/Port_of_Spain","America/Martinique","America/St_Barthelemy","America/St_Vincent","America/Kralendijk","America/Guadeloupe","America/Marigot","America/Aruba","America/Lower_Princes","America/Tortola","America/Dominica","America/St_Thomas","America/Grenada","America/Antigua","America/Puerto_Rico","America/Santo_Domingo","America/Anguilla","America/Curacao","America/La_Paz","America/Santiago","America/Havana","America/Grand_Turk","America/Nassau","America/New_York","America/Port-au-Prince","America/Toronto","America/Guyana","America/Caracas","America/Argentina/Buenos_Aires","America/Halifax","Atlantic/Bermuda","America/Thule","America/Sao_Paulo","Antarctica/Palmer","America/Punta_Arenas","Atlantic/Stanley","America/Cayenne","America/Asuncion","America/Paramaribo","America/Montevideo","America/St_Johns","America/Noronha","Atlantic/South_Georgia","America/Miquelon","Atlantic/Cape_Verde","America/Scoresbysund","America/Nuuk","Atlantic/Azores","Etc/UTC","Africa/Abidjan","Africa/Bamako","Africa/Bissau","Africa/Conakry","Africa/Dakar","America/Danmarkshavn","Africa/Freetown","Atlantic/St_Helena","Africa/Accra","Africa/Lome","Africa/Monrovia","Africa/Nouakchott","Africa/Ouagadougou","Atlantic/Reykjavik","Africa/Sao_Tome","Africa/Banjul","Africa/Algiers","Africa/Tunis","Europe/Isle_of_Man","Europe/Dublin","Europe/London","Europe/Jersey","Europe/Guernsey","Africa/Bangui","Africa/Malabo","Africa/Brazzaville","Africa/Porto-Novo","Africa/Douala","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Luanda","Africa/Ndjamena","Africa/Niamey","Africa/Casablanca","Africa/El_Aaiun","Atlantic/Canary","Europe/Lisbon","Atlantic/Faroe","Africa/Bujumbura","Africa/Gaborone","Africa/Harare","Africa/Juba","Africa/Khartoum","Africa/Kigali","Africa/Blantyre","Africa/Lubumbashi","Africa/Lusaka","Africa/Maputo","Africa/Windhoek","Europe/Amsterdam","Europe/Andorra","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Budapest","Europe/Copenhagen","Europe/Gibraltar","Europe/Ljubljana","Arctic/Longyearbyen","Europe/Luxembourg","Europe/Madrid","Europe/Monaco","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Rome","Europe/San_Marino","Europe/Malta","Europe/Sarajevo","Europe/Skopje","Europe/Stockholm","Europe/Tirane","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Europe/Kaliningrad","Africa/Tripoli","Antarctica/Troll","Africa/Johannesburg","Africa/Mbabane","Africa/Maseru","Asia/Kuwait","Asia/Bahrain","Asia/Baghdad","Asia/Qatar","Asia/Riyadh","Asia/Aden","Asia/Amman","Asia/Damascus","Africa/Addis_Ababa","Indian/Antananarivo","Africa/Asmara","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Kampala","Indian/Mayotte","Africa/Mogadishu","Indian/Comoro","Africa/Nairobi","Europe/Athens","Asia/Beirut","Europe/Bucharest","Africa/Cairo","Europe/Chisinau","Asia/Hebron","Europe/Helsinki","Europe/Kyiv","Europe/Mariehamn","Asia/Nicosia","Europe/Riga","Europe/Sofia","Europe/Tallinn","Europe/Vilnius","Asia/Jerusalem","Europe/Minsk","Europe/Moscow","Europe/Simferopol","Antarctica/Syowa","Europe/Istanbul","Asia/Tehran","Asia/Yerevan","Asia/Baku","Asia/Tbilisi","Asia/Dubai","Asia/Muscat","Indian/Mauritius","Indian/Reunion","Europe/Samara","Indian/Mahe","Asia/Kabul","Asia/Almaty","Indian/Kerguelen","Indian/Maldives","Antarctica/Mawson","Asia/Karachi","Asia/Dushanbe","Asia/Ashgabat","Asia/Tashkent","Antarctica/Vostok","Asia/Aqtobe","Asia/Yekaterinburg","Asia/Colombo","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Thimphu","Asia/Urumqi","Indian/Chagos","Asia/Bishkek","Asia/Omsk","Indian/Cocos","Asia/Yangon","Indian/Christmas","Antarctica/Davis","Asia/Hovd","Asia/Bangkok","Asia/Ho_Chi_Minh","Asia/Phnom_Penh","Asia/Vientiane","Asia/Novosibirsk","Asia/Jakarta","Australia/Perth","Asia/Brunei","Antarctica/Casey","Asia/Makassar","Asia/Macau","Asia/Shanghai","Asia/Hong_Kong","Asia/Irkutsk","Asia/Kuala_Lumpur","Asia/Manila","Asia/Singapore","Asia/Taipei","Asia/Ulaanbaatar","Australia/Eucla","Asia/Dili","Asia/Jayapura","Asia/Tokyo","Asia/Pyongyang","Asia/Seoul","Pacific/Palau","Asia/Chita","Australia/Adelaide","Australia/Darwin","Australia/Brisbane","Australia/Sydney","Pacific/Guam","Pacific/Saipan","Pacific/Chuuk","Antarctica/DumontDUrville","Pacific/Port_Moresby","Asia/Vladivostok","Australia/Lord_Howe","Pacific/Bougainville","Pacific/Kosrae","Pacific/Noumea","Pacific/Norfolk","Asia/Sakhalin","Pacific/Guadalcanal","Pacific/Efate","Pacific/Fiji","Pacific/Tarawa","Pacific/Majuro","Pacific/Nauru","Pacific/Auckland","Antarctica/McMurdo","Asia/Kamchatka","Pacific/Funafuti","Pacific/Wake","Pacific/Wallis","Pacific/Chatham","Pacific/Apia","Pacific/Kanton","Pacific/Fakaofo","Pacific/Tongatapu","Pacific/Kiritimati"],"description":"Customer timezone.","example":"Europe/Paris"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated"]},"description":"List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.","example":["card","direct_debit"]},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"],"description":"Default payment method type used to pay subscriptions and one-off invoices.","example":"card"},"payment_method_id":{"type":["string","null"],"description":"ID of the default payment method of the customer. Only applies to card and direct debit.","example":"pm_UTclbc1US8GzCe"},"bank_account":{"anyOf":[{"allOf":[{"type":"object","properties":{"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}}},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}]},{"type":"null"}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."},"custom_payment_delay":{"type":["number","null"],"description":"Custom payment delay. If not defined, the default one defined on the related invoicing entity will be used.","example":30},"custom_payment_initiation_delay":{"type":["number","null"],"description":"Custom initiation delay for payment collection. If not defined, the default one defined on the related invoicing entity will be used.","example":7},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_reminders_enabled":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if invoice reminders are enabled for the customer."},"price_book_id":{"type":["string","null"],"description":"Default price book ID assigned to the customer.","example":"prib_613_WbVIZ1329e"}}},"Organisation":{"type":"object","properties":{"id":{"type":"string","description":"Organisation ID.","example":"cus_0noDeAEU22FgA4"},"name":{"type":"string","description":"Organisation legal name.","example":"Acme Group"},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"invoice_schedule":{"type":["string","null"],"enum":["month","quarter","year"],"description":"Frequency on which the invoices are grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"month"},"next_invoice_at":{"type":["string","null"],"format":"date-time","description":"Next invoice date where the invoices will be grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"2024-04-01T00:00:00Z"},"child_customer_ids":{"type":"array","items":{"type":"string"},"description":"List of the organization's child customer IDs.","example":["cus_Typ0px2W0aiEtl"]}},"required":["id","name","currency","country","invoice_schedule","next_invoice_at","child_customer_ids"]},"PatchOrganisation":{"type":"object","properties":{"name":{"type":"string","description":"Organisation legal name.","example":"Acme Group"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"},"invoice_schedule":{"type":"string","enum":["month","quarter","year"],"description":"Frequency on which the invoices are grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"month"},"next_invoice_at":{"type":"string","format":"date-time","description":"Next invoice date where the invoices will be grouped and emitted from the organisation. Only applies to `concat` invoice configuration on children customers.","example":"2024-04-01T00:00:00Z"}}},"PaginatedSegment":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]},"description":"List of Segment."}},"required":["meta","data"]},"CreateExport":{"type":"object","properties":{"name":{"type":"string","enum":["aged_balances","outstanding_invoices","all_subscriptions","revenue_per_product","revenue_per_line_item_name","revenue_per_country","revenue_per_plan","all_customers","detailed_revenue","line_by_line_revenue","draft_invoices","open_invoices","live_subscriptions","renewals"],"description":"\nExport name.\n\n- `aged_balances`: List of balances at 30, 60, and 90+ days for all customers.\n- `all_customers`: List of all customers.\n- `outstanding_invoices`: List of all outstanding invoices.\n- `all_subscriptions`: List of all active, pending or cancelled subscriptions.\n- `revenue_per_product`: Revenue per product month over month.\n- `detailed_revenue`: Booked revenue (outstanding and paid) split per customer and product, month over month.\n- `revenue_per_line_item_name`: Revenue per invoice line item month over month, grouped by name given on invoice or subscription.\n- `revenue_per_country`: Revenue, tax and invoice number per country.\n- `revenue_per_plan`: Revenue per plan month over month.\n- `line_by_line_revenue`: All invoice line items in chronological order, with product and customer information.\n- `draft_invoices`: Export all draft invoices, with customer and product information.\n- `open_invoices`: Export all open invoices, with customer and product information.\n- `live_subscriptions`: List of all active subscriptions line by line.\n","example":"line_by_line_revenue"},"file_type":{"type":"string","enum":["csv","xlsx","json"],"description":"\nExport file type.\n\n- `csv`: The export will be generated in CSV format.\n- `xlsx`: The export will be generated in XLSX format.\n- `json`: The export will be generated in JSON format.","example":"csv"}},"required":["name","file_type"]},"Export":{"allOf":[{"$ref":"#/components/schemas/CreateExport"},{"type":"object","properties":{"id":{"type":"string","description":"Export ID.","example":"exp_YfiSnLIYORD9VN"},"status":{"type":"string","enum":["pending","processing","done","error"],"description":"\nExport status.\n\n- `pending`: The export is pending and has not started processing yet.\n- `processing`: The export is currently being generated.\n- `done`: The export has been successfully generated.\n- `errored`: An error occurred during the export generation.\n","example":"processing"},"created_at":{"type":["string","null"],"format":"date","description":"Export creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-03T11:32:00Z"},"updated_at":{"type":["string","null"],"format":"date","description":"Export last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-07T19:13:00Z"}},"required":["id","status","created_at","updated_at"]}]},"PaginatedExport":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Export"},"description":"List of Export."}},"required":["meta","data"]},"PaginatedFile":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"File ID.","example":"fil_2QdJDDUej969ev"},"name":{"type":"string","description":"File name.","example":"invoice_2024.pdf"},"type":{"type":"string","enum":["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","csv","jpeg","png","gif","svg","json","xml"],"description":"\nFile type based on the MIME type.\n\nSupported file types:\n- `pdf`: PDF documents\n- `doc`: Microsoft Word documents (legacy)\n- `docx`: Microsoft Word documents\n- `xls`: Microsoft Excel spreadsheets (legacy)\n- `xlsx`: Microsoft Excel spreadsheets\n- `ppt`: Microsoft PowerPoint presentations (legacy)\n- `pptx`: Microsoft PowerPoint presentations\n- `txt`: Plain text files\n- `csv`: Comma-separated values files\n- `jpeg`: JPEG images\n- `png`: PNG images\n- `gif`: GIF images\n- `svg`: SVG vector images\n- `json`: JSON data files\n- `xml`: XML data files\n  ","example":"pdf"},"mimetype":{"type":"string","description":"MIME type of the file.","example":"application/pdf"},"customer_id":{"type":["string","null"],"description":"ID of the customer linked to the file.","example":"cus_QalW2vTAdkR6IY"},"summary":{"type":["string","null"],"description":"AI-generated summary of the file content"},"created_at":{"type":"string","format":"date-time","description":"Date when the file was created.","example":"2024-11-12T07:38:39.222Z"}},"required":["id","name","type","mimetype","customer_id","summary","created_at"]},"description":"List of File."}},"required":["meta","data"]},"CreateComponentToken":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID"}},"required":["customer_id"]},"PaginatedInvoicingEntity":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","created_at","updated_at","deleted_at"]},"description":"List of InvoicingEntity."}},"required":["meta","data"]},"PriceBook":{"type":"object","properties":{"id":{"type":"string","description":"Price book ID.","example":"prib_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":["string","null"],"description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"description":"List of user role IDs that have access to this price book."},"created_at":{"type":"string","format":"date-time","description":"Price book creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"updated_at":{"type":"string","format":"date-time","description":"Price book last update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["id","name","description","user_role_ids","created_at","updated_at"]},"PaginatedPriceBook":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceBook"},"description":"List of PriceBook."}},"required":["meta","data"]},"CreatePriceBook":{"type":"object","properties":{"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":"string","description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"default":[],"description":"List of user role IDs that have access to this price book."}},"required":["name"]},"UpdatePriceBook":{"type":"object","properties":{"name":{"type":"string","description":"Price book name.","example":"Enterprise pricing"},"description":{"type":["string","null"],"description":"Price book description.","example":null},"user_role_ids":{"type":"array","items":{"type":"string"},"description":"List of user role IDs that have access to this price book."}}},"AddProductsToPriceBook":{"type":"object","properties":{"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs to add to the price book."}},"required":["product_ids"]},"QuoteFile":{"type":"object","properties":{"id":{"type":"string","description":"Quote file ID."},"name":{"type":"string","description":"Quote file name."},"mimetype":{"type":"string","description":"Quote file MIME type."}},"required":["id","name","mimetype"]},"Quote":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"status":{"type":"string","enum":["draft"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"draft"},"amount":{"type":["number","null"],"description":"Estimated contract value.","example":200000},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"subscription"},"subscription_id":{"type":["string","null"],"description":"ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the `subscription` and `subscription_update` quote types. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":"sub_B6ClkdqNqVNBgY"},"child_subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":["sub_0z39oqdhKl0PXb"]}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","status","amount","expires_at","type","subscription_id","child_subscription_ids"],"title":"Quote for subscription (draft)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"status":{"type":"string","enum":["draft"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"draft"},"amount":{"type":["number","null"],"description":"Estimated contract value.","example":200000},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"type":{"type":"string","enum":["one_off"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"one_off"},"invoice_id":{"type":["string","null"],"description":"ID of the invoice attached to the quote. Only applies to the `one_off` quote type. The get invoice endpoint (`GET /v1/invoices/{id}`) can be used to retrieve the related details.","example":"inv_0ADWB0lzH52RFt"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","status","amount","expires_at","type","invoice_id"],"title":"Quote for one-off invoice (draft)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"subscription"},"subscription_id":{"type":"string","description":"ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the `subscription` and `subscription_update` quote types. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":"sub_B6ClkdqNqVNBgY"},"child_subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":["sub_0z39oqdhKl0PXb"]},"status":{"type":"string","enum":["pending_approval","changes_requested"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_approval"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","subscription_id","child_subscription_ids","status"],"title":"Quote for subscription (approval)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"subscription"},"subscription_id":{"type":"string","description":"ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the `subscription` and `subscription_update` quote types. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":"sub_B6ClkdqNqVNBgY"},"child_subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":["sub_0z39oqdhKl0PXb"]},"status":{"type":"string","enum":["approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_signature"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","subscription_id","child_subscription_ids","status","approved_at"],"title":"Quote for subscription (ready)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"subscription"},"subscription_id":{"type":"string","description":"ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the `subscription` and `subscription_update` quote types. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":"sub_B6ClkdqNqVNBgY"},"child_subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":["sub_0z39oqdhKl0PXb"]},"status":{"type":"string","enum":["signed"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"signed"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":"string","format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","subscription_id","child_subscription_ids","status","approved_at","signature","signed_at"],"title":"Quote for subscription (signed)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["one_off"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"one_off"},"invoice_id":{"type":"string","description":"ID of the invoice attached to the quote. Only applies to the `one_off` quote type. The get invoice endpoint (`GET /v1/invoices/{id}`) can be used to retrieve the related details.","example":"inv_0ADWB0lzH52RFt"},"status":{"type":"string","enum":["pending_approval","changes_requested"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_approval"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","invoice_id","status"],"title":"Quote for one-off invoice (approval)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["one_off"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"one_off"},"invoice_id":{"type":"string","description":"ID of the invoice attached to the quote. Only applies to the `one_off` quote type. The get invoice endpoint (`GET /v1/invoices/{id}`) can be used to retrieve the related details.","example":"inv_0ADWB0lzH52RFt"},"status":{"type":"string","enum":["approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"pending_signature"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","invoice_id","status","approved_at"],"title":"Quote for one-off invoice (ready)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"amount":{"type":"number","description":"Estimated contract value.","example":20000},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"type":{"type":"string","enum":["one_off"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"one_off"},"invoice_id":{"type":"string","description":"ID of the invoice attached to the quote. Only applies to the `one_off` quote type. The get invoice endpoint (`GET /v1/invoices/{id}`) can be used to retrieve the related details.","example":"inv_0ADWB0lzH52RFt"},"status":{"type":"string","enum":["signed"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"signed"},"approved_at":{"type":"string","format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":"string","format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","amount","expires_at","type","invoice_id","status","approved_at","signature","signed_at"],"title":"Quote for one-off invoice (signed)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"status":{"type":"string","enum":["voided"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"voided"},"void_reason":{"type":"string","description":"Quote voiding reason. Only applies to the `voided` quote.","example":"The customer is ultimately not interested."},"voided_at":{"type":"string","format":"date-time","description":"Quote voiding date. Only applies to the `voided` quote.","example":"2024-04-26T12:00:01.320Z"},"amount":{"type":["number","null"],"description":"Estimated contract value.","example":20000},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"approved_at":{"type":["string","null"],"format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"null"}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":["string","null"],"format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"},"type":{"type":"string","enum":["subscription","subscription_update"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"subscription"},"subscription_id":{"type":["string","null"],"description":"ID of the subscription attached to the quote. It corresponds to the state at the time of the quote signature. Only applies to the `subscription` and `subscription_update` quote types. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":"sub_B6ClkdqNqVNBgY"},"child_subscription_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions from the quote. Subscriptions configuration can change after the quote signature. The get subscription endpoint (`GET /v2/subscriptions/{id}`) can be used to retrieve the related details.","example":["sub_0z39oqdhKl0PXb"]}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","status","void_reason","voided_at","amount","expires_at","approved_at","signature","signed_at","type","subscription_id","child_subscription_ids"],"title":"Quote for subscription (voided)"},{"type":"object","properties":{"id":{"type":"string","description":"Quote ID.","example":"quo_hXQCd5y8P3GYXa"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"template_id":{"type":["string","null"],"description":"ID of the quote template.","example":"quot_9hNWq4c84Z146W"},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"number":{"type":"string","description":"Quote sequential number.","example":"327"},"comments":{"type":["string","null"],"description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":["string","null"],"description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"owner_email":{"type":["string","null"],"format":"email","description":"Email address of the Hyperline user acting as the quote owner.","example":"joe@acme.com"},"collect_payment_details":{"type":"boolean","description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"type":"boolean","description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"type":"boolean","description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"type":"boolean","description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"type":"boolean","description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"type":"string","enum":["all","matching","none"],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"type":"boolean","description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"type":"boolean","description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"type":"boolean","description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"type":"boolean","description":"Display subscription details on subscription update quotes.","example":false},"post_signature_activation_enabled":{"type":"boolean","description":"Whether the subscription is automatically orchestrated after the quote is signed. Only applies to the Hyperline CPQ-only product.","example":true},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/QuoteFile"},"description":"List of documents attached to the quote.","example":[{"id":"quof_5GYXy8P3QCdaXh","name":"General Conditions of Sale","mimetype":"application/pdf"}]},"signed_file":{"allOf":[{"$ref":"#/components/schemas/QuoteFile"},{"type":["object","null"],"description":"Final signed quote (manually uploaded).","example":null}]},"url":{"type":["string","null"],"format":"uri","description":"URL to access the quote publicly. Only applies to the `pending_signature` or `signed` quote.","example":"https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa"},"created_at":{"type":"string","format":"date-time","description":"Quote creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T09:10:00.220Z"},"updated_at":{"type":"string","format":"date-time","description":"Quote update date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-23T10:22:08.100Z"},"status":{"type":"string","enum":["voided"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `pending_approval`: The quote is pending manager review and approval.\n- `changes_requested`: Some changes have been requested following manager review.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n- `signed`: The quote is signed and fully finalized.\n- `voided`: The quote is voided.\n","example":"voided"},"void_reason":{"type":"string","description":"Quote voiding reason. Only applies to the `voided` quote.","example":"The customer is ultimately not interested."},"voided_at":{"type":"string","format":"date-time","description":"Quote voiding date. Only applies to the `voided` quote.","example":"2024-04-26T12:00:01.320Z"},"amount":{"type":["number","null"],"description":"Estimated contract value.","example":20000},"expires_at":{"type":["string","null"],"format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"approved_at":{"type":["string","null"],"format":"date-time","description":"Quote approbation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-24T09:10:00.220Z"},"signature":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"object","properties":{"mode":{"type":"string","enum":["basic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"basic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["electronic"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"electronic"},"signerName":{"type":"string","description":"Signer name of the quote.","example":"Acme"}},"required":["mode","signerName"]},{"type":"object","properties":{"mode":{"type":"string","enum":["external"],"description":"\nSignature mode.\n\n- `basic`: Basic signature. The signer manually put his name. No legal value.\n- `electronic`: Certified electronic signature. Legally compliant.\n- `external`: Signed outside of Hyperline. A signed file has been uploaded.\n","example":"external"}},"required":["mode"]},{"type":"null"}],"description":"Quote signature. Only applies to the `signed` quote.","example":{"mode":"basic","signerName":"Acme"}},"signed_at":{"type":["string","null"],"format":"date-time","description":"Quote signature date. Only applies to the `signed` quote.","example":"2024-04-25T12:22:08.100Z"},"type":{"type":"string","enum":["one_off"],"description":"\nQuote type.\n\n- `subscription`: The quote will create and start a new subscription.\n- `subscription_update`: The quote will update an existing subscription.\n- `one_off`: The quote will issue an one-off invoice.\n","example":"one_off"},"invoice_id":{"type":["string","null"],"description":"ID of the invoice attached to the quote. Only applies to the `one_off` quote type. The get invoice endpoint (`GET /v1/invoices/{id}`) can be used to retrieve the related details.","example":"inv_0ADWB0lzH52RFt"}},"required":["id","customer_id","invoicing_entity_id","template_id","crm_opportunity_id","number","comments","terms","owner_email","collect_payment_details","collect_custom_property_ids","require_tax_id","display_quote_value","display_quote_value_with_tax","display_taxes","display_price_tiers","display_phase_value","display_first_invoice_amount","display_documents_in_preview","display_subscription_on_update","post_signature_activation_enabled","attachments","signed_file","url","created_at","updated_at","status","void_reason","voided_at","amount","expires_at","approved_at","signature","signed_at","type","invoice_id"],"title":"Quote for one-off invoice (voided)"}]},"PaginatedQuote":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"},"description":"List of Quote."}},"required":["meta","data"]},"SendQuote":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which the quote will be sent for signature.","example":"finance@acme.com"},"message":{"type":"string","description":"Custom message used in the email content.","example":"Please find attached our proposed quotation."}},"required":["email"]},"VoidQuote":{"type":"object","properties":{"reason":{"type":"string","description":"Quote voiding reason.","example":"The customer is ultimately not interested."}},"required":["reason"]},"SubscriptionTemplateSimple":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template ID.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"},"created_at":{"type":"string","format":"date-time","description":"Subscription template creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription template last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"configurations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template configuration ID.","example":"subtc_CjozNBirj6oGq3"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["id","currency","country"]},"description":"Subscription template configurations.","example":[]}},"required":["id","name","description","created_at","updated_at","configurations"]},"PaginatedSubscriptionTemplate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionTemplateSimple"},"description":"List of SubscriptionTemplate."}},"required":["meta","data"]},"SubscriptionTemplate":{"type":"object","properties":{"id":{"type":"string","description":"Subscription template ID.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Subscription template name.","example":"Starter"},"description":{"type":["string","null"],"description":"Subscription template description.","example":"Starter pack"},"configurations":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Subscription template configuration ID.","example":"subtc_CjozNBirj6oGq3"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Subscription template currency.","example":"EUR"},"country":{"type":["string","null"],"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Subscription template country.","example":null}},"required":["id","currency","country"]},{"type":"object","properties":{"name":{"type":["string","null"],"description":"Subscription custom name.","example":"Yearly subscription"},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":["string","null"],"enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"generate_document":{"type":"boolean","description":"Generate documents instead of invoices for the subscription."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"type":"boolean","description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"type":"boolean","description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration"],"description":"Contract terms linked to the subscription."},"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons comprising the subscription phase."},"products":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["flat_fee"]},"count":{"type":"number","description":"Number of product units.","example":1},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","payment_interval","payment_schedule","prices"],"title":"Fee product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["seat"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"user"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"title":"Volume price"}]},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"title":"Packaged price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"title":"Bulk price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"title":"Bundle price"}]}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","prices"],"title":"Seat product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["dynamic"]},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"metering_interval_type":{"type":["string","null"],"enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n  "},"bill_usage_difference":{"type":"boolean","description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type."},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBps"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"BPS price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","min_committed_count","min_amount","max_amount","metering_interval_type","bill_usage_difference","prices"],"title":"Dynamic product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["credit"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire"},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","unit_name","payment_interval","payment_schedule","credits_expiration_in_days","prices"],"title":"Credit product"},{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"type":{"type":"string","enum":["bundle"]},"count":{"type":"number","description":"Number of product units.","example":2},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"title":"Volume price"}]},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"title":"Packaged price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"title":"Bulk price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"title":"Bundle price"}]}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","type","count","name","description","description_display_interval_dates","display_mode","payment_interval","payment_schedule","prices"],"title":"Bundle product"}]}}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","transition_calculation_method","transition_invoicing_schedule","coupons","products"]},"description":"Phases of the subscription."}},"required":["name","minimum_invoice_fee","cancel_at","cancellation_strategy","custom_properties","generate_document","document_name","add_tax_to_document","generate_draft_invoices","contract_terms","phases"]}]},"description":"Subscription template configurations.","example":[]},"created_at":{"type":"string","format":"date-time","description":"Subscription template creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription template last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-11-30T18:24:34.473Z"}},"required":["id","name","description","configurations","created_at","updated_at"]},"CreateSubscriptionUpdate":{"anyOf":[{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["add_product"]},{"type":"string","enum":["add_item"],"deprecated":true,"description":"Deprecated field, please use `add_product`."}]},"payload":{"oneOf":[{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number"}},"required":["type","amount"]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number"},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["seat"]},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]}]}}},"required":["product_id","count","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"]},"min_amount":{"type":"number"},"max_amount":{"type":"number"},"committed_count":{"type":"number"},"usage_interval_type":{"type":["string","null"],"enum":["subscription_commitment","item_payment_interval","full_database","phase_duration","subscription_duration","custom"]},"usage_interval_count":{"type":["number","null"]},"usage_interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all"]},"usage_interval_period_start":{"type":["string","null"]},"only_bill_usage_difference":{"type":["boolean","null"]},"last_usage_billed":{"type":"number"},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]}]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]}]}},"required":["type","payload"],"description":"Add a new product to bill as part of the subscription."}],"title":"Add product"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["remove_product"]},{"type":"string","enum":["remove_item"],"deprecated":true,"description":"Deprecated field, please use `remove_product`."}]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"}},"required":["product_id"]}},"required":["type","payload"],"description":"Remove a product from a subscription."}],"title":"Remove product"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["add_coupon"]},"payload":{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"billing_item_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `product_ids`."}},"required":["repeat","coupon_id"]}},"required":["type","payload"],"description":"Add a coupon to a subscription."}],"title":"Add coupon"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["remove_coupon"]},"payload":{"type":"object","properties":{"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"}},"required":["subscription_coupon_id"]}},"required":["type","payload"],"description":"Remove a coupon from a subscription."}],"title":"Remove coupon"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["update_count"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"count":{"type":"number","exclusiveMinimum":0}},"required":["product_id","count"]}},"required":["type","payload"],"description":"Update the quantity of a product in a subscription."}],"title":"Update count"},{"allOf":[{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]}},"required":["application_schedule","payment_schedule","calculation_method"]},{"type":"object","properties":{"type":{"type":"string","enum":["update_prices"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]}]}}},"required":["product_id","prices"]}},"required":["type","payload"],"description":"Update the pricing of a product in a subscription."}],"title":"Update prices"}]},"CreateSubscriptionUpdates":{"type":"object","properties":{"application_schedule":{"type":"string","enum":["immediately","scheduled"]},"apply_at":{"type":"string","format":"date-time","description":"The date when the update should be applied. Required when application_schedule is 'scheduled'.","example":"2024-12-20T16:04:11Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"]},"charge_at":{"type":"string","format":"date-time","description":"The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.","example":"2024-12-20T16:04:11Z"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"]},"updates":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["add_product"]},{"type":"string","enum":["add_item"],"deprecated":true,"description":"Deprecated field, please use `add_product`."}]},"payload":{"oneOf":[{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["fee"]},"prices":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number"}},"required":["type","amount"]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number"},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["seat"]},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]}]}}},"required":["product_id","count","billing_interval_period","billing_interval_count","start_or_end","type"]},{"type":"object","properties":{"product_id":{"type":"string"},"product_name":{"type":"string"},"product_description":{"type":"string"},"count":{"type":"number","default":1},"billing_interval_period":{"type":"string","enum":["days","weeks","quarters","months","years","once","all"]},"billing_interval_count":{"type":"number"},"start_or_end":{"type":"string","enum":["start","end"]},"display_interval_dates_in_description":{"type":"boolean"},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"]},"min_amount":{"type":"number"},"max_amount":{"type":"number"},"committed_count":{"type":"number"},"usage_interval_type":{"type":["string","null"],"enum":["subscription_commitment","item_payment_interval","full_database","phase_duration","subscription_duration","custom"]},"usage_interval_count":{"type":["number","null"]},"usage_interval_period":{"type":["string","null"],"enum":["days","weeks","quarters","months","years","once","all"]},"usage_interval_period_start":{"type":["string","null"]},"only_bill_usage_difference":{"type":["boolean","null"]},"last_usage_billed":{"type":"number"},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]}]}}},"required":["product_id","billing_interval_period","billing_interval_count","start_or_end","type"]}]}},"required":["type","payload"],"description":"Add a new product to bill as part of the subscription.","title":"Add product"},{"type":"object","properties":{"type":{"anyOf":[{"type":"string","enum":["remove_product"]},{"type":"string","enum":["remove_item"],"deprecated":true,"description":"Deprecated field, please use `remove_product`."}]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"}},"required":["product_id"]}},"required":["type","payload"],"description":"Remove a product from a subscription.","title":"Remove product"},{"type":"object","properties":{"type":{"type":"string","enum":["add_coupon"]},"payload":{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"billing_item_ids":{"type":"array","items":{"type":"string"},"deprecated":true,"description":"Deprecated field, please use `product_ids`."}},"required":["repeat","coupon_id"]}},"required":["type","payload"],"description":"Add a coupon to a subscription.","title":"Add coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["remove_coupon"]},"payload":{"type":"object","properties":{"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"}},"required":["subscription_coupon_id"]}},"required":["type","payload"],"description":"Remove a coupon from a subscription.","title":"Remove coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["update_count"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"count":{"type":"number","exclusiveMinimum":0}},"required":["product_id","count"]}},"required":["type","payload"],"description":"Update the quantity of a product in a subscription.","title":"Update count"},{"type":"object","properties":{"type":{"type":"string","enum":["update_prices"]},"payload":{"type":"object","properties":{"product_id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number"}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number"},"from":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number"},"to":{"type":["number","null"]},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata"},"unit_count":{"type":"number","default":1}},"required":["type","amount","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number"},"to":{"type":["number","null"]},"percentage":{"type":"number"},"per_unit_cap":{"type":["number","null"]},"per_unit_floor":{"type":["number","null"]},"per_unit_fee":{"type":["number","null"]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number"},"unit_count":{"type":"number"}},"required":["type","amount","unit_count"]}]}}},"required":["product_id","prices"]}},"required":["type","payload"],"description":"Update the pricing of a product in a subscription.","title":"Update prices"}]}}},"required":["application_schedule","payment_schedule","calculation_method","updates"]},"SubscriptionProductFee":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"type":{"type":"string","enum":["flat_fee"]},"count":{"type":"number","description":"Number of product units.","example":1},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","type","count","prices"],"title":"Fee product"},"SubscriptionProductSeat":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"type":{"type":"string","enum":["seat"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"user"},"count":{"type":"number","description":"Number of product units.","example":2},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"title":"Volume price"}]},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"title":"Packaged price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"title":"Bulk price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"title":"Bundle price"}]}]},"description":"Price tiers of the product. If fixed amount, only one price is available."},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"\nCharging method used for seat count updates within the current billing period. Only present for connected seat products.\n\n- `prorata`: The price will be calculated proportionally to the time elapsed since the last billing period.\n- `pay_in_full`: The price will be calculated for the entire billing period.\n- `do_not_charge`: The price will not be calculated.\n"},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"}},"required":["id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","type","unit_name","count","prices"],"title":"Seat product"},"SubscriptionProductDynamic":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"type":{"type":"string","enum":["dynamic"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"min_committed_count":{"type":["number","null"],"description":"Minimum of units committed. If usage is less than this number, then this value will be used.","example":2000},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used."},"metering_interval_type":{"type":["string","null"],"enum":["subscription_commitment","payment_interval","full_database","phase_duration","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n  "},"metering_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing)."},"bill_usage_difference":{"type":"boolean","description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type."},"metering_period_started_at":{"type":["string","null"],"format":"date","description":"Start date of the current metering period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"metering_period_ends_at":{"type":["string","null"],"format":"date","description":"End date of the current metering period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Volume price"},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Packaged price"},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"Bulk price"},{"allOf":[{"$ref":"#/components/schemas/PriceBps"},{"type":"object","properties":{"metering_filter":{"type":["object","null"],"properties":{"name":{"type":"string","description":"Name of the metering filter.","example":"VISA credit cards"},"configuration":{"$ref":"#/components/schemas/MeteringFilterConfiguration"}},"required":["name","configuration"],"description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}}}],"title":"BPS price"}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","type","unit_name","min_committed_count","min_amount","max_amount","metering_interval_type","metering_interval","bill_usage_difference","metering_period_started_at","metering_period_ends_at","prices"],"title":"Dynamic product"},"SubscriptionProductCredit":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"type":{"type":"string","enum":["credit"]},"unit_name":{"type":["string","null"],"description":"Name of the unit.","example":"hour"},"count":{"type":"number","description":"Number of product units.","example":2},"prices":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the product. If fixed amount, only one price is available."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire"},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","type","unit_name","count","prices","credits_expiration_in_days"],"title":"Credit product"},"SubscriptionProductBundle":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"attached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been attached to the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"detached_at":{"type":["string","null"],"format":"date-time","description":"Date on which the product has been detached from the subscription. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-15T00:00:00Z"},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period started. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-15T00:00:00Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"Date on which the current period will end. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription invoice will be generated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-02-15T00:00:00Z"},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"title":"Period","example":{"period":"months","count":1}},{"type":"null"}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":["string","null"],"enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"type":{"type":"string","enum":["bundle"]},"count":{"type":"number","description":"Number of product units.","example":2},"display_mode":{"type":"string","enum":["single_line","ventilated"],"description":"How bundle items are displayed on invoices"},"prices":{"type":"array","items":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/PriceVolume"},{"title":"Volume price"}]},{"allOf":[{"$ref":"#/components/schemas/PricePackaged"},{"title":"Packaged price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBulk"},{"title":"Bulk price"}]},{"allOf":[{"$ref":"#/components/schemas/PriceBundle"},{"title":"Bundle price"}]}]},"description":"Price tiers of the product. If fixed amount, only one price is available."}},"required":["id","name","description","description_display_interval_dates","attached_at","detached_at","current_period_started_at","current_period_ends_at","next_payment_at","payment_interval","payment_schedule","type","count","display_mode","prices"],"title":"Bundle product"},"Subscription":{"type":"object","properties":{"id":{"type":"string","description":"Subscription ID.","example":"sub_B6ClkdqNqVNBgY"},"name":{"type":["string","null"],"description":"Subscription custom name.","example":"Yearly subscription"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"status":{"type":"string","enum":["active","cancelled","draft","errored","paused","pending","voided"],"description":"\nSubscription status.\n\n- `draft`: The subscription is being created, this status is only used in the subscription assignation flow of the UI version of Hyperline.\n- `pending`: The subscription has been created and won't be charged until it is activated.\n- `active`: The subscription is running and will be invoiced at the next payment date.\n- `paused`: The subscription's payment collection is paused.\n- `cancelled`: The subscription has been canceled from an active state.\n- `voided`: The subscription has been voided directly from the pending state.\n- `errored`: We attempted 4 times (3 retries) and failed to charge a subscription's invoice, see [Handling payment errors](https://docs.hyperline.co/docs/payments/payment-errors). We consider the subscription as inactive (as the customer failed to pay you) meaning that we won't invoice the customer in the future nor collect payment. You can choose to reactivate it manually.\n ","example":"active"},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order."},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":["string","null"],"description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"plan_id":{"type":["string","null"],"description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":["string","null"],"description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"checkout_session_id":{"type":["string","null"],"description":"ID of the checkout session."},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM.","example":null},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"commitment_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"type":"boolean","description":"Deprecated field, please use `contract_terms`.","example":true},"renew_for":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1}},"activation_strategy":{"type":["string","null"],"enum":["start_date","manually","checkout","quote","contract_start_date"],"description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z","deprecated":true},"contract_start":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z"},"contract_end":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"paused_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription was paused. Only applies to `paused` status. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"reactivate_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will be automatically reactivated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":["string","null"],"enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":["number","null"],"description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"cancellation_reason":{"type":["string","null"],"description":"Reason for the cancellation."},"estimated_arr":{"type":["number","null"],"description":"Estimated Annual Recurring Revenue generated by the subscription."},"contract_value":{"type":["number","null"],"description":"Contract value of the subscription. This value is overridable by the user."},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"next_payment_at":{"type":["string","null"],"format":"date-time","description":"Date on which the next subscription payment will occur. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"next_payment_amount":{"type":["number","null"],"description":"The amount of the next subscription payment. The system will generate an invoice to pay on the `next_payment_at`."},"renews_at":{"type":["string","null"],"format":"date-time","description":"Next subscription commitment renewal date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"current_phase_id":{"type":["string","null"],"description":"ID of the current subscription phase."},"display_shipping_details":{"type":["boolean","null"],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context.","example":null},"custom_properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"},"generate_document":{"type":"boolean","description":"Generate documents instead of invoices for the subscription."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"type":"boolean","description":"If `generate_document` is turned on, will add taxes to document."},"generate_draft_invoices":{"type":"boolean","description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"created_at":{"type":"string","format":"date-time","description":"Subscription creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons to be applied to the prices of subscription products."},"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}},"description":"References to this subscription in external providers (billing, CRM, etc)."}},"required":["id","name","currency","status","purchase_order","customer_id","invoicing_entity_id","plan_id","template_id","checkout_session_id","crm_opportunity_id","minimum_invoice_fee","commitment_interval","renew_automatically","renew_for","activation_strategy","starts_at","contract_start","contract_end","initial_billing_at","paused_at","reactivate_at","cancel_at","cancellation_strategy","cancellation_amount","cancellation_reason","estimated_arr","contract_value","current_period_started_at","current_period_ends_at","next_payment_at","next_payment_amount","renews_at","current_phase_id","display_shipping_details","properties","custom_properties","invoice_schedule","generate_document","document_name","add_tax_to_document","generate_draft_invoices","invoice_custom_note","created_at","updated_at","products","coupons","integrations"]},"CheckoutSession":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Checkout session ID.","example":"che_hEUPdVG7IgjpW1"},"status":{"type":"string","enum":["opened","completed","cancelled","errored"],"description":"Checkout session current status.","example":"opened"},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated"]},"description":"Types of payment method available on the checkout session.","example":["card"]},"redirect_url":{"type":["string","null"],"format":"uri","description":"URL to which the user is automatically redirected after the completion of the checkout.","example":"https://app.hyperline.co/callback/checkout"},"send_to":{"type":["object","null"],"properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link.","example":"josh@alpeak.com"},"message":{"type":["string","null"],"description":"Custom message to include in the email send. If not provided, we will use a generic one.","example":null}},"required":["email","message"]},"url":{"type":"string","format":"uri","description":"URL to access the checkout session. Only defined if the status is `opened`.","example":"https://billing.hyperline.co/checkout/che_hEUPdVG7IgjpW1"}},"required":["id","status","available_payment_methods","redirect_url","send_to","url"],"description":"Checkout session of the subscription."},"SubscriptionDetails":{"allOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"Phases of the subscription."},"quote":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the quote from which the subscription was created.","example":"quo_38YwqvItBH3d8a"},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","approved","pending_signature","voided","signed"],"description":"Status of the quote from which the subscription was created.","example":"signed"}},"required":["id","status"]},"plan":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV"},"name":{"type":"string","description":"Name of the plan that the subscription is linked to.","example":"My example plan"}},"required":["id","name"]},"template":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Name of the template that the subscription is linked to.","example":"My example template"},"configurationId":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}},"required":["id","name","configurationId"]},"checkout_session":{"$ref":"#/components/schemas/CheckoutSession"},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"],"description":"Payment method type used to pay the subscription."},"payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Payment method details used to pay the subscription."}]},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T22:00:00.000Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-30T21:59:59.999Z"}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration","current_period_started_at","current_period_ends_at"],"description":"Contract terms linked to the subscription."}},"required":["phases","quote","plan","template","checkout_session","payment_method_type","payment_method","contract_terms"]}]},"CancelSubscription":{"type":"object","properties":{"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"reason":{"type":"string","description":"Reason for the cancellation."},"pro_rata":{"type":"boolean","description":"Indicates if the cancel should refund the customer using a pro rata strategy."}}},"RenewSubscription":{"type":"object","properties":{"up_to":{"type":"string","format":"date-time","description":"The date up to which the subscription should be renewed (exclusive).","example":"2024-12-20T16:04:11Z"}},"required":["up_to"]},"CreateSubscription":{"allOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"}},"required":["customer_id"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","checkout"],"description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]}}},"required":["activation_strategy"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}},{"type":"object","properties":{"payment_method_strategy":{"type":"string","enum":["current","external","new"],"description":"\nPayment method strategy used to bill the subscription. By default, the current payment method of the customer will be used.\n\n- `new`: Ask the customer for a new payment method. The customer can fill in their payment method either on the subscription's checkout session or on their portal page.\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payments of the subscription outside of Hyperline.\n","example":"current"},"available_payment_method_types":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","transfer"]},"minItems":1,"description":"Set the allowed types of payment methods for the customer. Only applies to the `new` payment method strategy."},"create_setup_phase":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, no longer needed. We recommend not using it going forward.","deprecated":true},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. Only applies when creating a subscription from a plan.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which the user is automatically redirected after the completion of the checkout."}},"description":"Checkout session of the subscription."}}}],"title":"Without phases","description":"\nIf a `template_id` or a `template_configuration_id` is specified, the subscription will be created from scratch, and the template will only be referenced for reporting purposes.\n\nUse `From template` option to create a subscription from a template.\n"},{"allOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"default":"anniversary","description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"]},{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}},{"type":"object","properties":{"payment_method_strategy":{"type":"string","enum":["current","external","new"],"description":"\nPayment method strategy used to bill the subscription. By default, the current payment method of the customer will be used.\n\n- `new`: Ask the customer for a new payment method. The customer can fill in their payment method either on the subscription's checkout session or on their portal page.\n- `current`: Use the current default payment method of the customer.\n- `external`: Manage the payments of the subscription outside of Hyperline.\n","example":"current"},"available_payment_method_types":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","transfer"]},"minItems":1,"description":"Set the allowed types of payment methods for the customer. Only applies to the `new` payment method strategy."},"create_setup_phase":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, no longer needed. We recommend not using it going forward.","deprecated":true},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles. Only applies when creating a subscription from a plan.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which the user is automatically redirected after the completion of the checkout."}},"description":"Checkout session of the subscription."}}}],"title":"With phases","description":"\nIf a `template_id` or a `template_configuration_id` is specified, the subscription will be created from scratch, and the template will only be referenced for reporting purposes.\n\nUse `From template` option to create a subscription from a template.\n"},{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to which we'll automatically send a message with the checkout link."},"message":{"type":"string","description":"Custom message to include in the email send. If not provided, we will use a generic one."}},"required":["email"]},"redirect_url":{"type":"string","format":"uri","description":"URL to which the user is automatically redirected after the completion of the checkout."}},"description":"Checkout session of the subscription."}},"required":["template_id"],"additionalProperties":{},"title":"From template","description":"\nIf a `template_id` is specified without a `template_configuration_id`, the template configuration will be automatically retrieved from the customer details.\n\nIf you want to customize subscription content, use `Without phases` or `With phases` option.\n"}]}]},"PaginatedSubscription":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"List of Subscription."}},"required":["meta","data"]},"PaginatedSubscriptionTransition":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","quote_signature","scheduled_after_quote_signature"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]},"description":"List of SubscriptionTransition."}},"required":["meta","data"]},"LiveBilling":{"type":"object","properties":{"total_amount":{"type":"number"},"total_discount":{"type":"number"},"fixed_amount":{"type":"number"},"billing_items":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"total_amount":{"type":"number"},"original_amount":{"type":"number"},"discount_amount":{"type":["number","null"]},"item_name":{"type":"string"},"tiers":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":["number","null"]},"amount":{"type":"number"},"total_amount":{"type":"number"},"count":{"type":"number"}},"required":["from","to","amount","total_amount","count"]}}},"required":["id","total_amount","original_amount","discount_amount","item_name","tiers"]}},"coupons":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]},"discount_amount":{"type":"number"},"item_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","discount_amount","item_ids"]}}},"required":["total_amount","total_discount","fixed_amount","billing_items","coupons"]},"PaginatedSubscriptionPhase":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"List of SubscriptionPhase."}},"required":["meta","data"]},"UpdateSubscription":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Subscription custom name."},"purchase_order":{"type":["string","null"],"description":"Reference to the purchase order."},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments."},"crm_opportunity_id":{"type":["string","null"],"description":"ID of the related opportunity/deal in the connected CRM."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"},"estimated_arr":{"type":["number","null"],"description":"Estimated Annual Recurring Revenue generated by the subscription."},"contract_value":{"type":["number","null"],"description":"Contract value of the subscription. This value is overridable by the user."},"starts_at":{"type":["string","null"],"format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":["string","null"],"format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"name":{"type":["string","null"],"description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":["string","null"],"description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","from","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","amount","unit_count","to"]},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"$ref":"#/components/schemas/MeteringFilter"}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"]},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"]}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"fee","amount":200}]},"count":{"type":["number","null"],"minimum":0,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":["string","null"],"description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":["number","null"],"minimum":0,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"]},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"]},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":["string","null"],"description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"]}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."}}},"description":"Array of subscription phases. Existing pending phases will be replaced by the ones in the array."},"contract_terms":{"anyOf":[{"allOf":[{"type":"object","properties":{"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]},{"type":"null"}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}]},{"type":"null"}],"description":"Contract terms to update."}}},"SimulateInvoiceDetails":{"anyOf":[{"allOf":[{"$ref":"#/components/schemas/Invoice"},{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"object","properties":{"entity_id":{"type":"string","description":"ID of the entity in the provider."},"provider_name":{"type":"string","enum":["adyen","stripe","mollie","gocardless","airwallex","salesforce","hubspot","attio","xero","pennylane","zoho-books","exact-online","quickbooks","netsuite","anrok","chargebee","slack","plain","zendesk","pylon","intercom","claap"],"description":"Provider name."},"provider_account_id":{"type":"string","description":"ID of the connected provider account."}},"required":["entity_id","provider_name","provider_account_id"],"description":"Reference to the entity in an external provider.","example":{"entity_id":"123456789","provider_name":"stripe","provider_account_id":"acc_1234567890"}}}},"required":["integrations"]}]},{"type":"null"}],"description":"The invoice that would be emitted at transition time. Null if no transition invoice is emitted (for example when calculation method is `do_not_charge`)."},"TaxRate":{"type":"object","properties":{"id":{"type":"string","description":"Tax rate ID.","example":"taxr_YfiSnLIYORD9VN"},"name":{"type":"string","description":"Name of the tax rate.","example":"VAT"},"description":{"type":["string","null"],"description":"Internal description of the tax rate.","example":"Standard VAT"},"code":{"type":"string","description":"Tax rate code identifier.","example":"STAND_VAT"},"rate":{"type":"number","description":"The percentage rate of the tax.","example":20},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity to which the tax rate is attached.","example":"ive_jerrb484RHn"},"created_at":{"type":"string","format":"date-time","description":"Tax rate creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-03T12:32:22Z"},"updated_at":{"type":"string","format":"date-time","description":"Tax rate last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-06-07T18:13:25Z"}},"required":["id","name","description","code","rate","invoicing_entity_id","created_at","updated_at"]},"PaginatedTaxRate":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxRate"},"description":"List of TaxRate."}},"required":["meta","data"]},"App":{"type":"object","properties":{"id":{"type":"string","description":"App ID"},"name":{"type":"string","description":"App name"},"description":{"type":["string","null"],"description":"App description"},"logo_uri":{"type":["string","null"],"description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string"},"description":"List of URLs whitelisted to use as a callback after authentication."},"client_id":{"type":"string","description":"OAuth client ID"}},"required":["id","name","description","logo_uri","callbacks","client_id"]},"CreateApp":{"type":"object","properties":{"name":{"type":"string","description":"App name"},"description":{"type":"string","description":"App description"},"logo_uri":{"type":"string","format":"uri","description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string","format":"uri"},"description":"List of URLs whitelisted to use as a callback after authentication."}},"required":["name","callbacks"]},"UpdateApp":{"type":"object","properties":{"name":{"type":"string","description":"App name"},"description":{"type":["string","null"],"description":"App description"},"logo_uri":{"type":["string","null"],"format":"uri","description":"App logo URL"},"callbacks":{"type":"array","items":{"type":"string","format":"uri"},"description":"List of URLs whitelisted to use as a callback after authentication."}},"required":["name","description","logo_uri","callbacks"]},"UserRole":{"type":"object","properties":{"id":{"type":"string","description":"Role ID.","example":"rol_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Role name.","example":"Admin"},"description":{"type":["string","null"],"description":"Role description.","example":null},"is_default":{"type":"boolean","description":"Whether this is the default role assigned to new users.","example":false}},"required":["id","name","description","is_default"]},"PaginatedUserRole":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserRole"},"description":"List of UserRole."}},"required":["meta","data"]},"User":{"type":"object","properties":{"id":{"type":"string","description":"User ID.","example":"usr_DKL4Xcb5VSa8CQ"},"email":{"type":"string","format":"email","description":"User email address.","example":"john@example.com"},"first_name":{"type":["string","null"],"description":"User first name.","example":"John"},"last_name":{"type":["string","null"],"description":"User last name.","example":"Doe"},"picture_url":{"type":["string","null"],"format":"uri","description":"User profile picture URL.","example":null},"role_id":{"type":["string","null"],"description":"ID of the role assigned to the user.","example":"rol_DKL4Xcb5VSa8CQ"},"is_account_owner":{"type":"boolean","description":"Whether the user is the account owner.","example":false}},"required":["id","email","first_name","last_name","picture_url","role_id","is_account_owner"]},"PaginatedUser":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/User"},"description":"List of User."}},"required":["meta","data"]},"PhaseContractValue":{"type":"object","properties":{"phase_id":{"type":"string","description":"Subscription phase ID.","example":"subpha_abc123"},"phase_name":{"type":["string","null"],"description":"Subscription phase name.","example":"Standard"},"phase_type":{"type":"string","enum":["setup","trial","standard"],"description":"Subscription phase type.","example":"standard"},"starts_at":{"type":["string","null"],"description":"Phase start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":["string","null"],"description":"Phase end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"amount":{"type":"number","description":"Phase contract value in cents.","example":120000}},"required":["phase_id","phase_name","phase_type","starts_at","ends_at","amount"]},"PeriodBucket":{"type":"object","properties":{"period":{"type":"string","description":"Period label, e.g. \"2025\", \"2025-Q1\", or \"2025-01\".","example":"2025"},"starts_at":{"type":"string","description":"Period start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":"string","description":"Period end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"amount":{"type":"number","description":"Prorated amount for this period in cents.","example":120000}},"required":["period","starts_at","ends_at","amount"]},"PhaseRecurringValue":{"type":"object","properties":{"phase_id":{"type":"string","description":"Subscription phase ID.","example":"subpha_abc123"},"phase_name":{"type":["string","null"],"description":"Subscription phase name.","example":"Standard"},"starts_at":{"type":["string","null"],"description":"Phase start date in ISO 8601 format.","example":"2025-01-01T00:00:00.000Z"},"ends_at":{"type":["string","null"],"description":"Phase end date in ISO 8601 format.","example":"2025-12-31T23:59:59.999Z"},"annual_value":{"type":"number","description":"Annualized recurring value for this phase in cents.","example":100000},"phase_amount":{"type":"number","description":"Recurring value for the full phase duration in cents.","example":100000}},"required":["phase_id","phase_name","starts_at","ends_at","annual_value","phase_amount"]},"SubscriptionValuation":{"type":"object","properties":{"contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total contract value in the smallest currency unit (cents).","example":120000},"invoiced":{"type":"number","description":"Amount already invoiced in cents.","example":30000},"remaining":{"type":"number","description":"Amount still to be invoiced in cents.","example":90000},"by_phase":{"type":"array","items":{"$ref":"#/components/schemas/PhaseContractValue"},"description":"Contract value broken down by subscription phase."},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Contract value broken down by period. Only present when `granularity` is provided."}},"required":["total","invoiced","remaining","by_phase"],"description":"Total expected invoicing over the entire contract."},"recurring_contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total annualized recurring contract value in cents.","example":100000},"by_phase":{"type":"array","items":{"$ref":"#/components/schemas/PhaseRecurringValue"},"description":"Recurring contract value broken down by subscription phase."},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Recurring contract value broken down by period. Only present when `granularity` is provided."}},"required":["total","by_phase"],"description":"Steady-state recurring revenue excluding setup and trial phases."},"arr":{"type":"object","properties":{"fixed":{"type":"number","description":"Fixed ARR from flat fees, committed seats, and recurring credits in cents.","example":100000},"variable":{"type":"object","properties":{"current":{"type":"number","description":"Variable ARR from dynamic product overage and uncommitted seat usage in cents.","example":5000},"averaged":{"type":"number","description":"Two-period average of variable ARR in cents.","example":4500}},"required":["current","averaged"],"description":"Variable ARR components."}},"required":["fixed","variable"],"description":"Annual Recurring Revenue."}},"required":["contract_value","recurring_contract_value","arr"]},"CurrencyValuation":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code.","example":"USD"},"subscriptions":{"type":"array","items":{"type":"object","properties":{"subscription_id":{"type":"string","description":"Subscription ID.","example":"sub_abc123"},"valuation":{"$ref":"#/components/schemas/SubscriptionValuation"}},"required":["subscription_id","valuation"]},"description":"Individual subscription valuations within this currency."},"totals":{"type":"object","properties":{"contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total contract value in the smallest currency unit (cents).","example":120000},"invoiced":{"type":"number","description":"Amount already invoiced in cents.","example":30000},"remaining":{"type":"number","description":"Amount still to be invoiced in cents.","example":90000}},"required":["total","invoiced","remaining"]},"recurring_contract_value":{"type":"object","properties":{"total":{"type":"number","description":"Total annualized recurring contract value in cents.","example":100000}},"required":["total"]},"arr":{"type":"object","properties":{"fixed":{"type":"number","description":"Fixed ARR from flat fees, committed seats, and recurring credits in cents.","example":100000},"variable":{"type":"object","properties":{"current":{"type":"number","description":"Variable ARR from dynamic product overage and uncommitted seat usage in cents.","example":5000},"averaged":{"type":"number","description":"Two-period average of variable ARR in cents.","example":4500}},"required":["current","averaged"]}},"required":["fixed","variable"]},"by_period":{"type":"array","items":{"$ref":"#/components/schemas/PeriodBucket"},"description":"Contract value broken down by period. Only present when `granularity` is provided."}},"required":["contract_value","recurring_contract_value","arr"],"description":"Aggregated totals across all subscriptions for this currency."}},"required":["currency","subscriptions","totals"]},"CustomerValuation":{"type":"object","properties":{"by_currency":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyValuation"},"description":"Valuations grouped by currency."}},"required":["by_currency"]},"WalletSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in `active` state and with money.","example":true},"allow_free_credits":{"type":"boolean","description":"Allow top up for free amounts on wallets.","example":true},"allow_topup_on_portal":{"type":"boolean","description":"Allow wallet top up on customer's portal.","example":false},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.","example":[]},"updated_at":{"type":["string","null"],"format":"date-time","description":"Last edition date of the wallet settings.","example":"2024-12-20T16:04:11Z"}},"required":["enabled","allow_free_credits","allow_topup_on_portal","product_ids","updated_at"]},"UpdateWalletSettings":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in `active` state and with money.","example":true},"allow_free_credits":{"type":"boolean","description":"Allow top up for free amounts on wallets.","example":true},"allow_topup_on_portal":{"type":"boolean","description":"Allow wallet top up on customer's portal.","example":false},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.","example":[]}}},"Wallet":{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Wallet ID.","example":"wal_PPpxP5d3uvgiTT"},"customer_id":{"type":"string","description":"Wallet customer ID.","example":"cus_QalW2vTAdkR6IY"},"state":{"type":"string","enum":["active","paused"],"description":"Wallet state.","example":"active"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"},"balance":{"type":"object","properties":{"amount":{"type":"number","description":"Available amount on the wallet. Expressed in currency's smallest unit.","example":2400}},"required":["amount"],"description":"Wallet actual balance. Expressed in currency's smallest unit."},"projected_balance":{"type":"object","properties":{"amount":{"type":"number","description":"Available amount on the wallet. Expressed in currency's smallest unit.","example":2400}},"required":["amount"],"description":"Wallet projected balance. Automatically computed by Hyperline depending on the customer's active subscriptions and future payments. Expressed in currency's smallest unit."},"created_at":{"type":"string","format":"date-time","description":"Wallet creation date.","example":"2024-12-20T16:04:11Z"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}},"required":["id","customer_id","state","currency","balance","projected_balance","created_at","low_projected_balance_threshold"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}},"required":["is_auto_load_enabled"]}]}]},"PaginatedWallet":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"},"description":"List of Wallet."}},"required":["meta","data"]},"CreateWallet":{"allOf":[{"type":"object","properties":{"customer_id":{"type":"string","description":"Wallet customer ID.","example":"cus_QalW2vTAdkR6IY"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}},"required":["customer_id"]},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}}}]}]},"UpdateWallet":{"allOf":[{"type":"object","properties":{"state":{"type":"string","enum":["active","paused"],"description":"Wallet state.","example":"active"},"low_projected_balance_threshold":{"type":["number","null"],"description":"Threshold indicating a low level of wallet projected balance.","example":10000}}},{"anyOf":[{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_reset":{"type":"boolean","description":"Indicates if the wallet amount must be reset before auto-load.","example":false},"auto_load_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval indicating how often the wallet is auto-loaded.","example":{"period":"months","count":1}},"auto_load_next_date":{"type":"string","format":"date-time","description":"Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["auto_load_type","auto_load_amount","auto_load_reset","auto_load_interval","auto_load_next_date"]}]},{"allOf":[{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[true],"description":"Indicates if the wallet is auto-loaded regularly.","example":true}},"required":["is_auto_load_enabled"]},{"type":"object","properties":{"auto_load_type":{"type":"string","enum":["free","paid"],"description":"Indicates if the auto-load is free or paid.","example":"paid"},"auto_load_amount":{"type":"number","description":"Amount to auto-load. Expressed in currency's smallest unit.","example":20000},"auto_load_threshold":{"type":"number","description":"Threshold to auto-load. Expressed in currency's smallest unit.","example":5000}},"required":["auto_load_type","auto_load_amount","auto_load_threshold"]}]},{"type":"object","properties":{"is_auto_load_enabled":{"type":"boolean","enum":[false],"description":"Indicates if the wallet is auto-loaded regularly.","example":false}}}]}]},"LoadWallet":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to be loaded onto the wallet. A corresponding invoice to pay will be generated. Expressed in currency's smallest unit."},"amount_free":{"type":"number","description":"Amount free/offered to be loaded onto the wallet. No invoice is generated. Expressed in currency's smallest unit."},"document_status":{"type":["string","null"],"enum":["draft"],"description":"Indicates the status of the document (credit note in case of free top-up or invoice)"}}},"WalletTransaction":{"type":"object","properties":{"id":{"type":"string","description":"Wallet transaction ID.","example":"walt_FCihRDLYhKpSpL"},"type":{"type":"string","enum":["credit_free","credit_paid","debit"],"description":"Wallet transaction type.","example":"credit_paid"},"amount":{"type":"number","description":"Amount of the wallet transaction.","example":12000},"invoice_id":{"type":["string","null"],"description":"Generated invoice ID for the transaction. Only applies for `credit_paid` and `debit`.","example":null},"original_transaction_id":{"type":["string","null"],"description":"The ID of the original wallet transaction that was reverted by this transaction.","example":null},"reverted_by":{"type":["string","null"],"description":"The ID of the wallet transaction that reverted this transaction.","example":null},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["id","type","amount","invoice_id","original_transaction_id","reverted_by","created_at"]},"PaginatedWalletTransaction":{"type":"object","properties":{"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total of existing items.","example":1},"taken":{"type":"number","description":"Number of items returned.","example":1},"skipped":{"type":"number","description":"Number of items skipped.","example":0}},"required":["total","taken","skipped"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WalletTransaction"},"description":"List of WalletTransaction."}},"required":["meta","data"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"Webhook endpoint ID.","example":"ep_1srOrx2ZWZBpBUvZwXKQmoEYga2"},"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"rate_limit":{"type":["number","null"],"description":"Webhook rate limit (per second)."},"event_types":{"type":["array","null"],"items":{"type":"string","enum":["event.price_calculated","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","credit_note.ready","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]},"created_at":{"type":"string","format":"date-time","description":"Webhook creation date.","example":"2024-01-20T16:04:11Z"}},"required":["id","description","url","rate_limit","event_types","created_at"]},"PaginatedWebhookEndpoint":{"type":"object","properties":{"meta":{"type":"object","properties":{"iterator":{"type":["string","null"]}},"required":["iterator"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["meta","data"]},"WebhookMessage":{"type":"object","properties":{"id":{"type":"string","description":"Webhook message ID.","example":"msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"},"event_id":{"type":"string","description":"Unique ID corresponding to the event occurrence in the Hyperline system.","example":"evt_9avP4zLks7L1yh"},"payload":{"anyOf":[{"type":"object","properties":{"event_type":{"type":"string","enum":["event.price_calculated","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","credit_note.ready","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed"],"description":"Event type."},"data":{"type":"object","properties":{},"additionalProperties":{},"description":"Depends on the type of event, see the [event catalog](https://app.hyperline.co/app/settings/webhooks) for more details."}},"required":["event_type","data"]},{"type":"string","enum":["EXPUNGED"]}],"description":"Webhook message payload."},"sent_at":{"type":"string","format":"date-time","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"}},"required":["id","event_id","payload","sent_at"]},"PaginatedWebhookMessage":{"type":"object","properties":{"meta":{"type":"object","properties":{"iterator":{"type":["string","null"]}},"required":["iterator"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookMessage"}}},"required":["meta","data"]}},"parameters":{}},"paths":{"/v1/custom-properties":{"get":{"operationId":"listCustomProperties","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"List custom properties","description":"Retrieve all custom properties previously created.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomProperty"}}}}}},"post":{"operationId":"createCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Create custom property","description":"Create a new custom property.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","boolean","number","text","select","multi_select"]},"slug":{"type":"string"},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription"]}},"api_only":{"type":["boolean","null"],"default":false},"authorized_values":{"type":["array","null"],"items":{"type":"string"}}},"required":["name","type","slug","entities"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProperty"}}}}}}},"/v1/custom-properties/{id}":{"put":{"operationId":"updateCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Update custom property","description":"Update an existing custom property.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","boolean","number","text","select","multi_select"]},"slug":{"type":"string"},"entities":{"type":"array","items":{"type":"string","enum":["customer","product","plan","quote","subscription"]}},"api_only":{"type":["boolean","null"],"default":false},"authorized_values":{"type":["array","null"],"items":{"type":"string"}}},"required":["name","type","slug","entities"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomProperty"}}}}}},"delete":{"operationId":"deleteCustomProperty","tags":["Custom properties"],"security":[{"bearer":[]}],"summary":"Delete custom property","description":"Delete an existing custom property.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/coupons":{"get":{"operationId":"listCoupons","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"List coupons","description":"Retrieve existing coupons.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCoupon"}}}}}},"post":{"operationId":"createCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Create coupon","description":"Create a new coupon.","requestBody":{"description":"Create coupon payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCoupon"}}}},"responses":{"201":{"description":"The newly created coupon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}}}}},"/v1/coupons/{id}":{"get":{"operationId":"getCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Get coupon","description":"Retrieve the details of an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Coupon"},{"type":"object","properties":{"deletedAt":{"type":["string","null"],"format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}},"required":["deletedAt"]}]}}}},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Update coupon","description":"Update the details of an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCoupon"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon"}}}},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCoupon","tags":["Coupons"],"security":[{"bearer":[]}],"summary":"Delete coupon","description":"Delete an existing coupon.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Customer deleted"},"404":{"description":"Coupon not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/promotion-codes":{"get":{"operationId":"listPromotionCodes","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"List promotion codes","description":"Retrieve existing promotion codes.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"coupon_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromotionCode"}}}}}},"post":{"operationId":"createPromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Create promotion code","description":"Create a new promotion code.","requestBody":{"description":"Create promotion code payload","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["integer","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["integer","null"],"minimum":1,"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"default":false,"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["code","coupon_id"]}}}},"responses":{"201":{"description":"The newly created promotion code","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}}}}},"/v1/promotion-codes/{id}":{"get":{"operationId":"getPromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Get promotion code","description":"Retrieve the details of an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updatePromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Update promotion code","description":"Update the details of an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["integer","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["integer","null"],"minimum":1,"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"default":false,"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Promotion code ID.","example":"promo_DKL4Xcb5VSa8CQ"},"code":{"type":"string","description":"Promotion code.","example":"PROMO123"},"coupon_id":{"type":"string","description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"client_id":{"type":"string","description":"Client ID.","example":"cli_DKL4Xcb5VSa8CQ"},"customer_id":{"type":["string","null"],"description":"If a `customer_id` is set, this promotion code will only be available to this customer.","example":"cus_DKL4Xcb5VSa8CQ"},"plan_id":{"type":["string","null"],"description":"If a `plan_id` is set, this promotion code will only be available for subscriptions with this plan ID.","example":"plan_DKL4Xcb5VSa8CQ"},"product_id":{"type":["string","null"],"description":"If a `product_id` is set, this promotion code will only be available for subscriptions with this product ID.","example":"itm_DKL4Xcb5VSa8CQ"},"created_at":{"type":"string","format":"date-time","description":"Promotion code creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Promotion code last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2021-01-01T00:00:00.000Z"},"expires_at":{"type":["string","null"],"format":"date-time","description":"Date and time when the promotion code expires.","example":"2021-01-01T00:00:00.000Z"},"max_redemptions":{"type":["number","null"],"description":"Maximum number of redemptions for the promotion code. Independent from coupon's max redemptions.","example":10},"current_redemptions":{"type":["number","null"],"description":"Current number of redemptions for the promotion code.","example":0},"duration_count":{"type":["number","null"],"description":"Duration count applied to the subscription for the promotion code. 0 or null for `once`","example":1},"duration_period":{"type":["string","null"],"enum":["once","days","weeks","months","years"],"description":"Duration period applied to the subscription for the promotion code for the promotion code. Valid values are `once`, `days`, `weeks`, `months`, `years`","example":"months"},"only_for_first_time_order":{"type":["boolean","null"],"description":"Whether the promotion code is only for first time orders. Defaults to `false`","example":false}},"required":["id","code","coupon_id","client_id","customer_id","plan_id","product_id","created_at","updated_at","expires_at","max_redemptions","current_redemptions","duration_count","duration_period","only_for_first_time_order"]}}}},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deletePromotionCode","tags":["Coupons > Promotion codes"],"security":[{"bearer":[]}],"summary":"Delete promotion code","description":"Delete an existing promotion code.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Promotion code deleted"},"404":{"description":"Promotion code not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products":{"get":{"operationId":"listProducts","tags":["Products"],"security":[{"bearer":[]}],"summary":"List products","description":"Retrieve existing products.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProduct"}}}}}},"post":{"operationId":"createProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Create product","description":"Create a new product.","requestBody":{"description":"Create product payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProduct"}}}},"responses":{"201":{"description":"The newly created product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}}}},"/v1/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Get product","description":"Retrieve the details of an existing product. Only the first 50 price configurations are returned, to retrieve all of them use `GET /v1/price-configurations`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}}},"put":{"operationId":"updateProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Update product","description":"Update the details of an existing product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update product payload","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Product name.","example":"Product name"},"description":{"type":["string","null"],"description":"Product description.","example":"Product internal description"},"public_description":{"type":["string","null"],"description":"Public description of the product.","example":"Product public description"},"translations":{"type":["object","null"],"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]},"public_description":{"type":["string","null"]}}},"description":"Product name and description translations."},"is_available_on_demand":{"type":"boolean"},"is_available_on_subscription":{"type":"boolean"},"properties":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]}},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"accounting":{"$ref":"#/components/schemas/ProductAccounting"}},"required":["name"]}}}},"responses":{"200":{"description":"The newly created product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products/{id}/archive":{"put":{"operationId":"archiveProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Archive product","description":"Archive an existing product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/products/{id}/unarchive":{"put":{"operationId":"unarchiveProduct","tags":["Products"],"security":[{"bearer":[]}],"summary":"Unarchive product","description":"Unarchive an archived product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Product unarchived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-configurations":{"get":{"operationId":"listPriceConfigurations","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"List price configurations","description":"Retrieve existing price configurations.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"price_book_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPriceConfiguration"}}}}}},"post":{"operationId":"createPriceConfiguration","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Create price configuration","description":"Create a new price configuration on an existing product.","requestBody":{"description":"Create price configuration payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceConfiguration"}}}},"responses":{"201":{"description":"The newly created price configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceConfiguration"}}}},"404":{"description":"Product not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-configurations/{id}/prices":{"put":{"operationId":"updatePrices","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Update prices","description":"Update prices of an existing price configuration.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Prices payload","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PriceFee"},"maxItems":1,"description":"Price tiers of the price configuration. If fixed amount, only one price is available."}}}},"responses":{"200":{"description":"The updated price configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceConfiguration"}}}}}}},"/v1/price-configurations/{id}":{"delete":{"operationId":"deletePriceConfiguration","tags":["Price configurations"],"security":[{"bearer":[]}],"summary":"Delete price configuration","description":"Delete an existing price configuration.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/bank-accounts":{"get":{"operationId":"listBankAccounts","tags":["Bank Accounts"],"security":[{"bearer":[]}],"summary":"List bank accounts","description":"Retrieve existing bank accounts.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedBankAccount"}}}}}}},"/v1/bank-accounts/{id}":{"get":{"operationId":"getBankAccount","tags":["Bank Accounts"],"security":[{"bearer":[]}],"summary":"Get bank account","description":"Retrieve a specific bank account by ID.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"404":{"description":"Bank account not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"List invoices","description":"Retrieve existing invoices. By default, invoices with status `open` are not included.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"Sort direction.","example":"desc"},"required":false,"description":"Sort direction.","name":"order","in":"query"},{"schema":{"type":"string","enum":["created_at","emitted_at"],"description":"Field used to sort the results."},"required":false,"description":"Field used to sort the results.","name":"sort","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["invoice","refund","document","child_invoice_ref","child_creditnote_ref"]},{"type":"string","description":"invoice,refund"}]},"required":false,"name":"type__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","partially_paid","outstanding","refunded","late","draft","voided","closed","uncollectible"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","open","grace_period","to_pay","to_reconcile","error","paid","partially_paid","outstanding","refunded","late","draft","voided","closed","uncollectible"]},{"type":"string","description":"all,open"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"subscription_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_number__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_invoice_number__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"line_item_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_start__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"period_end__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"emission_date__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"due_date__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoice"}}}}}},"post":{"operationId":"createInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create invoice","description":"Create a new invoice.","requestBody":{"description":"Create invoice payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoice"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v1/invoices/{id}/credit-notes":{"post":{"operationId":"createCreditNote","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create credit note","description":"Create a credit note for an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create credit note payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditNote"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v2/invoices/batch":{"post":{"operationId":"createInvoices","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Create invoices","description":"Create invoices async in batch. Results can be tracked via webhooks with the `invoice.batch.creation_succeeded` and `invoice.batch.creation_failed` events.","requestBody":{"description":"Create invoices payload.","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Optional identifier for the batch request. If not provided, a unique ID will be generated.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"},"invoices":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateInvoice"},{"type":"object","properties":{"batch_invoice_id":{"type":"string","description":"A unique identifier for the invoice in the batch.","example":"invoice-123"}},"required":["batch_invoice_id"]}]},"maxItems":50,"description":"List of invoices to create (max 50)."}},"required":["invoices"]}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"batch_id":{"type":"string","description":"Identifier of the batch request.","example":"f65f58f3-ecb0-4711-be22-1e64102a380d"}},"required":["batch_id"]}}}}}}},"/v1/invoices/{id}/validate":{"post":{"operationId":"validateInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Validate draft invoice","description":"Send a draft invoice for payment, set the status to `to_pay` and its number. This is not reversible.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v1/invoices/{id}/charge":{"post":{"operationId":"chargeInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Charge invoice","description":"Manually trigger the payment of the invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_method_id":{"type":"string","description":"Payment method used to execute the payment. This payment method will override any previously set method on the invoice.","example":"pm_1xMpj5bwRqN7LM"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v1/invoices/{id}/void":{"post":{"operationId":"voidInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Void invoice","description":"Void an invoice in a `to_pay` status. This action generates a corresponding credit note.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"send_email":{"type":"boolean","default":true,"description":"Indicates if an email for the generated credit note should be sent to the customer."}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v1/invoices/{id}/uncollectible":{"post":{"operationId":"markInvoiceAsUncollectible","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Mark as uncollectible","description":"Mark an invoice as uncollectible, useful for keeping track of bad debts that can be written off for accounting purposes.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}}}}},"/v1/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Get invoice","description":"Retrieve the details of an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Update invoice","description":"Update an invoice in draft or grace_period status.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update invoice payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoice"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Delete invoice","description":"Delete an invoice in `draft` status or imported from an external source. For other statuses, the `POST /v1/invoices/{id}/void` endpoint must be used.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/invoices/{id}/upload":{"post":{"operationId":"uploadPdfToInvoice","tags":["Invoices"],"security":[{"bearer":[]}],"summary":"Upload PDF to invoice","description":"Upload a PDF file to an existing invoice.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/download":{"get":{"operationId":"downloadInvoice","tags":["Invoices"],"summary":"Download invoice","description":"Download the PDF of an existing invoice. If the invoice is in draft or open status, the PDF will be generated without redirect","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string"},"required":false,"name":"locale","in":"query"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"as_redirect","in":"query"}],"responses":{"200":{"description":"Download an invoice PDF file","content":{"application/pdf":{"schema":{"format":"binary"}}}},"302":{"description":""},"404":{"description":"Invoice or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/transactions":{"post":{"operationId":"createInvoiceTransaction","tags":["Invoices > Transactions"],"security":[{"bearer":[]}],"summary":"Create transaction","description":"Create a transaction linked to an existing invoice. This may update the invoice status to paid/partially paid.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create invoice transaction payload","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_id":{"type":"string","description":"Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.","example":"pm_1xMpj5bwRqN7LM"}},"required":["amount","process_at","payment_method_id"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["transfer"]},"bank_account_id":{"type":"string","description":"Bank account linked to the transaction.","example":"bac_KJyPrMA1toAqRG"}},"required":["amount","process_at","payment_method_type"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"provider_name":{"type":"string","enum":["airwallex","gocardless","mollie","stripe"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_transaction_id":{"type":"string","description":"ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the `amount` and `process_at` fields may be overridden by the transaction data."}},"required":["provider_name","provider_transaction_id"]},{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"Transaction amount.","example":31500},"process_at":{"type":"string","format":"date-time","description":"Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.","example":"2024-11-12T07:38:39.222Z"},"payment_method_type":{"type":"string","enum":["external"]}},"required":["amount","process_at"]}]}}}},"responses":{"201":{"description":"The invoice with the newly created transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDetails"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/invoices/{id}/transactions/{transactionId}":{"delete":{"operationId":"deleteInvoiceTransaction","tags":["Invoices > Transactions"],"security":[{"bearer":[]}],"summary":"Delete transaction","description":"Delete a transaction linked to an existing invoice. Only applies to scheduled transaction.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"responses":{"200":{"description":""},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/accounting/rules":{"get":{"operationId":"listAccountingRules","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"List accounting rules","description":"Retrieve existing accounting rules with optional filtering.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"ledger_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"category__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAccountingRule"}}}}}},"post":{"operationId":"createAccountingRule","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"Create accounting rule","description":"Create a new accounting rule for account code routing or journal posting.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string"},"name":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"]},"priority":{"type":"number"},"product_ids":{"type":"array","items":{"type":"string"},"default":[]},"product_types":{"type":"array","items":{"type":"string"},"default":[]},"customer_ids":{"type":"array","items":{"type":"string"},"default":[]},"currencies":{"type":"array","items":{"type":"string"},"default":[]},"countries":{"type":"array","items":{"type":"string"},"default":[]},"coupon_ids":{"type":"array","items":{"type":"string"},"default":[]},"client_provider_ids":{"type":"array","items":{"type":"string"},"default":[]},"payment_method_types":{"type":"array","items":{"type":"string"},"default":[]},"interval_period":{"type":["string","null"]},"interval_count":{"type":["number","null"]},"revenue_ledger_account_id":{"type":["string","null"]},"deferred_revenue_ledger_account_id":{"type":["string","null"]},"deferred_discount_ledger_account_id":{"type":["string","null"]},"contra_revenue_ledger_account_id":{"type":["string","null"]},"discount_ledger_account_id":{"type":["string","null"]},"ar_ledger_account_id":{"type":["string","null"]},"cash_ledger_account_id":{"type":["string","null"]},"payments_clearing_ledger_account_id":{"type":["string","null"]},"output_tax_ledger_account_id":{"type":["string","null"]},"bad_debt_expense_ledger_account_id":{"type":["string","null"]},"customer_credits_ledger_account_id":{"type":["string","null"]},"journal_id":{"type":["string","null"]},"entity_type":{"type":["string","null"],"enum":["invoice","payment"]}},"required":["category","priority"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}}}}},"/v1/accounting/rules/{id}":{"get":{"operationId":"getAccountingRule","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"Get accounting rule","description":"Retrieve a single accounting rule by its identifier.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateAccountingRule","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"Update accounting rule","description":"Update an existing accounting rule.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"]},"priority":{"type":"number"},"product_ids":{"type":"array","items":{"type":"string"}},"product_types":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}},"currencies":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"type":"string"}},"coupon_ids":{"type":"array","items":{"type":"string"}},"client_provider_ids":{"type":"array","items":{"type":"string"}},"payment_method_types":{"type":"array","items":{"type":"string"}},"interval_period":{"type":["string","null"]},"interval_count":{"type":["number","null"]},"revenue_ledger_account_id":{"type":["string","null"]},"deferred_revenue_ledger_account_id":{"type":["string","null"]},"deferred_discount_ledger_account_id":{"type":["string","null"]},"contra_revenue_ledger_account_id":{"type":["string","null"]},"discount_ledger_account_id":{"type":["string","null"]},"ar_ledger_account_id":{"type":["string","null"]},"cash_ledger_account_id":{"type":["string","null"]},"payments_clearing_ledger_account_id":{"type":["string","null"]},"output_tax_ledger_account_id":{"type":["string","null"]},"bad_debt_expense_ledger_account_id":{"type":["string","null"]},"customer_credits_ledger_account_id":{"type":["string","null"]},"journal_id":{"type":["string","null"]},"entity_type":{"type":["string","null"],"enum":["invoice","payment"]}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRule"}}}}}},"delete":{"operationId":"deleteAccountingRule","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"Delete accounting rule","description":"Soft-delete an accounting rule.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/accounting/rules/resolve":{"post":{"operationId":"resolveAccountingRule","tags":["Accounting"],"security":[{"bearer":[]}],"summary":"Resolve accounting rule","description":"Preview which account codes would be resolved for a given context.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ledger_id":{"type":"string"},"category":{"type":"string","enum":["invoice_posted","invoice_settled","revenue_recognition","credit_note_created","accounting_software"]},"product_id":{"type":"string"},"product_type":{"type":"string"},"currency":{"type":"string"},"country":{"type":"string"},"customer_id":{"type":"string"},"interval_period":{"type":"string"},"interval_count":{"type":"number"}},"required":["ledger_id","category"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedAccountingRule"}}}}}}},"/v1/aggregators":{"get":{"operationId":"listAggregators","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"List aggregators","description":"Retrieve existing aggregators.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAggregator"}}}}}},"post":{"operationId":"createAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Create aggregator","description":"Create a new aggregator.","requestBody":{"description":"Create aggregator payload","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CreateAggregator"},{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/CreateCountAggregator"},{"properties":{"entity":{"type":"string","description":"The billable event entity to aggregate.","example":"api_calls"},"type":{"type":"string","enum":["metered","licensed"],"default":"metered","description":"The type of aggregator."},"where":{"type":["object","null"],"properties":{"conditional":{"type":"string","enum":["and","or"]},"fields":{"type":"array","items":{"allOf":[{"type":"object","properties":{"property":{"type":"string"}},"required":["property"]},{"oneOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["isNull","isNotNull"]}},"required":["operator"]},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"]},"value":{"type":"string"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["gte","gt","lt","lte"]},"value":{"type":"number"}},"required":["operator","value"]},{"type":"object","properties":{"operator":{"type":"string","enum":["equals","notEqual"]},"value":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"required":["operator","value"]}]}]}}},"required":["conditional","fields"],"description":"Filter conditions for the aggregation."},"name":{"type":"string","description":"Name of the aggregator."},"description":{"type":["string","null"],"description":"Description of the aggregator."},"allow_negative_values":{"type":"boolean","default":false,"description":"Whether the aggregator can produce negative values."},"aggregate_on_customers_enabled":{"type":"boolean","default":false,"description":"Whether the aggregator should aggregate on customers."},"custom_event_name":{"type":"string","description":"Custom event name for the aggregator."},"exposed_event_keys":{"type":"array","items":{"type":"string"},"description":"Event keys exposed by the aggregator."},"unit_name":{"type":["string","null"],"description":"Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.","example":"user"},"default_interval_count":{"type":"integer","description":"Default interval count for usage periods."},"default_interval_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Default interval period for usage periods."},"thresholds":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the threshold."},"threshold_value":{"type":"number","description":"The threshold value."},"comparison_operator":{"type":"string","enum":["gte","lte"],"default":"gte","description":"The comparison operator for the threshold."}},"required":["threshold_value"]},"description":"Thresholds for the aggregator."},"operation":{"type":"string","enum":["count"],"description":"The aggregation operation to perform."}}}]},{"$ref":"#/components/schemas/CreateSumAggregator"}],"discriminator":{"propertyName":"operation","mapping":{"count":"#/components/schemas/CreateCountAggregator","sum":"#/components/schemas/CreateSumAggregator"}}}]}}}},"responses":{"201":{"description":"The newly created aggregator","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":"object"}]}}}}}}},"/v1/aggregators/{id}":{"get":{"operationId":"getAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Get aggregator","description":"Retrieve the details of an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":"object"}]}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Update aggregator","description":"Update the details of an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAggregator"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Aggregator"},{"type":"object"}]}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteAggregator","tags":["Aggregators"],"security":[{"bearer":[]}],"summary":"Delete aggregator","description":"Delete an existing aggregator.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Aggregator deleted"},"400":{"description":"Aggregator is linked to a product","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"404":{"description":"Aggregator not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/analytics":{"get":{"operationId":"getAnalytics","tags":["Analytics"],"security":[{"bearer":[]}],"summary":"Get analytics","description":"Retrieve your pre-computed account's analytics (ARR, revenues, churn, etc).","parameters":[{"schema":{"type":"string","description":"Invoicing Entity ID to filter analytics","example":"ive_47484fjdhy5"},"required":false,"description":"Invoicing Entity ID to filter analytics","name":"invoicing_entity_id","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"revenue_last_30_days":{"type":"number","description":"Revenue of the last 30 days. Expressed in the currency's smallest unit."},"churn_30_days":{"type":"number","description":"Churn of the last 30 days. Churn corresponds to the number of customers who churned divided by the number of active customers. A churned customer is one who had a subscription but no longer has an active one."},"churned_revenue_30_days":{"type":"number","description":"Revenue corresponding to the churn of the last 30 days. Expressed in the currency's smallest unit."},"arr":{"type":"number","description":"Computed live Annual Recurring Revenue. Expressed in the currency's smallest unit."},"mrr":{"type":"number","description":"Computed live Monthly Recurring Revenue. Expressed in the currency's smallest unit."},"pending_arr":{"type":"number","description":"Computed pending Annual Recurring Revenue. The sum of ARR from all pending subscriptions. Expressed in the currency's smallest unit."},"active_arr":{"type":"number","description":"Computed pending Annual Recurring Revenue. The sum of ARR from all active subscriptions. Expressed in the currency's smallest unit."},"arr_in_discounts":{"type":"number","description":"Annual Recurring Revenue currently under coupons. Expressed in the currency's smallest unit."},"fixed_arr":{"type":"number","description":"Computed live Annual Recurring Revenue without the discounted amount (coupons). Expressed in the currency's smallest unit."},"active_customers":{"type":"number","description":"Number of customers with an assigned subscriptions."},"arpa":{"type":"number","description":"Average Revenue Per Account (customer)."}},"required":["revenue_last_30_days","churn_30_days","churned_revenue_30_days","arr","mrr","pending_arr","active_arr","arr_in_discounts","fixed_arr","active_customers","arpa"]}}}}}}},"/v1/companies":{"get":{"operationId":"listCompanies","tags":["Companies"],"security":[{"bearer":[]}],"summary":"List companies","description":"Retrieve all companies that the authentication token has access to.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCompany"}}}}}},"post":{"operationId":"createCompany","tags":["Companies"],"security":[{"bearer":[]}],"summary":"Create company","description":"Create a new company to which the authentication token will have access to.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Company name.","example":"Acme"},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["name","address"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Company ID.","example":"cli_DKL4Xcb5VSa8CQ"},"name":{"type":"string","description":"Company name.","example":"Acme"},"logo_url":{"type":["string","null"],"description":"Logo URL of the default invoicing entity."},"favicon_url":{"type":["string","null"],"description":"Favicon URL of the default invoicing entity."},"address":{"allOf":[{"$ref":"#/components/schemas/Address"},{"type":"object","description":"Address of the default invoicing entity"}]}},"required":["id","name","logo_url","favicon_url","address"]}}}}}}},"/v1/customers/credits":{"get":{"operationId":"listCustomersCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List all credit products","description":"Retrieve credit products for all customers.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"product_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCredit"}}}}}}},"/v1/customers/{id}/credits":{"get":{"operationId":"listCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List credit products","description":"Retrieve credit products attached to a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCredit"}}}}}},"post":{"operationId":"createCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Create credit product","description":"Create a credit entity for a given product with an optional balance.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Create credit payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredit"}}}},"responses":{"201":{"description":"Credit created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}}},"/v1/customers/{id}/credits/{productId}":{"get":{"operationId":"getCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Get credit product","description":"Retrieve the details of an existing credit product for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}},"put":{"operationId":"updateCustomerCredit","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Update credit product","description":"Update the configuration of a customer's credit product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Update credit payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCredit"}}}},"responses":{"200":{"description":"Updated credit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credit"}}}}}}},"/v1/customers/{id}/credits/{productId}/transactions":{"get":{"operationId":"listCustomerCreditTransactions","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"List credit transactions","description":"Retrieve all credit transactions associated with a credit product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"id","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"type","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"invoice_id","in":"query"},{"schema":{"type":["string","null"]},"required":false,"name":"created_at","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/purchase":{"post":{"operationId":"purchaseCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Purchase credits","description":"Purchase a number of credits. This action will generate an invoice and charge the customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit purchase payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditPurchase"}}}},"responses":{"201":{"description":"Invoice ID and balance after purchase","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string"},"new_credit_balance":{"type":"number"}},"required":["invoice_id","new_credit_balance"]}}}}}}},"/v1/customers/{id}/credits/{productId}/transactions/{transactionId}":{"patch":{"operationId":"updateCustomerCreditTopupExpiration","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Update credit topup expiration","description":"Update the expiration date of a topup credit transaction. Only non-expired topup transactions can be updated.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"requestBody":{"description":"Update credit topup expiration payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditTopupExpiration"}}}},"responses":{"200":{"description":"The updated credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/topup":{"post":{"operationId":"topupCustomerCredits","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Topup credits","description":"Topup a number of free credits. This action will not charge the customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit topup payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditTopup"}}}},"responses":{"201":{"description":"The created credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/credits/{productId}/usage":{"post":{"operationId":"createCustomerCreditsUsage","tags":["Customers > Credits"],"security":[{"bearer":[]}],"summary":"Create credits usage","description":"Create a usage entry for a credit product. This will impact the balance of the customer by `usage_retained`.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"requestBody":{"description":"Credit usage entry payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditUsage"}}}},"responses":{"201":{"description":"The created credit transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditTransaction"}}}}}}},"/v1/customers/{id}/payment-methods":{"get":{"operationId":"listCustomerPaymentMethods","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"List payment methods","description":"Retrieve payment methods attached to a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPaymentMethod"}}}}}},"post":{"operationId":"createCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Create payment method","description":"Import an existing customer payment method from a connected payment provider.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentMethod"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodDetails"}}}}}}},"/v1/customers/{id}/payment-methods/{paymentMethodId}":{"get":{"operationId":"getCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Get payment method","description":"Retrieve the details of an existing customer payment method.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodDetails"}}}}}},"delete":{"operationId":"deleteCustomerPaymentMethod","tags":["Customers > Payment methods"],"security":[{"bearer":[]}],"summary":"Delete payment method","description":"Delete an existing customer payment method.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"paymentMethodId","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/customers":{"get":{"operationId":"listCustomers","tags":["Customers"],"security":[{"bearer":[]}],"summary":"List customers","description":"Retrieve existing customers.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["corporate","person"]},{"type":"string","description":"corporate,person"}]},"required":false,"name":"type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["corporate","person"]},{"type":"string","description":"corporate,person"}]},"required":false,"name":"type__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","inactive","imported","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","active","inactive","imported","archived"]},{"type":"string","description":"all,active"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"country__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"external_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"billing_email__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tax_id__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["active","pending","cancelled","paused","trialing","errored","draft","none"]},{"type":"string","description":"active,pending"}]},"required":false,"name":"subscription_status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["active","pending","cancelled","paused","trialing","errored","draft","none"]},{"type":"string","description":"active,pending"}]},"required":false,"name":"subscription_status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"segment_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"custom_properties","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs","transfer","external","missing","errored"]},{"type":"string","description":"card,direct_debit"}]},"required":false,"name":"payment_method_type","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["card","direct_debit","direct_debit_ach","direct_debit_bacs","transfer","external","missing","errored"]},{"type":"string","description":"card,direct_debit"}]},"required":false,"name":"payment_method_type__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integration_entity_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"created_at__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCustomer"}}}}}},"post":{"operationId":"createCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Create customer","description":"Create a new customer.","requestBody":{"description":"Create customer payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomer"}}}},"responses":{"201":{"description":"The newly created customer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetails"}}}}}}},"/v1/customers/batch":{"post":{"operationId":"createCustomers","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Create customers batch","description":"Create a batch of new customers.","requestBody":{"description":"Create customers batch payload","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateCustomer"},{"type":"object","properties":{"batch_customer_id":{"type":"string","description":"A unique identifier for the customers in the batch","example":"customer-123"}},"required":["batch_customer_id"]}]},"minItems":1,"maxItems":50}},"required":["customers"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"successes":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Customer"},{"type":"object","properties":{"providers":{"type":"object","properties":{"adyen":{"type":"string"},"stripe":{"type":"string"},"mollie":{"type":"string"},"gocardless":{"type":"string"},"airwallex":{"type":"string"},"salesforce":{"type":"string"},"hubspot":{"type":"string"},"attio":{"type":"string"},"xero":{"type":"string"},"pennylane":{"type":"string"},"zoho-books":{"type":"string"},"exact-online":{"type":"string"},"quickbooks":{"type":"string"},"netsuite":{"type":"string"},"anrok":{"type":"string"},"chargebee":{"type":"string"},"slack":{"type":"string"},"plain":{"type":"string"},"zendesk":{"type":"string"},"pylon":{"type":"string"},"intercom":{"type":"string"},"claap":{"type":"string"}},"deprecated":true,"description":"Deprecated field, please use `integrations`."},"current_payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Default payment method of the customer. Only applies to card and direct debit."}]},"bank_account":{"allOf":[{"$ref":"#/components/schemas/BankAccount"},{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","description":"Bank account ID.","example":"bac_KJyPrMA1toAqRG"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Bank account currency.","example":"EUR"},"bank_name":{"type":["string","null"],"description":"Bank name.","example":"Fake bank"}},"required":["id","currency","bank_name"]},{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["iban_bic_swift"]},"iban":{"type":"string"},"bic_swift":{"type":["string","null"]}},"required":["format","iban","bic_swift"]},{"type":"object","properties":{"format":{"type":"string","enum":["sort_code_account_number"]},"sort_code":{"type":"string"},"account_number":{"type":"string"}},"required":["format","sort_code","account_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_routing_number"]},"account_number":{"type":"string"},"routing_number":{"type":"string"}},"required":["format","account_number","routing_number"]},{"type":"object","properties":{"format":{"type":"string","enum":["account_number_bic_swift"]},"account_number":{"type":"string"},"bic_swift":{"type":"string"}},"required":["format","account_number","bic_swift"]}],"example":{"format":"iban_bic_swift","iban":"FR76XXXXXXXXXXXXXXXXXXXXXXX","bic_swift":"XXXXXXXX"}}]},{"type":"null"}],"description":"Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used."}]},"organisation_id":{"type":["string","null"],"description":"Parent organization ID to which the client is attached.","example":null},"organisation_invoicing":{"type":["string","null"],"enum":["none","every_invoice","concat"],"description":"\nHow customer invoices are issued from the parent organisation.\n\n- `none`: Invoices will keep being issued from this customer.\n- `every_invoice`: Customer invoices will be issued from the organisation individually.\n- `concat`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).\n ","example":null}},"required":["providers","current_payment_method","bank_account","organisation_id","organisation_invoicing"]},{"type":"object","properties":{"batch_customer_id":{"type":"string","description":"A unique identifier for the customers in the batch","example":"customer-123"}},"required":["batch_customer_id"]}]}},"errors":{"type":"array","items":{"type":"object","properties":{"error":{},"batch_customer_id":{"type":"string"},"customer_payload":{"$ref":"#/components/schemas/CreateCustomer"}},"required":["batch_customer_id","customer_payload"]}}},"required":["successes","errors"]}}}}}}},"/v1/customers/{id}":{"get":{"operationId":"getCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer","description":"Retrieve the details of an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetails"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Update customer","description":"Update the details of an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomer"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDetails"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Delete customer","description":"Delete an existing customer. The customer must be archived prior to the deletion.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Customer deleted"},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/portal":{"get":{"operationId":"getCustomerPortalUrl","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer portal","description":"Retrieve the URL of the customer portal.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}}}}},"/v1/customers/{id}/archive":{"put":{"operationId":"archiveCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Archive customer","description":"Archive an existing customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Customer archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/{id}/unarchive":{"put":{"operationId":"unarchiveCustomer","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Unarchive customer","description":"Unarchive an archived customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Customer unarchived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/providers-bulk-update":{"post":{"operationId":"bulkUpdateCustomersProviders","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Bulk update providers/customers mapping","description":"Bulk update providers/customers mapping, make sure to check the query response to see if all customers were updated.","parameters":[{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Sync the customer with the provider after updating the mapping. If the provider is a Payment Service Provider, the payment methods of the customers will be imported."},"required":false,"description":"Sync the customer with the provider after updating the mapping. If the provider is a Payment Service Provider, the payment methods of the customers will be imported.","name":"sync","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID.","example":"cus_Typ0px2W0aiEtl"},"provider_name":{"type":"string","enum":["mollie","stripe","gocardless","airwallex","hubspot","attio","salesforce","xero","exact-online","pennylane","quickbooks","anrok"],"description":"Provider name."},"provider_id":{"type":"string","description":"Provider ID. Required if multiple instances of the same provider are connected in Hyperline."},"provider_account_id":{"type":["string","null"],"description":"ID of the customer on the provider side. Using a null value will reset the previously saved ID."}},"required":["customer_id","provider_name","provider_account_id"]}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"successful":{"type":"number","description":"Number of record successfully updated."},"expected":{"type":"number","description":"Number of record expected to be updated."},"updated":{"type":"array","items":{"type":"string"},"description":"Customer IDs that were successfully updated."}},"required":["successful","expected","updated"]}}}}}}},"/v1/customers/{id}/taxes/rates":{"get":{"operationId":"getCustomerTaxRates","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer tax rates","description":"Retrieve the eligible tax rates for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"scheme":{"type":"string","enum":["exempt","standard","reverse_charge","manual","not_eligible"],"description":"Tax rate scheme.\n\n- `exempt`: The customer is exempt from tax.\n- `standard`: The customer is subject to standard tax.\n- `reverse_charge`: The customer is subject to reverse charge tax.\n- `manual`: The customer tax rate is manually set.\n- `not_eligible`: The customer is not eligible for tax.\n  "},"rate":{"type":"number","description":"Tax rate percentage."}},"required":["scheme","rate"]}}}}}}}},"/v1/organisations/{id}":{"get":{"operationId":"getOrganisation","tags":["Organisations"],"security":[{"bearer":[]}],"summary":"Get organisation","description":"Retrieve the details of an existing organisation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Organisation not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"patchOrganisation","tags":["Organisations"],"security":[{"bearer":[]}],"summary":"Patch organisation","description":"Update the details of an existing organisation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchOrganisation"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organisation"}}}},"404":{"description":"Organisation not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/customers/segments":{"get":{"operationId":"listCustomersSegments","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"List segments","description":"Retrieve all customer segments.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSegment"}}}}}},"post":{"operationId":"createCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Create segment","description":"Create a new customer segment.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]},"minItems":1}},"required":["operator","conditions"]},"minItems":1}},"required":["name","rules"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}}}}},"/v1/customers/segments/{id}":{"get":{"operationId":"getCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Get segment","description":"Retrieve the details of an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}},"404":{"description":"Segment not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"patch":{"operationId":"updateCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Update segment","description":"Update an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]},"minItems":1}},"required":["operator","conditions"]},"minItems":1}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"operator":{"type":"string","enum":["and","or"]},"conditions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"field":{"type":"string","enum":["country"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).","example":"FR"}}},"required":["field","operator"],"title":"Country"},{"type":"object","properties":{"field":{"type":"string","enum":["currency"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}}},"required":["field","operator"],"title":"Currency"},{"type":"object","properties":{"field":{"type":"string","enum":["language"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"]}}},"required":["field","operator"],"title":"Language"},{"type":"object","properties":{"field":{"type":"string","enum":["invoicing_entity_id"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Invoicing entity"},{"type":"object","properties":{"field":{"type":"string","enum":["tax_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"Tax ID"},{"type":"object","properties":{"field":{"type":"string","enum":["external_id"]},"operator":{"type":"string","enum":["set","not_set"]}},"required":["field","operator"],"title":"External ID"},{"type":"object","properties":{"field":{"type":"string","enum":["payment_method_type"]},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"]}}},"required":["field","operator"],"title":"Payment method type"},{"type":"object","properties":{"field":{"type":"string","enum":["relationship"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string","enum":["has_parent","has_child"]}}},"required":["field","operator"],"title":"Relationship"},{"type":"object","properties":{"field":{"type":"string","enum":["customer_id"]},"operator":{"type":"string","enum":["in","not_in"]},"value":{"type":"array","items":{"type":"string"}}},"required":["field","operator"],"title":"Customer ID"},{"type":"object","properties":{"field":{"type":"string","pattern":"^custom_property\\..+$","description":"custom_property.<slug>"},"operator":{"type":"string","enum":["in","not_in","set","not_set"]},"value":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["field","operator"],"title":"Custom property"}]}}},"required":["id","operator","conditions"]}},"created_at":{"type":"string","format":"date"},"updated_at":{"type":"string","format":"date"}},"required":["id","name","description","rules","created_at","updated_at"]}}}},"404":{"description":"Segment not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deleteCustomersSegment","tags":["Customers > Segments"],"security":[{"bearer":[]}],"summary":"Delete segment","description":"Delete an existing customer segment.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Segment deleted"}}}},"/v1/exports":{"post":{"operationId":"createExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Create export","description":"Prepare an export of a given type for download. You can check the export readiness status using the GET endpoint. Once the export is ready, download the export using the download endpoint.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExport"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}}}},"get":{"operationId":"listExports","tags":["Exports"],"security":[{"bearer":[]}],"summary":"List exports","description":"List previously created exports, most recent first.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedExport"}}}}}}},"/v1/exports/{exportId}":{"get":{"operationId":"getExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Get export","description":"Retrieve the details of an existing export.","parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Export"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/exports/{exportId}/download":{"get":{"operationId":"downloadExport","tags":["Exports"],"security":[{"bearer":[]}],"summary":"Download export","description":"Download the file associated with a specific export. Pass `as_redirect=true` to receive a 302 redirect to a short-lived S3 signed URL instead of the file body.","parameters":[{"schema":{"type":"string"},"required":true,"name":"exportId","in":"path"},{"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]},"required":false,"name":"as_redirect","in":"query"}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"format":"binary"}},"application/json":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary"}},"application/zip":{"schema":{"format":"binary"}}}},"302":{"description":""}}}},"/v1/files/{id}/download":{"get":{"operationId":"downloadFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Download file","description":"Download an existing file content.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}},"application/msword":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"schema":{"format":"binary"}},"application/vnd.ms-excel":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary"}},"application/vnd.ms-powerpoint":{"schema":{"format":"binary"}},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"schema":{"format":"binary"}},"text/plain":{"schema":{"format":"binary"}},"text/csv":{"schema":{"format":"binary"}},"image/jpeg":{"schema":{"format":"binary"}},"image/png":{"schema":{"format":"binary"}},"image/gif":{"schema":{"format":"binary"}},"image/svg+xml":{"schema":{"format":"binary"}},"application/json":{"schema":{"format":"binary"}},"application/xml":{"schema":{"format":"binary"}}}}}}},"/v1/files":{"get":{"operationId":"listFiles","tags":["Files"],"security":[{"bearer":[]}],"summary":"List files","description":"Retrieve existing files.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFile"}}}}}},"post":{"operationId":"createFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Create file","description":"Create a new file.","requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Name of the file to be uploaded.","example":"invoice_2024.pdf"},"customer_id":{"type":"string","description":"ID of the customer to link the file to.","example":"cus_QalW2vTAdkR6IY"}},"required":["name","customer_id"]},{"type":"object"}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"File ID.","example":"fil_2QdJDDUej969ev"},"name":{"type":"string","description":"File name.","example":"invoice_2024.pdf"},"type":{"type":"string","enum":["pdf","doc","docx","xls","xlsx","ppt","pptx","txt","csv","jpeg","png","gif","svg","json","xml"],"description":"\nFile type based on the MIME type.\n\nSupported file types:\n- `pdf`: PDF documents\n- `doc`: Microsoft Word documents (legacy)\n- `docx`: Microsoft Word documents\n- `xls`: Microsoft Excel spreadsheets (legacy)\n- `xlsx`: Microsoft Excel spreadsheets\n- `ppt`: Microsoft PowerPoint presentations (legacy)\n- `pptx`: Microsoft PowerPoint presentations\n- `txt`: Plain text files\n- `csv`: Comma-separated values files\n- `jpeg`: JPEG images\n- `png`: PNG images\n- `gif`: GIF images\n- `svg`: SVG vector images\n- `json`: JSON data files\n- `xml`: XML data files\n  ","example":"pdf"},"mimetype":{"type":"string","description":"MIME type of the file.","example":"application/pdf"},"customer_id":{"type":["string","null"],"description":"ID of the customer linked to the file.","example":"cus_QalW2vTAdkR6IY"},"summary":{"type":["string","null"],"description":"AI-generated summary of the file content"},"created_at":{"type":"string","format":"date-time","description":"Date when the file was created.","example":"2024-11-12T07:38:39.222Z"}},"required":["id","name","type","mimetype","customer_id","summary","created_at"]}}}}}}},"/v1/files/{id}":{"delete":{"operationId":"deleteFile","tags":["Files"],"security":[{"bearer":[]}],"summary":"Delete file","description":"Delete an existing file.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/integrations/components/token":{"post":{"operationId":"createComponentToken","tags":["Integrations"],"security":[{"bearer":[]}],"summary":"Create component token","description":"Create a new token for embedded components.","requestBody":{"description":"Create component token payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateComponentToken"}}}},"responses":{"201":{"description":"The newly created token","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type":{"type":"string","enum":["bearer"]}},"required":["token","token_type"]}}}}}}},"/v1/invoicing-entities":{"get":{"operationId":"listInvoicingEntities","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"List invoicing entities","description":"Retrieve existing invoicing entities.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedInvoicingEntity"}}}}}},"post":{"operationId":"createInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Create invoicing entity","description":"Create a new invoicing entity to send invoices from.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency used for accounting purposes.","example":"USD"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","minimum":0,"description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","minimum":0,"description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"quote_footer":{"type":["string","null"],"description":"The footer text to be used in quotes.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null}},"required":["name","country","currency","accounting_currency"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","created_at","updated_at","deleted_at"]}}}}}}},"/v1/invoicing-entities/{id}":{"get":{"operationId":"getInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Get invoicing entity","description":"Retrieve a specific invoicing entity.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","created_at","updated_at","deleted_at"]}}}}}},"put":{"operationId":"updateInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Update invoicing entity","description":"Update an existing invoicing entity.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency used for accounting purposes.","example":"USD"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"default_payment_delay":{"type":"integer","minimum":0,"description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","minimum":0,"description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"minimum":0,"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the invoicing entity.","example":"inv123"},"name":{"type":"string","description":"The name of the invoicing entity.","example":"Acme Corp"},"trade_name":{"type":"string","description":"The trade name of the invoicing entity.","example":"Acme"},"timezone":{"type":"string","description":"The timezone the invoicing entity operates in.","example":"America/New_York"},"language":{"type":"string","enum":["fr","en","de","it","nl","es","pt","pl"],"description":"The default language of the invoicing entity.","example":"en"},"is_default":{"type":"boolean","description":"Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.","example":true},"currency":{"type":"string","enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"The currency code that the invoicing entity operates in.","example":"USD"},"accounting_currency":{"type":"string","description":"The currency used for accounting purposes.","example":"USD"},"address_line1":{"type":["string","null"],"description":"The first line of the address for the invoicing entity.","example":"123 Elm St"},"address_line2":{"type":["string","null"],"description":"The second line of the address for the invoicing entity.","example":"Suite 5"},"zip_code":{"type":["string","null"],"description":"The postal code for the invoicing entity's address.","example":"10001"},"state":{"type":["string","null"],"description":"The state or province of the invoicing entity.","example":"NY"},"city":{"type":["string","null"],"description":"The city of the invoicing entity.","example":"New York"},"country":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BF","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","IC","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PT-20","PT-30","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"],"description":"The country in which the invoicing entity is registered.","example":"USA"},"registration_number":{"type":["string","null"],"description":"The registration number of the invoicing entity.","example":"00011122334"},"tax_id":{"type":["string","null"],"description":"The tax identification number of the invoicing entity.","example":"123456789"},"tax_id_valid":{"type":["boolean","null"],"description":"Boolean indicating whether the tax ID is valid.","example":true},"billing_email":{"type":["string","null"],"format":"email","description":"The billing email address for the invoicing entity.","example":"billing@acmecorp.com"},"invoice_number_pattern":{"type":"string","description":"The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"INV-#####"},"credit_note_number_pattern":{"type":"string","description":"The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"CN-#####"},"document_number_pattern":{"type":"string","description":"The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.","example":"DOC-#####"},"next_invoice_number":{"type":"number","description":"The next invoice number to be used.","example":1001},"next_credit_note_number":{"type":"number","description":"The next credit note number to be used.","example":201},"next_document_number":{"type":"number","description":"The next document number to be used.","example":1501},"default_payment_delay":{"type":"integer","description":"The default payment term in days.","example":30},"invoice_grace_period_duration":{"type":"integer","description":"The grace period duration in days.","example":7},"invoice_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the invoices.","example":2},"document_payment_initiation_delay":{"type":["integer","null"],"description":"The payment initiation delay in days for the custom documents.","example":2},"invoice_late_fees":{"type":["string","null"],"description":"The late fees applicable to the invoices.","example":"2% per month"},"invoice_footer":{"type":["string","null"],"description":"The footer text to be used in invoices.","example":"Thank you for your business."},"document_footer":{"type":["string","null"],"description":"The footer text to be used in documents. If not specified, the invoice footer will be used.","example":"Thank you for your business."},"logo_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used in invoices.","example":"http://example.com/logo.png"},"favicon_url":{"type":["string","null"],"format":"uri","description":"URL of the logo to be used as favicon.","example":"http://example.com/logo.png"},"brand_color":{"type":["string","null"],"minLength":4,"maxLength":9,"pattern":"^#","description":"Brand color to be used in invoices (hexadecimal color code).","example":"#FF5733"},"forced_customer_type":{"type":["string","null"],"enum":["corporate","person"],"description":"Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.","example":null},"created_at":{"type":"string","format":"date","description":"Creation date of the invoicing entity.","example":"2024-01-01T00:00:00Z"},"updated_at":{"type":"string","format":"date","description":"Last edition date of the invoicing entity.","example":"2024-04-01T00:00:00Z"},"deleted_at":{"type":["string","null"],"format":"date","description":"Date of the invoicing entity deletion.","example":null}},"required":["id","name","timezone","language","is_default","currency","accounting_currency","address_line1","address_line2","zip_code","state","city","country","registration_number","tax_id","tax_id_valid","billing_email","invoice_number_pattern","credit_note_number_pattern","document_number_pattern","next_invoice_number","next_credit_note_number","next_document_number","default_payment_delay","invoice_grace_period_duration","invoice_payment_initiation_delay","document_payment_initiation_delay","invoice_late_fees","invoice_footer","document_footer","logo_url","favicon_url","brand_color","forced_customer_type","created_at","updated_at","deleted_at"]}}}}}},"delete":{"operationId":"deleteInvoicingEntity","tags":["Invoicing entities"],"security":[{"bearer":[]}],"summary":"Delete invoicing entity","description":"Soft deletes an invoicing entity. This action won't delete the associated invoices.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/oauth/userinfo":{"get":{"operationId":"getUserInfo","tags":["OAuth2"],"security":[{"bearer":[]}],"summary":"Get user info","description":"Returns user information for the authenticated access token.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"given_name":{"type":["string","null"],"description":"User given name.","example":"John"},"family_name":{"type":["string","null"],"description":"User family name.","example":"Doe"},"name":{"type":["string","null"],"description":"User full name.","example":"John Doe"},"picture":{"type":["string","null"],"format":"uri","description":"User picture URL.","example":"https://..."},"email":{"type":"string","format":"email","description":"User email.","example":"john@doe.com"},"email_verified":{"type":"boolean","description":"Indicates if the user email is verified.","example":true}},"required":["given_name","family_name","name","picture","email","email_verified"]}}}}}}},"/oauth/authorize":{"get":{"operationId":"authorize","tags":["OAuth2"],"summary":"Authorize","description":"Initiates OAuth authorization flow.","parameters":[{"schema":{"type":"string","description":"Application's client ID."},"required":true,"description":"Application's client ID.","name":"client_id","in":"query"},{"schema":{"type":"string","description":"Identifier of the target API. Should be left empty by default."},"required":false,"description":"Identifier of the target API. Should be left empty by default.","name":"audience","in":"query"},{"schema":{"type":"string","description":"A space-separated list of permissions your app requires. Should be left empty by default.","example":"customers.read customers.write"},"required":false,"description":"A space-separated list of permissions your app requires. Should be left empty by default.","name":"scope","in":"query"},{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string","description":"The URL to which Hyperline will redirect the browser after authorization has been granted by the user. It must match one of the callback URL you set when registering your app."},"required":true,"description":"The URL to which Hyperline will redirect the browser after authorization has been granted by the user. It must match one of the callback URL you set when registering your app.","name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"A random string generated by your app to prevent CSRF attacks. This value will be included in the query parameter when redirecting to the `redirect_uri` after authorizing your app."},"required":true,"description":"A random string generated by your app to prevent CSRF attacks. This value will be included in the query parameter when redirecting to the `redirect_uri` after authorizing your app.","name":"state","in":"query"},{"schema":{"type":"string","description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","example":"https://api.hyperline.co/mcp"},"required":false,"description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","name":"resource","in":"query"},{"schema":{"type":"string","description":"PKCE code challenge. Required for public clients (e.g., MCP clients)."},"required":false,"description":"PKCE code challenge. Required for public clients (e.g., MCP clients).","name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256","plain"],"description":"PKCE code challenge method. S256 is recommended for security."},"required":false,"description":"PKCE code challenge method. S256 is recommended for security.","name":"code_challenge_method","in":"query"},{"schema":{"type":"string","description":"OAuth prompt parameter. MCP clients send 'consent' when requesting offline_access."},"required":false,"description":"OAuth prompt parameter. MCP clients send 'consent' when requesting offline_access.","name":"prompt","in":"query"}],"responses":{"302":{"description":""}}}},"/oauth/tokens":{"post":{"operationId":"generateTokens","tags":["OAuth2"],"summary":"Generate tokens","description":"Exchange authorization code for access token or refresh an existing token.","requestBody":{"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"client_id":{"type":"string","description":"Application's client ID."},"client_secret":{"type":"string","description":"Application's client secret."},"resource":{"type":"string","description":"The canonical URI of the resource server (RFC 8707). For MCP clients, this should be the MCP server endpoint URL. Example: https://api.hyperline.co/mcp","example":"https://api.hyperline.co/mcp"}},"required":["client_id"]},{"oneOf":[{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code"],"description":"To exchange an auth code for an app access token, use `authorization_code`."},"code":{"type":"string","description":"The auth code received when creating the authorization."},"redirect_uri":{"type":"string","description":"Must match the value set at the `GET /authorize` endpoint."},"code_verifier":{"type":"string","description":"PKCE code verifier (RFC 7636). The original random string used to generate the code_challenge sent during authorization. Required when code_challenge was used."}},"required":["grant_type","code","redirect_uri"]},{"type":"object","properties":{"grant_type":{"type":"string","enum":["refresh_token"],"description":"To renew an app access token with a refresh token, use `refresh_token`."},"refresh_token":{"type":"string","description":"The refresh token received when creating the authorization."}},"required":["grant_type","refresh_token"]}]}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"Access token with which you will be able to access the Hyperline API on the organisation's behalf."},"refresh_token":{"type":"string","description":"Refresh token with which you will be able to retrieve a new access token on this endpoint. The refresh token does not expire."},"expires_in":{"type":"number","description":"The number of seconds left before the app access token expires. Be sure to renew your app access token before this reaches zero."},"token_type":{"type":"string","enum":["bearer"]}},"required":["access_token","expires_in","token_type"]}}}}}}},"/oauth/revoke":{"post":{"operationId":"revokeToken","tags":["OAuth2"],"summary":"Revoke token","description":"Revoke an access or refresh token.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Application's client ID."},"client_secret":{"type":"string","description":"Application's client secret."},"token":{"type":"string","description":"The refresh token to revoke."}},"required":["client_id","client_secret","token"]}}}},"responses":{"204":{"description":"Token revoked"}}}},"/oauth/register":{"post":{"operationId":"registerClient","tags":["OAuth2"],"summary":"Register OAuth client","description":"Register a dynamic OAuth client per RFC 7591.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"description":"Array of redirect URIs for the client.","example":["http://localhost:3000/callback"]},"client_name":{"type":"string","description":"Human-readable name of the client.","example":"Claude Desktop"},"client_uri":{"type":"string","format":"uri","description":"URL of the client's home page."},"logo_uri":{"type":"string","format":"uri","description":"URL of the client's logo."},"scope":{"type":"string","description":"Space-separated list of requested scopes.","example":"read write"},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]},"description":"Grant types the client will use.","example":["authorization_code","refresh_token"]},"response_types":{"type":"array","items":{"type":"string","enum":["code"]},"description":"Response types the client will use.","example":["code"]},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_post"],"description":"Authentication method for token endpoint. All clients are treated as public (no secret issued)."},"software_id":{"type":"string","description":"Unique identifier for the client software."},"software_version":{"type":"string","description":"Version of the client software."},"contacts":{"type":"array","items":{"type":"string","format":"email"},"description":"Contact emails for the client developers."},"tos_uri":{"type":"string","format":"uri","description":"URL to the client's terms of service."},"policy_uri":{"type":"string","format":"uri","description":"URL to the client's privacy policy."}},"required":["redirect_uris"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"client_id":{"type":"string","description":"Unique client identifier.","example":"dyn_abc123xyz789"},"client_id_issued_at":{"type":"number","description":"Unix timestamp when client_id was issued."},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Registered redirect URIs."},"client_name":{"type":"string","description":"Human-readable name of the client."},"client_uri":{"type":"string","description":"URL of the client's home page."},"logo_uri":{"type":"string","description":"URL of the client's logo."},"scope":{"type":"string","description":"Space-separated list of granted scopes."},"grant_types":{"type":"array","items":{"type":"string"},"description":"Grant types the client can use."},"response_types":{"type":"array","items":{"type":"string"},"description":"Response types the client can use."},"token_endpoint_auth_method":{"type":"string","enum":["none","client_secret_post"],"description":"Authentication method for token endpoint."}},"required":["client_id","client_id_issued_at","redirect_uris","grant_types","response_types","token_endpoint_auth_method"]}}}}}}},"/oauth/callback":{"get":{"operationId":"oauthCallback","tags":["OAuth2"],"summary":"OAuth callback","description":"Handles authorization callback and redirects to client's registered URI.","parameters":[{"schema":{"type":"string","description":"The authorization code from the authorization server."},"required":false,"description":"The authorization code from the authorization server.","name":"code","in":"query"},{"schema":{"type":"string","description":"The state parameter containing encoded client redirect info."},"required":false,"description":"The state parameter containing encoded client redirect info.","name":"state","in":"query"},{"schema":{"type":"string","description":"Error code if authorization failed."},"required":false,"description":"Error code if authorization failed.","name":"error","in":"query"},{"schema":{"type":"string","description":"Human-readable error description."},"required":false,"description":"Human-readable error description.","name":"error_description","in":"query"}],"responses":{"302":{"description":""}}}},"/v1/payments":{"post":{"operationId":"createPayment","tags":["Payments"],"security":[{"bearer":[]}],"summary":"Create payment","description":"Initiate a new payment (limited to one-time): generate an invoice and charge it directly or with a checkout session","requestBody":{"description":"Create payment payload","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"type":{"type":"string","enum":["one_time"],"description":"\nPayment type.\n\n- `one_time`: One-time payment, generating one-off invoice.\n  ","example":"one_time"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_Typ0px2W0aiEtl"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name. Allow to override the value from the catalog.","example":"Product name"},"amount":{"type":"number","description":"Product amount. Allow to override the value from the catalog. Monetary amount in currency's smallest unit."}},"required":["id"]},"minItems":1,"deprecated":true,"description":"Deprecated field, please use `products`."},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_3kXODDF42QXtnL"},"name":{"type":"string","description":"Product name. Allow to override the value from the catalog.","example":"Product name"},"amount":{"type":"number","description":"Product amount. Allow to override the value from the catalog. Monetary amount in currency's smallest unit."}},"required":["id"]},"minItems":1,"description":"Products composing the related invoice."},"purchase_order":{"type":"string","description":"Purchase order added on the generated invoice."},"custom_note":{"type":"string","description":"Custom note added on the generated invoice."}},"required":["type","customer_id"]},{"anyOf":[{"type":"object","properties":{"charging_method":{"type":"string","enum":["immediately"],"description":"\nCharging method.\n\n- `immediately`: Customer's payment method will be charged directly to pay the invoice.\n- `checkout`: Dedicated checkout page will be created for the customer to pay the invoice.\n  "},"payment_method_type":{"type":"string","enum":["transfer","external"],"description":"Type of payment method to use to pay the invoice. If not specified, the payment_method_id or the default customer payment method is used."},"payment_method_id":{"type":"string","description":"ID of the payment method to use to pay the invoice. Ignored if payment_method_type is specified.","example":"pm_1ryTrMj4TTAT1N"}},"required":["charging_method"]},{"type":"object","properties":{"charging_method":{"type":"string","enum":["checkout"],"description":"\nCharging method.\n\n- `immediately`: Customer's payment method will be charged directly to pay the invoice.\n- `checkout`: Dedicated checkout page will be created for the customer to pay the invoice.\n  "},"available_payment_methods":{"type":"array","items":{"type":"string","enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated"]},"minItems":1},"checkout_session":{"type":"object","properties":{"send_to":{"type":"object","properties":{"email":{"type":"string","format":"email"},"customMessage":{"type":"string"}},"required":["email"],"description":"Details to send email to the payer receiving the checkout."},"redirect_url":{"type":"string","format":"uri","description":"URL to which the user is automatically redirected after the completion of the checkout."}},"description":"Only applies to `checkout` charging method."}},"required":["charging_method","available_payment_methods"]}]}]}}}},"responses":{"200":{"description":"The reference to the created invoice and optionally the checkout","content":{"application/json":{"schema":{"type":"object","properties":{"invoice_id":{"type":"string","description":"Created invoice ID."},"checkout":{"type":"object","properties":{"id":{"type":"string","description":"Checkout session ID."},"url":{"type":"string","description":"URL to which the user is automatically redirected after the completion of the checkout."}},"required":["id","url"],"description":"Payment checkout session."}},"required":["invoice_id"]}}}}}}},"/v1/price-books":{"get":{"operationId":"listPriceBooks","tags":["Price books"],"security":[{"bearer":[]}],"summary":"List price books","description":"Retrieve existing price books.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPriceBook"}}}}}},"post":{"operationId":"createPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Create price book","description":"Create a new price book.","requestBody":{"description":"Create price book payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePriceBook"}}}},"responses":{"201":{"description":"The newly created price book.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}}}}},"/v1/price-books/{id}":{"get":{"operationId":"getPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Get price book","description":"Retrieve the details of an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updatePriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Update price book","description":"Update the details of an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update price book payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePriceBook"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBook"}}}},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"delete":{"operationId":"deletePriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Delete price book","description":"Delete an existing price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Price book deleted."},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-books/{id}/products":{"post":{"operationId":"addProductsToPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Add products to price book","description":"Add products to a price book by copying their default price configurations.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Product IDs to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProductsToPriceBook"}}}},"responses":{"204":{"description":"Products added to price book."},"404":{"description":"Price book not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/price-books/{id}/products/{productId}":{"delete":{"operationId":"deleteProductFromPriceBook","tags":["Price books"],"security":[{"bearer":[]}],"summary":"Remove product from price book","description":"Remove a product and its price configurations from a price book.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"productId","in":"path"}],"responses":{"204":{"description":"Product removed from price book."},"404":{"description":"Price book or product not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes":{"post":{"operationId":"createQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Create quote","description":"Create a new quote.","requestBody":{"content":{"multipart/form-data":{"schema":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft","approved","pending_signature"],"description":"\nQuote status.\n\n- `draft`: The quote is a draft.\n- `approved`: The quote is approved and ready to be sent to the customer.\n- `pending_signature`: The quote is awaiting the customer's signature.\n  ","example":"draft"},"owner_email":{"type":"string","format":"email","description":"Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.","example":"joe@acme.com"},"customer_id":{"type":"string","description":"ID of the customer.","example":"cus_QalW2vTAdkR6IY"},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the quote.","example":"ive_47484fjdhy5"},"comments":{"type":"string","description":"Custom comments displayed on the quote.","example":"Please find the contract and subscription details we discussed."},"terms":{"type":"string","description":"Custom quotation terms.","example":"By signing this quote, you accept our conditions of use for the use of our products and services."},"amount":{"type":["number","null"],"description":"Estimated contract value. If not specified, automatically computed from the subscription configuration.","example":20000},"collect_payment_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Collect customer payment method mandate during signature flow or not.","example":true},"collect_custom_property_ids":{"type":"array","items":{"type":"string"},"description":"IDs of the customer custom properties required to be filled during the signature flow.","example":[]},"require_tax_id":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Require the customer to provide a tax ID during the signature flow.","example":false},"display_quote_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value on the quote.","example":true},"display_quote_value_with_tax":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the total quote value including tax on the quote. Only applies to `one_off` quotes.","example":false},"display_taxes":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display tax breakdown on the quote.","example":true},"display_price_tiers":{"anyOf":[{"type":"string","enum":["all","matching","none"]},{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}]}],"description":"Controls which price tiers are displayed on the quote.\n\n- `all`: Display all pricing tiers.\n- `matching`: Only display the tiers used to compute the price based on quantity.\n- `none`: Hide all pricing tiers.\n","example":"matching"},"display_phase_value":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display per-phase value breakdown on the quote.","example":false},"display_first_invoice_amount":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display the first invoice amount on the quote.","example":false},"display_documents_in_preview":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display attached documents in the quote preview.","example":false},"display_subscription_on_update":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Display subscription details on subscription update quotes.","example":false},"automatically_start_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Deprecated field, please use the phase activation strategy `quote_signature` instead.","example":true,"deprecated":true}},"required":["customer_id"]},{"anyOf":[{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the quote template. If not specified, a subscription configuration must be defined.","example":"quot_9hNWq4c84Z146W"},"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"default":"anniversary","description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"Subscription configuration constituting the quote."}},"required":["template_id"],"title":"From a template"},{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time","description":"Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-04-28T14:12:09.293Z"},"subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":true,"description":"Deprecated field, please use `contract_terms`.","example":true,"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"default":"anniversary","description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."},"activation_strategy":{"type":"string","enum":["manual","start_date","quote_signature","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"}},"required":["end_strategy","billing_date_setting","products","activation_strategy"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","manually","quote"],"default":"manually","description":"\nStrategy used to activate the subscription.\n\n- `start_date`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.\n- `manually`: The subscription requires activation through a manual action.\n- `checkout`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.\n- `quote`: The subscription will be activated depending on the configuration and the signature of the related quote.\n","example":"start_date"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons to be applied to the prices of subscription products."}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]},{"type":"object","properties":{"plan_id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}}],"description":"Subscription configuration constituting the quote."}},"required":["expires_at","subscription"],"title":"Custom"}]},{"type":"object"}]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}},"get":{"operationId":"listQuotes","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"List quotes","description":"Retrieve existing quotes.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"number__endWith","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","draft","pending_approval","changes_requested","approved","pending_signature","expired","signed","voided"]},{"type":"string","description":"all,draft"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","draft","pending_approval","changes_requested","approved","pending_signature","expired","signed","voided"]},{"type":"string","description":"all,draft"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"template_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"crm_opportunity_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type__endWith","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedQuote"}}}}}}},"/v1/quotes/{id}":{"get":{"operationId":"getQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Get quote","description":"Retrieve the details of an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/download":{"get":{"operationId":"downloadQuote","tags":["Quotes"],"summary":"Download quote","description":"Download an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}}}},"404":{"description":"Quote not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/quotes/{id}/approve":{"post":{"operationId":"approveQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Approve quote","description":"Approve an existing quote (acting as the account owner).","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/send":{"post":{"operationId":"sendQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Send quote","description":"Send an existing quote by email for signature.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendQuote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/sign":{"post":{"operationId":"signQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Sign quote","description":"Manually mark the quote as signed externally. Built-in Hyperline signature flow won't be used.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{id}/void":{"post":{"operationId":"voidQuote","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Void quote","description":"Void an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidQuote"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}}}}},"/v1/quotes/{quoteId}/files/{id}/download":{"get":{"operationId":"downloadQuoteFile","tags":["Quotes"],"summary":"Download quote file","description":"Download a file (attachment or manually signed file) attached to an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"quoteId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"format":"binary"}}}},"404":{"description":"Quote or file not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/refresh":{"post":{"operationId":"refreshSubscriptions","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Refresh subscriptions","description":"Triggers refresh of subscriptions usage data and related open invoices. This action is used when the automatic billing update upon ingestion option is disabled for the account.","responses":{"200":{"description":""}}}},"/v1/subscriptions/templates":{"get":{"operationId":"listSubscriptionTemplates","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"List subscription templates","description":"Retrieve existing subscription templates.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionTemplate"}}}}}}},"/v1/subscriptions/templates/{id}":{"get":{"operationId":"getSubscriptionTemplate","tags":["Subscriptions > Templates"],"security":[{"bearer":[]}],"summary":"Get subscription template","description":"Retrieve an existing subscription template with its configurations details.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionTemplate"}}}}}}},"/v1/subscriptions/{id}/update":{"post":{"operationId":"createSubscriptionUpdate","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription update","description":"Create an update to apply on an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdate"}}}},"responses":{"201":{"description":"Subscription update created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/update-many":{"post":{"operationId":"createSubscriptionUpdates","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription updates","description":"Create multiple updates to apply at once to an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdates"}}}},"responses":{"201":{"description":"Subscription updates created","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Cancel subscription","description":"Cancel an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscription"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/reinstate":{"post":{"operationId":"reinstateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Reinstate subscription","description":"Reinstate an existing subscription scheduled for cancellation.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/pause":{"post":{"operationId":"pauseSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Pause subscription","description":"Pause a subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reactivate_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription will be automatically reactivated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/activate":{"post":{"operationId":"activateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Activate subscription","description":"Manually start a subscription for the first time.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/reactivate":{"post":{"operationId":"reactivateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Reactivate subscription","description":"Reactivate a paused subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/renew":{"post":{"operationId":"renewSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Renew subscription","description":"\nThis action will move the subscription into the future up to a specific date (exclusive), as if the renewals had occurred. As a result, the corresponding future invoices will be generated.\n\nIf the subscription is currently pending, this action will activate it. A limit of 36 renewals applies.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenewSubscription"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v1/subscriptions/{id}/simulate-updates":{"post":{"operationId":"simulateSubscriptionUpdates","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Simulate subscription updates","description":"Simulate the effect of updates on a subscription without actually applying them.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionUpdates"}}}},"responses":{"200":{"description":"Simulation results","content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number"}},"required":["amount"]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions":{"post":{"operationId":"createSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Create subscription","description":"Create a new subscription from a plan or manually with products.","requestBody":{"description":"\nCreate subscription payload.\n\nAt least a `template_id`, a `template_configuration_id`, a set of `products`, or `phases` must be specified in addition to the required fields.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscription"}}}},"responses":{"201":{"description":"The newly created subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}},"get":{"operationId":"listSubscriptions","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"List subscriptions","description":"Retrieve existing subscriptions. By default, draft, voided, and cancelled subscriptions are not included.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["checkout","contract_start_date","quote","start_date","manually"]},{"type":"string","description":"checkout,contract_start_date"}]},"required":false,"name":"activation_strategy","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["checkout","contract_start_date","quote","start_date","manually"]},{"type":"string","description":"checkout,contract_start_date"}]},"required":false,"name":"activation_strategy__in","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","inactive","active","errored","cancelled","paused","pending","draft","voided","archived"]},{"type":"string","description":"all,inactive"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["all","inactive","active","errored","cancelled","paused","pending","draft","voided","archived"]},{"type":"string","description":"all,inactive"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"currency__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"plan_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"original_quote_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"customer_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"purchase_order__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"custom_properties","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoice_drafts","in":"query"},{"schema":{"type":"string"},"required":false,"name":"integration_entity_id","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"updated_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscription"}}}}}}},"/v2/subscriptions/transitions":{"get":{"operationId":"listSubscriptionTransitions","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"List subscription transitions","description":"Retrieve existing subscription transitions.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["scheduled","draft","completed","cancelled","failed","pending_quote_signature"]},{"type":"string","description":"scheduled,draft"}]},"required":false,"name":"status","in":"query"},{"schema":{"anyOf":[{"type":"string","enum":["scheduled","draft","completed","cancelled","failed","pending_quote_signature"]},{"type":"string","description":"scheduled,draft"}]},"required":false,"name":"status__in","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"source_subscription_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"base_subscription_id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"target_subscription_id__endWith","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transition_date__gte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__not","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__isNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__isNotNull","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__equals","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__lt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__lte","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__gt","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"transitioned_at__gte","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionTransition"}}}}}},"post":{"operationId":"createSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Create subscription transition","description":"Transition a subscription to another subscription, configured from a subscription, a plan or a template. If the application_schedule is `immediately`, the transition is applied right away.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"name":{"type":"string","description":"An optional name for the transition"},"calculation_method":{"type":"string","enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"application_schedule":{"type":"string","enum":["scheduled","immediately"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"transition_date":{"type":"string","format":"date-time","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"target_subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"default":"anniversary","description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]}}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"The configuration of the subscription to transition to"}},"required":["source_subscription_id","application_schedule","target_subscription"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","quote_signature","scheduled_after_quote_signature"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}}}}},"/v2/subscriptions/{id}":{"get":{"operationId":"getSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Get subscription","description":"Retrieve the details of an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"include_live_billing","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]},"description":"Phases of the subscription."},"quote":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the quote from which the subscription was created.","example":"quo_38YwqvItBH3d8a"},"status":{"type":"string","enum":["draft","pending_approval","changes_requested","approved","pending_signature","voided","signed"],"description":"Status of the quote from which the subscription was created.","example":"signed"}},"required":["id","status"]},"plan":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV"},"name":{"type":"string","description":"Name of the plan that the subscription is linked to.","example":"My example plan"}},"required":["id","name"]},"template":{"type":["object","null"],"properties":{"id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"name":{"type":"string","description":"Name of the template that the subscription is linked to.","example":"My example template"},"configurationId":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}},"required":["id","name","configurationId"]},"checkout_session":{"$ref":"#/components/schemas/CheckoutSession"},"payment_method_type":{"type":["string","null"],"enum":["card","apple_pay","google_pay","direct_debit","direct_debit_ach","direct_debit_bacs","stripe_link","transfer","transfer_automated","external"],"description":"Payment method type used to pay the subscription."},"payment_method":{"allOf":[{"$ref":"#/components/schemas/PaymentMethod"},{"description":"Payment method details used to pay the subscription."}]},"contract_terms":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["active","pending","finished"],"description":"\nContract status.\n\n- `active`: The contract is active.\n- `pending`: The contract is pending. It will be activated according to the activation strategy.\n- `finished`: The contract has ended.\n","example":"active"},"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"},"starts_at":{"type":["string","null"],"format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-31T23:00:00.000Z"},"ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T21:59:59.999Z"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","exclusiveMinimum":0}},"required":["period","count"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}},"current_period_started_at":{"type":["string","null"],"format":"date-time","description":"Start date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2025-06-30T22:00:00.000Z"},"current_period_ends_at":{"type":["string","null"],"format":"date-time","description":"End date of the current contract period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2026-06-30T21:59:59.999Z"}},"required":["status","activation_strategy","end_strategy","starts_at","ends_at","duration","renew_automatically","renew_for_duration","current_period_started_at","current_period_ends_at"],"description":"Contract terms linked to the subscription."}},"required":["phases","quote","plan","template","checkout_session","payment_method_type","payment_method","contract_terms"]},{"type":"object","properties":{"live_billing":{"$ref":"#/components/schemas/LiveBilling"}}}]}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateSubscription","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Update subscription","description":"Update configuration of a subscription including phases and products.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"\nUpdate subscription payload.\n\nThis endpoint supports comprehensive subscription updates including:\n- Basic subscription fields (name, purchase order, etc.)\n- Phase management: update current phase, create or delete pending phases\n- Product management within phases: update quantities, prices, or remove products\n- Coupon management within phases\n\nPending phases will be replaced by the ones provided in the array.\n\nNote: The payload structure matches the response from GET /v2/subscriptions/:id, allowing you to retrieve a subscription, modify it, and update it using the same structure.\n\nExample:\n- GET /v2/subscriptions/:id returns phases [A, B, C]\n- PUT /v2/subscriptions/:id with phases [A, C] will delete phase B\n- PUT /v2/subscriptions/:id with phases [A, B, C, D] will create phase D\n\nDate fields can only be updated before a subscription is active. Other fields can be updated at any time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscription"}}}},"responses":{"200":{"description":"The updated subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v2/subscriptions/{id}/phases":{"get":{"operationId":"listSubscriptionPhases","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"List subscription phases","description":"Retrieve the details of the phases for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionPhase"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/{id}/phases/{phaseId}":{"get":{"operationId":"getSubscriptionPhase","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"Get subscription phase","description":"Retrieve the details of a phase for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"phaseId","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Subscription phase ID.","example":"sup_1FoLfIQ5VOMbXf"},"type":{"type":"string","enum":["setup","trial","standard"],"description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["pending","active","finished"],"description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":["object","null"],"properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":["string","null"],"format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"starts_at":{"type":["string","null"],"format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"ends_at":{"type":["string","null"],"format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubscriptionProductFee"},{"$ref":"#/components/schemas/SubscriptionProductSeat"},{"$ref":"#/components/schemas/SubscriptionProductDynamic"},{"$ref":"#/components/schemas/SubscriptionProductCredit"},{"$ref":"#/components/schemas/SubscriptionProductBundle"}],"discriminator":{"propertyName":"type","mapping":{"flat_fee":"#/components/schemas/SubscriptionProductFee","seat":"#/components/schemas/SubscriptionProductSeat","dynamic":"#/components/schemas/SubscriptionProductDynamic","credit":"#/components/schemas/SubscriptionProductCredit","bundle":"#/components/schemas/SubscriptionProductBundle"}}},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["amount"]},"discount_amount":{"type":"number","description":"Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.","example":2000},"currency":{"type":["string","null"],"enum":["EUR","AED","AFN","XCD","ALL","AMD","AOA","ARS","USD","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","XOF","BMD","BND","BOB","BRL","BSD","BTN","NOK","BWP","BYR","BZD","CAD","CDF","XAF","CHF","NZD","CLP","CNY","COP","CRC","CUP","CVE","ANG","CZK","DJF","DKK","DOP","DZD","EGP","MAD","ERN","ETB","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MUR","MVR","MWK","MXN","MYR","MZN","NAD","XPF","NGN","NIO","NPR","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","UYU","UZS","VEF","VND","VUV","WST","YER","ZAR","ZMW","ZWL"],"description":"Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).","example":"EUR"}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_amount","currency"],"title":"Coupon amount"},{"type":"object","properties":{"description":{"type":["string","null"],"description":"Coupon description.","example":null},"expiration_date":{"type":["string","null"],"format":"date-time","description":"Date corresponding to the expiration of the coupon.","example":null},"redemption_limit":{"type":["number","null"],"description":"Maximum number of subscriptions to which a single coupon can be applied.","example":null},"product_ids":{"type":"array","items":{"type":"string"},"description":"List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.","example":["itm_DKL4Xcb5VSa8CQ","itm_1234567890abcdef"]},"created_at":{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"type":{"type":"string","enum":["percent"]},"discount_percent":{"type":"number","description":"Percentage to apply as a discount on the amount (excluding taxes) of a product.","example":15}},"required":["description","expiration_date","redemption_limit","product_ids","created_at","type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"id":{"type":["string","null"],"description":"Coupon ID.","example":"cou_DKL4Xcb5VSa8CQ"},"promotion_code_id":{"type":["string","null"],"description":"Promotion code ID if the coupon has been created from a promotion code.","example":null},"name":{"type":["string","null"],"description":"Coupon name.","example":"Partner discount"},"subscription_coupon_id":{"type":"string","description":"Coupon identifier in the context of the subscription.","example":"coos_d9pVekhjoGppuX"},"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n","example":"forever"},"duration_period":{"type":["string","null"],"enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":["number","null"],"description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied.","example":["itm_FJKlqUb8COXw55"]},"apply_at":{"type":["string","null"],"format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null},"expires_at":{"type":["string","null"],"format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":null}},"required":["id","promotion_code_id","name","subscription_coupon_id","repeat","duration_period","duration_count","product_ids","apply_at","expires_at"]}]},"description":"Coupons comprising the subscription phase."},"created_at":{"type":"string","format":"date-time","description":"Subscription phase creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"},"updated_at":{"type":"string","format":"date-time","description":"Subscription phase last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-10-12T07:00:01.860Z"}},"required":["id","type","status","order","activation_strategy","end_strategy","duration","billing_date_setting","initial_billing_at","starts_at","ends_at","billing_cycle_alignment","do_not_invoice_phase","transition_calculation_method","transition_invoicing_schedule","products","coupons","created_at","updated_at"]}}}},"404":{"description":"Subscription or phase not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/{id}/refresh-seat-products":{"post":{"operationId":"refreshSubscriptionSeatProducts","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Refresh seat products","description":"Triggers 'count' updates on connected seat products within the subscription. This action will use the dataloader query to retrieve and update the number of units for each seat product.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Subscription update ID.","example":"supd_MkTDgpM6ej6f8l"},"application_schedule":{"type":"string","enum":["immediately","next_period","custom","scheduled"],"description":"\nIndicates when the subscription should be updated.\n\n- `immediately`: The subscription will be updated immediately.\n- `next_period`: The subscription will be updated at the end of the current billing period.\n- `custom`: The subscription will be updated at a custom date.\n"},"apply_at":{"type":"string","format":"date","description":"Date when the subscription should be updated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-11-30T18:24:34.496Z"},"payment_schedule":{"type":"string","enum":["immediately","next_invoice","custom"],"description":"\nIndicates when the subscription should be billed.\n\n- `immediately`: The subscription will be billed immediately.\n- `next_invoice`: The subscription will be billed at the next invoice.\n- `custom`: The subscription will be billed at a custom date.\n"},"calculation_method":{"type":"string","enum":["pro_rata","pay_in_full","do_not_charge"],"description":"\nIndicates how the products price should be calculated.\n\n- `pro_rata`: The price will be calculated proportionally to the time elapsed since the last billing period.\n- `pay_in_full`: The price will be calculated for the entire billing period.\n- `do_not_charge`: The price will not be calculated.\n"},"adjustment_amount":{"type":["number","null"],"description":"Amount to adjust the subscription price."},"subscription_id":{"type":"string","description":"Subscription ID.","example":"sub_7aWtG7Gb_fwGno"},"product_id":{"type":"string","description":"Product ID.","example":"itm_G6nU9iSC7eoDsk"},"previous_count":{"type":"number","description":"Previous count.","example":2},"new_count":{"type":"number","description":"New count.","example":7},"next_refresh_date":{"anyOf":[{"type":"string","format":"date"},{"type":"string"},{"type":"null"}],"description":"The next refresh date. Exists if your seat item is configured to be refreshed periodically.","example":null}},"required":["id","application_schedule","apply_at","payment_schedule","calculation_method","adjustment_amount","subscription_id","product_id","previous_count","new_count"]}}}}}}}},"/v2/subscriptions/{id}/next-phase":{"post":{"operationId":"transitionSubscription","tags":["Subscriptions > Phases"],"security":[{"bearer":[]}],"summary":"Transition subscription to next phase","description":"Update a subscription and transition it to the next available phase.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transition_date":{"type":"string","format":"date-time","description":"Date of application of the transition. Use it if different than immediately to calculate pro-rata and display past or future dates on invoices. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDetails"}}}}}}},"/v2/subscriptions/transitions/preview":{"post":{"operationId":"previewSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Preview subscription transition","description":"Return the invoices that will be emitted at transition and at next renewal.","x-hidden":true,"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"transition_id":{"type":"string","description":"The ID of an existing subscription transition to preview. Use this instead of providing a full payload to preview a transition that has already been scheduled."}},"required":["transition_id"],"title":"From existing transition"},{"type":"object","properties":{"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"name":{"type":"string","description":"An optional name for the transition"},"calculation_method":{"type":"string","enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."},"billing_cycle_transition_method":{"type":"string","enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"application_schedule":{"type":"string","enum":["scheduled","immediately"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"transition_date":{"type":"string","format":"date-time","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"target_subscription":{"allOf":[{"type":"object","properties":{"name":{"type":"string","description":"Subscription custom name."},"purchase_order":{"type":"string","description":"Reference to the purchase order."},"invoicing_entity_id":{"type":"string","description":"ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.","example":"ive_jerrb484RHn"},"crm_opportunity_id":{"type":"string","description":"ID of the related opportunity/deal in the connected CRM."},"commitment_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number","minimum":1}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"renew_for":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"number"}},"required":["period","count"],"description":"Deprecated field, please use `contract_terms`.","example":{"period":"years","count":1},"deprecated":true},"minimum_invoice_fee":{"type":["number","null"],"description":"Minimum fee applied to each invoice outside of one time payments.","example":250},"contract_terms":{"allOf":[{"type":"object","properties":{"starts_at":{"type":"string","format":"date-time","description":"Start date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"End date of the contract. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the contract initially spans. Only applies to `duration` end strategy.","example":{"count":6,"period":"months"}},"renew_automatically":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"\nIndicates if the contract should be renewed automatically.\n\n- `true`: The contract will be renewed automatically.\n- `false`: The contract will not be renewed automatically.\n","example":true},"renew_for_duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"\nInterval over which the contract will be renewed. Only applies if `renew_automatically` is true.\n","example":{"count":1,"period":"years"}}}},{"type":"object","properties":{"activation_strategy":{"type":"string","enum":["start_date","immediately","manual","quote_signature","checkout"],"description":"\nActivation strategy of the contract.\n\n- `immediately`: The contract will be activated immediately.\n- `manual`: The contract will be activated when a user manually activates it.\n- `start_date`: The contract will be activated on a specified date.\n- `quote_signature`: The contract will be activated when the subscription quote is signed.\n- `checkout`: The contract will be activated when the subscription checkout is completed.\n","example":"start_date"},"end_strategy":{"type":"string","enum":["end_date","duration","manual"],"description":"\nEnd strategy of contract.\n\n- `manual`: The contract ends when a user manually stops it.\n- `end_date`: The contract ends on a specified date.\n- `duration`: The contract ends after a specific relative duration, unless `renew_automatically` is true.\n","example":"duration"}},"required":["activation_strategy","end_strategy"]}],"description":"Contract terms linked to the subscription."},"starts_at":{"type":"string","format":"date-time","description":"Applies only if the activation strategy is `start_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"contract_start":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2024-01-15T00:00:00Z","deprecated":true},"contract_end":{"type":"string","format":"date-time","description":"Deprecated field, please use `contract_terms`.","example":"2025-01-15T00:00:00Z","deprecated":true},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription will start being billed. If not specified, it will correspond to the `starts_at` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"display_shipping_details":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Indicates if the shipping details should be displayed on the subscription's invoices."},"cancel_at":{"type":"string","format":"date-time","description":"Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"cancellation_strategy":{"type":"string","enum":["refund_prorata","refund_custom","charge_prorata","charge_custom","end_of_period","do_nothing"],"description":"\nStrategy used to cancel the subscription. If not specified `do_nothing` is used.\n\n- `charge_prorata`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.\n- `charge_custom`: Will charge the customer a custom amount.\n- `refund_prorata`: Will refund to the customer the overpaid subscription amount using prorated calculations on the cancellation date.\n- `refund_custom`: Will refund to the customer a custom amount.\n- `end_of_period`: Will cancel the subscription at the end date of the current billing period.\n- `do_nothing`: Will only cease the subscription without any additional actions.\n"},"cancellation_amount":{"type":"number","description":"Custom amount used when cancelling the subscription. Only applies to the `charge_custom` or the `refund_custom` cancellation strategy."},"properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"null"}]}},{"type":"null"}]},"description":"Key/value pairs to store any metadata useful in your context."},"custom_properties":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","format":"date-time","description":"UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"description":"A list of key value with the slug of the custom property as the key and the custom property value as value."},"tax_only":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Only tax will be charged on this subscription."},"generate_draft_invoices":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent"},"generate_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Generate non-legal documents instead of invoices."},"document_name":{"type":["string","null"],"description":"If `generate_document` is turned on, allows you to give a name to your document."},"add_tax_to_document":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"If `generate_document` is turned on, will add taxes to document."},"do_not_charge_subscription":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"description":"Subscription will be invoiced but not charged (invoices/documents will be settled directly)."},"invoice_custom_note":{"type":["string","null"],"description":"Default custom note added to invoices generated by the subscription."},"invoice_schedule":{"type":["string","null"],"enum":["period_start","period_end"],"description":"\nDefines when invoices are generated relative to the billing period.\n\n- `period_start`: Invoices are generated at the start of the billing period.\n- `period_end`: Invoices are generated at the end of the billing period.\n"}}},{"type":"object","properties":{"plan_id":{"type":"string","description":"ID of the plan that the subscription is linked to.","example":"plan_zHmjoDee4ZRmQV","deprecated":true},"template_id":{"type":"string","description":"ID of the template that the subscription is linked to.","example":"subt_7gdusOkqr5L0B8"},"template_configuration_id":{"type":"string","description":"ID of the template configuration that the subscription is linked to.","example":"subtc_7mHWOlPStUogvp"}}},{"anyOf":[{"type":"object","properties":{"phases":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the subscription phase.","example":"Name of the subscription phase."},"type":{"type":"string","enum":["setup","trial","standard"],"default":"standard","description":"\nType of subscription phase.\n\n- `setup`: The phase represents a non-recurring service setup period, often used before the actual recurring subscription begins.\n- `trial`: The phase represents a non-recurring trial period, often used to allow users to opt out or experience a free test.\n- `standard`: The phase represents a standard recurring billing.\n","example":"standard"},"status":{"type":"string","enum":["finished","pending"],"default":"pending","description":"\nStatus of subscription phase.\n\n- `pending`: The phase is waiting to start (not started yet).\n- `active`: The phase is currently in progress.\n- `finished`: The phase has ended and is complete.\n","example":"pending"},"order":{"type":"number","description":"Order in which the phase is executed within all subscription phases.","example":0},"activation_strategy":{"type":"string","enum":["immediately","manual","start_date","quote_signature","checkout","contract_start_date","previous_phase_end"],"description":"\nActivation strategy of subscription phase.\n\n- `immediately`: The phase starts as soon as the subscription is activated.\n- `manual`: The phase starts when a user manually activates it.\n- `start_date`: The phase starts on a specified date.\n- `quote_signature`: The phase starts when the subscription quote is signed.\n- `checkout`: The phase starts when the subscription checkout is completed.\n- `contract_start_date`: The phase starts on the start date of the related subscription contract.\n- `previous_phase_end`: The phase starts when the previous phase ends.\n","example":"manual"},"end_strategy":{"type":"string","enum":["manual","end_date","duration","contract_end_date"],"description":"\nEnd strategy of subscription phase.\n\n- `manual`: The phase ends when a user manually stops it.\n- `end_date`: The phase ends on a specified date.\n- `duration`: The phase ends after a specific relative duration.\n- `contract_end_date`: The phase ends on the end date of the related subscription contract.\n","example":"duration"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"description":"Interval over which the subscription phase spans. Only applies to `duration` end strategy.","example":{"count":1,"period":"years"}},"billing_date_setting":{"type":"string","enum":["phase_start","specific_date"],"description":"\nRepresents when the first billing date occurs.\n\n- `phase_start`: Aligns with the start of the phase.\n- `specific_date`: Occurs on a specified date.\n","example":"phase_start"},"initial_billing_at":{"type":"string","format":"date-time","description":"Date when the subscription phase will start being billed. Only applies to `specific_date` billing date setting. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"starts_at":{"type":"string","format":"date-time","description":"Actual start date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Actual end date of the phase. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"billing_cycle_alignment":{"type":"string","enum":["calendar_period","anniversary"],"default":"anniversary","description":"\nAlignment of product billing cycles.\n\n- `calendar_period`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.\n- `anniversary`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.\n","example":"anniversary"},"do_not_invoice_phase":{"type":"boolean","default":false,"description":"Indicates if the phase should be invoiced. If set to true, the phase will not generate any invoices.","example":false},"transition_calculation_method":{"type":"string","enum":["prorata","pay_in_full","none"],"default":"prorata","description":"\nCalculation method used when transitioning from one phase to the next one.\n\n- `prorata`: The prorated amount between the two phases relative to the end date (the transition date) must be paid.\n- `pay_in_full`: The full amount for the phase billing period must be paid.\n- `none`: No amount will need to be paid, phase will simply transition from one to the next.\n","example":"prorata"},"transition_invoicing_schedule":{"type":"string","enum":["immediately"],"default":"immediately","description":"\nRepresents when the transition amount will be invoiced.\n\n- `immediately`: An invoice will be generated immediately with the corresponding amount.\n","example":"immediately"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products comprising the subscription phase."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]},"description":"Coupons comprising the subscription phase."}},"required":["activation_strategy","end_strategy","billing_date_setting","products"]}}},"required":["phases"],"title":"With phases"},{"allOf":[{"type":"object","properties":{"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Product ID.","example":"itm_FJKlqUb8COXw55"},"name":{"type":"string","description":"Product name. This will appear on the final invoices.","example":"Product name"},"description":{"type":"string","description":"Product description. This will appear on the final invoices.","example":"A description of the product."},"description_display_interval_dates":{"type":"boolean","default":false,"description":"Indicates if the dates of the interval should be automatically added in the product description on the invoices."},"payment_interval":{"anyOf":[{"type":"object","properties":{"period":{"type":"string","enum":["once"]}},"required":["period"],"title":"Once","example":{"period":"once"}},{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1,"default":1}},"required":["period"],"title":"Period","example":{"period":"months","count":1}}],"description":"Interval on which the product is billed. This interval can be different between products and can differ from the subscription commitment interval."},"payment_schedule":{"type":"string","enum":["start","end"],"description":"Indicates if the product should be billed at the start or the end of the payment interval.","example":"start"},"price":{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"description":"Similar to `prices`, allow to apply a single fee price more easily.","example":{"type":"fee","amount":200}},"prices":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["fee"]},"amount":{"type":"number","description":"Monetary amount. Expressed in currency's smallest unit."}},"required":["type","amount"],"title":"Fee price"},{"type":"object","properties":{"type":{"type":"string","enum":["volume"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Volume price"},{"type":"object","properties":{"type":{"type":"string","enum":["packaged"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"on_bucket_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage reaches an incomplete bucket (the bucket size corresponds to the `unitCount`).\n\n  - `pro_rata`: The amount is computed using the pro rata of the bucket's consumption.\n  - `pay_in_full`: The amount corresponds to the full payment of the bucket.\n  - `do_not_charge`: The bucket is not charged and ignored.\n    "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","from","to"],"title":"Packaged price"},{"type":"object","properties":{"type":{"type":"string","enum":["bulk"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."},"to":{"type":["number","null"],"description":"To limit."},"on_tier_incomplete":{"type":["string","null"],"enum":["pro_rata","pay_in_full","do_not_charge"],"default":"pro_rata","description":"\nLogic used to compute the amount when usage on the tier is incomplete.\n\n- `pro_rata`: The amount is computed using the pro rata of the tier's consumption.\n- `pay_in_full`: The amount corresponds to the full payment of the tier.\n- `do_not_charge`: The tier is not charged and ignored.\n  "},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","amount","unit_count","to"],"title":"Bulk price"},{"type":"object","properties":{"type":{"type":"string","enum":["bps"]},"from":{"type":"number","description":"From limit."},"to":{"type":["number","null"],"description":"To limit."},"percentage":{"type":"number","description":"Percentage applied on each unit to compute the usage."},"per_unit_cap":{"type":["number","null"],"description":"Maximum amount for one unit. Expressed in currency's smallest unit."},"per_unit_floor":{"type":["number","null"],"description":"Minimum amount for one unit. Expressed in currency's smallest unit."},"per_unit_fee":{"type":["number","null"],"description":"Fee amount applied per unit. Expressed in currency's smallest unit."},"metering_filter":{"allOf":[{"$ref":"#/components/schemas/MeteringFilter"},{"type":"object","description":"Metering filter that scopes which billable events are eligible for this price tier. Only present when the price is filtered."}]}},"required":["type","from","to","percentage","per_unit_cap","per_unit_floor","per_unit_fee"],"title":"BPS price"},{"type":"object","properties":{"type":{"type":"string","enum":["bundle"]},"amount":{"type":"number","description":"Monetary amount of the price for the number of units defined by `unit_count`. Expressed in currency's smallest unit."},"unit_count":{"type":"number","description":"Number of units considered for the amount."}},"required":["type","amount","unit_count"],"title":"Bundle price","description":"For seat products only, if you are looking for credits, use a fee price"}]},"description":"Prices of the product. If not specified, the matching prices (depending on the currency, interval, etc) of the product defined in the products catalog/plan are used.","example":[{"type":"volume","from":0,"to":20,"amount":200,"unit_count":1,"on_tier_incomplete":null},{"type":"volume","from":20,"to":null,"amount":150,"unit_count":1,"on_tier_incomplete":null}]},"count":{"type":"number","minimum":1,"description":"Number of product units. Only applies to products of type `flat_fee`, `seat` or `credit`.","example":2},"unit_name":{"type":"string","description":"Product name. This will appear on the final invoices. Only applies to products of type `seat` or `usage`.","example":"user"},"min_committed_count":{"type":"number","minimum":1,"description":"Minimum of units committed. If usage is less than this number, then this value will be used. Only applies to products of type `usage`."},"min_amount":{"type":["number","null"],"description":"Minimum amount billed. If the final computed amount from the usage for this product is less than this amount, then this value will be used. Only applies to products of type `usage`."},"max_amount":{"type":["number","null"],"description":"Maximum amount billed. If the final computed amount from the usage for this product is greater than this amount, then this value will be used. Only applies to products of type `usage`."},"charging_method":{"type":["string","null"],"enum":["prorata","pay_in_full","do_not_charge"],"description":"Charging method for seat count updates within the current billing period. Only applies to connected seat products.\n\n- `prorata`: Price calculated proportionally to time elapsed in the billing period.\n- `pay_in_full`: Price calculated for the entire billing period.\n- `do_not_charge`: No charge for the update."},"seat_invoicing_schedule":{"type":["string","null"],"enum":["immediately","next_invoice","custom"],"description":"\nPolicy defining when seat count changes are invoiced. Only applies to connected seat products.\n\n- `immediately`: Seat changes are invoiced immediately.\n- `next_invoice`: Seat changes are invoiced at the next invoice.\n- `custom`: Seat changes are invoiced on a custom schedule.\n"},"metering_interval_type":{"type":"string","enum":["subscription_commitment","payment_interval","full_database","custom"],"description":"\nIndicates on which type of interval the usage should be aggregated.\n\n- `subscription_commitment`: For the usage contained within the subscription commitment period.\n- `payment_interval`: For the usage contained within the payment interval of the product.\n- `full_database`: For all the usage we ingested for this product, no matter the period.\n- `custom`: For the usage contained within a custom interval that starts with the phase and renews independently of the billing interval. Requires `metering_interval` to be set.\n   Only applies to products of type `usage`."},"metering_interval":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"]},"count":{"type":"integer","minimum":1}},"required":["period","count"],"description":"Custom interval for usage aggregation. Required when `metering_interval_type` is `custom`. The interval starts at the phase start and renews on its own cycle (e.g. `{ period: 'months', count: 3 }` for quarterly metering with monthly billing). Only applies to products of type `usage`."},"bill_usage_difference":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Only bill the usage difference comparing to the previous period (i.e. actual amount minus last invoice amount). Doesn't apply to `payment_interval` metering interval type. Only applies to products of type `usage`."},"credits_expiration_in_days":{"type":["number","null"],"description":"Validity in days for credits that will be topped-up automatically. Once the period has passed, they'll expire."},"expire_credits_at_end_of_period":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["true","false"]}],"default":false,"description":"Automatically set the expiration date to the end of the next period for each topup. Takes priority on `creditsExpirationInDays`"}},"required":["id"]},"description":"Products that make up the subscription."},"coupons":{"type":"array","items":{"allOf":[{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Coupon ID."}},"required":["id"],"title":"Existing coupon"},{"type":"object","properties":{"type":{"type":"string","enum":["amount"]},"name":{"type":"string","description":"Coupon name."},"discount_amount":{"type":"number","exclusiveMinimum":0,"description":"Coupon discount amount. Expressed in currency's smallest unit."}},"required":["type","discount_amount"],"title":"Coupon amount"},{"type":"object","properties":{"type":{"type":"string","enum":["percent"]},"name":{"type":"string","description":"Coupon name."},"discount_percent":{"type":"number","exclusiveMinimum":0,"maximum":100,"description":"Coupon discount percentage."}},"required":["type","discount_percent"],"title":"Coupon percent"}]},{"type":"object","properties":{"repeat":{"type":"string","enum":["once","forever","custom","duration"],"description":"\nCoupon frequency.\n\n- `once`: Will apply the coupon only to the first one invoice.\n- `forever`: Will apply the coupon to all invoices.\n- `custom`: Will apply to coupon until a specified expiration date.\n- `duration`: Will apply the coupon for a specific duration (e.g., 3 months).\n"},"duration_period":{"type":"string","enum":["days","weeks","months","years"],"description":"Period of time for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"duration_count":{"type":"number","description":"Number of periods for which the coupon will be applied. Only applies to the `duration` coupon frequency."},"expires_at":{"type":"string","format":"date-time","description":"Coupon expiration date. Only applies to the `custom` coupon frequency. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"apply_at":{"type":"string","format":"date-time","description":"Coupon first application date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Product IDs to which the coupon will be applied."}},"required":["repeat"]}]}}}},{"type":"object","properties":{"trial":{"type":"object","properties":{"end_strategy":{"type":"string","enum":["manual","end_date","duration"],"description":"Defines how the free trial will end."},"starts_at":{"type":"string","format":"date-time","description":"Free trial start date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"ends_at":{"type":"string","format":"date-time","description":"Free trial end date. Only applies if the end strategy is `end_date`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-12-20T16:04:11Z"},"duration":{"type":"object","properties":{"period":{"type":"string","enum":["days","weeks","months","years"],"description":"Free trial duration period. Only applies if the end strategy is `duration`."},"count":{"type":"number","minimum":1,"description":"Free trial duration count. Only applies if the end strategy is `duration`."}},"required":["period","count"]}},"required":["end_strategy"],"description":"Create a free trial phase based on the plan configuration. Only applies if a `plan_id` is provided."}}}],"title":"Without phases"}]}],"description":"The configuration of the subscription to transition to"}},"required":["source_subscription_id","application_schedule","target_subscription"],"title":"From new payload"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"transition_invoice":{"$ref":"#/components/schemas/SimulateInvoiceDetails"},"next_invoice_after_transition":{"allOf":[{"$ref":"#/components/schemas/SimulateInvoiceDetails"},{"description":"The invoice that would be emitted at the next renewal after the transition. Null if no renewal invoice would be emitted."}]}},"required":["transition_invoice","next_invoice_after_transition"]}}}}}}},"/v2/subscriptions/transitions/{id}":{"get":{"operationId":"getSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Get subscription transition","description":"Retrieve the details of an existing subscription transition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","quote_signature","scheduled_after_quote_signature"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}},"404":{"description":"Subscription transition not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v2/subscriptions/transitions/{id}/cancel":{"post":{"operationId":"cancelSubscriptionTransition","tags":["Subscriptions > Transitions"],"security":[{"bearer":[]}],"summary":"Cancel subscription transition","description":"Cancel a scheduled subscription transition.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the subscription transition"},"customer_id":{"type":"string","description":"The ID of the customer associated with the transition"},"base_subscription_id":{"type":"string","description":"The ID of the original subscription from which this transition is derived. It references the last active version of the subscription."},"source_subscription_id":{"type":"string","description":"The ID of the subscription to transition from"},"target_subscription_id":{"type":["string","null"],"description":"The ID of the subscription to transition to"},"status":{"type":"string","enum":["scheduled","completed","failed","draft","cancelled","pending_quote_signature"],"description":"The current status of the subscription transition. Possible values are 'scheduled', 'completed', 'failed', and 'draft'."},"transitioned_at":{"type":["string","null"],"format":"date","description":"The date and time when the transition was completed. Null if the transition is not yet completed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"name":{"type":["string","null"],"description":"An optional name for the transition"},"transition_date":{"type":["string","null"],"format":"date","description":"The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format."},"application_schedule":{"type":"string","enum":["immediately","scheduled","next_renewal","quote_signature","scheduled_after_quote_signature"],"description":"Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately."},"billing_cycle_transition_method":{"type":["string","null"],"enum":["keep_current_billing_cycle","align_to_new_billing_cycle"],"description":"The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date."},"calculation_method":{"type":["string","null"],"enum":["do_not_charge","pro_rata"],"description":"The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period."}},"required":["id","customer_id","base_subscription_id","source_subscription_id","target_subscription_id","status","transitioned_at","name","transition_date","application_schedule","billing_cycle_transition_method","calculation_method"]}}}},"404":{"description":"Subscription transition not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/taxes/rates":{"get":{"operationId":"listTaxRates","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"List tax rates","description":"Retrieve existing custom tax rates.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"id__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"description__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"invoicing_entity_id__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTaxRate"}}}}}}},"/v1/taxes/rates/{id}":{"get":{"operationId":"getTaxRate","tags":["Taxes"],"security":[{"bearer":[]}],"summary":"Get tax rate","description":"Retrieve the details of an existing custom tax rate.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxRate"}}}},"404":{"description":"Tax rate not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/apps":{"get":{"operationId":"listApps","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"List apps","description":"Retrieve existing third-party apps.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}}},"post":{"operationId":"createApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Create app","description":"Create a new third-party app.","requestBody":{"description":"Create app payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApp"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/App"},{"type":"object","properties":{"client_secret":{"type":"string","description":"OAuth client secret"}},"required":["client_secret"]}]}}}}}}},"/v1/apps/{id}":{"put":{"operationId":"updateApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Update app","description":"Update an existing third-party app.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update app payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApp"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}}}},"delete":{"operationId":"deleteApp","tags":["Third-party apps"],"security":[{"bearer":[]}],"summary":"Delete app","description":"Delete an existing third-party app.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"App deleted"}}}},"/v1/users/roles":{"get":{"operationId":"listUserRoles","tags":["Users > Roles"],"security":[{"bearer":[]}],"summary":"List user roles","description":"Retrieve existing user roles.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserRole"}}}}}}},"/v1/users/roles/{id}":{"get":{"operationId":"getUserRole","tags":["Users > Roles"],"security":[{"bearer":[]}],"summary":"Get user role","description":"Retrieve the details of an existing user role.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRole"}}}},"404":{"description":"User role not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/users":{"get":{"operationId":"listUsers","tags":["Users"],"security":[{"bearer":[]}],"summary":"List users","description":"Retrieve existing users.","parameters":[{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"first_name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"last_name__endWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__not","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__isNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__isNotNull","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__equals","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__contains","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__startsWith","in":"query"},{"schema":{"type":"string"},"required":false,"name":"email__endWith","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUser"}}}}}}},"/v1/users/{id}":{"get":{"operationId":"getUser","tags":["Users"],"security":[{"bearer":[]}],"summary":"Get user","description":"Retrieve the details of an existing user.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/subscriptions/{id}/valuation":{"get":{"operationId":"getSubscriptionValuation","tags":["Subscriptions"],"security":[{"bearer":[]}],"summary":"Get subscription valuation","description":"Compute valuation metrics for an existing subscription.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionValuation"}}}}}}},"/v1/quotes/{id}/valuation":{"get":{"operationId":"getQuoteValuation","tags":["Quotes"],"security":[{"bearer":[]}],"summary":"Get quote valuation","description":"Compute valuation metrics for an existing quote.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionValuation"}}}}}}},"/v1/customers/{id}/valuation":{"get":{"operationId":"getCustomerValuation","tags":["Customers"],"security":[{"bearer":[]}],"summary":"Get customer valuation","description":"Compute aggregated valuation metrics across all active subscriptions for a customer.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["year","quarter","month"],"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","example":"year"},"required":false,"description":"Period granularity for the breakdown. When provided, contract value and recurring contract value include a `by_period` array.","name":"granularity","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerValuation"}}}}}}},"/v1/wallets/settings":{"get":{"operationId":"getWalletSettings","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Get wallet settings","description":"Retrieve the global settings of the wallets.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSettings"}}}}}},"patch":{"operationId":"updateWalletSettings","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Update wallet settings","description":"Update the global settings of the wallets.","requestBody":{"description":"Update wallet settings payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWalletSettings"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletSettings"}}}}}}},"/v2/wallets":{"get":{"operationId":"listWallets","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"List wallets","description":"Retrieve existing wallets.","parameters":[{"schema":{"type":"string"},"required":false,"name":"customer_id","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWallet"}}}}}}},"/v1/wallets":{"post":{"operationId":"createWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Create wallet","description":"Create a new wallet.","requestBody":{"description":"Create wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWallet"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}}}}},"/v1/wallets/{id}":{"get":{"operationId":"getWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Get wallet","description":"Retrieve the details of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}},"put":{"operationId":"updateWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Update wallet","description":"Update the details of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Update wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWallet"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/wallets/{id}/load":{"post":{"operationId":"loadWallet","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Load wallet","description":"Load credits on an existing wallet. The related customer must have an active payment method.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"description":"Load wallet payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadWallet"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Wallet"}}}},"404":{"description":"Wallet not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/wallets/{id}/transactions":{"get":{"operationId":"listWalletTransactions","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"List wallet transactions","description":"Retrieve all transactions of an existing wallet.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["number","null"],"minimum":0,"maximum":100,"default":50},"required":false,"name":"take","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"default":0},"required":false,"name":"skip","in":"query"}],"responses":{"200":{"description":"Paginated list of wallet transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWalletTransaction"}}}}}}},"/v1/wallets/{id}/transactions/{transactionId}/revert":{"post":{"operationId":"revertWalletLoad","tags":["Wallets"],"security":[{"bearer":[]}],"summary":"Revert wallet load","description":"Revert a credit wallet transaction. Voids the related credit note/document and creates a debit transaction.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"transactionId","in":"path"}],"responses":{"200":{"description":"The debit transaction created by the revert","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransaction"}}}},"404":{"description":"Wallet or transaction not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}},"/v1/webhooks/endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"List webhook endpoints","description":"Retrieve all webhook endpoints.","parameters":[{"schema":{"type":"number","minimum":1,"maximum":250},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"iterator","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWebhookEndpoint"}}}}}},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Create webhook endpoint","description":"Create a new webhook endpoint.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"secret":{"type":"string","pattern":"^[a-zA-Z0-9+/=]{32,100}$","description":"Webhook endpoint verification secret (base64 encoded random bytes). If not defined, a secret is automatically generated and only accessible in the UI."},"rate_limit":{"type":"number","description":"Webhook rate limit (per second)."},"event_types":{"type":"array","items":{"type":"string","enum":["event.price_calculated","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","credit_note.ready","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]}},"required":["url"]}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}},"/v1/webhooks/endpoints/{id}":{"get":{"operationId":"getWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Get webhook endpoint","description":"Retrieve an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}},"put":{"operationId":"updateWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Update webhook endpoint","description":"Update an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"Webhook endpoint description.","example":"Production webhook endpoint"},"url":{"type":"string","format":"uri","description":"Webhook endpoint URL.","example":"https://example.com/webhook"},"rate_limit":{"type":"number","description":"Webhook rate limit (per second)."},"event_types":{"type":"array","items":{"type":"string","enum":["event.price_calculated","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","credit_note.ready","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed"]},"description":"Webhook event types filter. If not defined, all event messages will be sent.","example":["customer.created","customer.updated"]}},"required":["url"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"Delete webhook endpoint","description":"Delete an existing webhook endpoint.","parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":""}}}},"/v1/webhooks/messages":{"get":{"operationId":"listWebhookMessages","tags":["Webhooks"],"security":[{"bearer":[]}],"summary":"List webhook messages","description":"\nRetrieve all webhook messages sent.\n\nPlease note that, by default, this endpoint is limited to retrieving 90 days' worth of data relative to now. Messages that date back more than 90 days are still accessible, but their payloads are expunged.\nIf an iterator is provided, the endpoint retrieves data spanning 90 days before/after the time indicated by the iterator ID. If you require data beyond those time ranges, you will need to explicitly set the before or after parameter as appropriate.\n","parameters":[{"schema":{"type":["string","null"],"format":"date","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"},"required":false,"description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"before","in":"query"},{"schema":{"type":["string","null"],"format":"date","description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","example":"2024-01-20T16:04:11Z"},"required":false,"description":"Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","name":"after","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"Event types to consider.","enum":["event.price_calculated","customer.created","customer.updated","customer.archived","customer.recovered","customer.deleted","subscription.created","subscription.trial_ended","subscription.activated","subscription.reactivated","subscription.contract_started","subscription.contract_renewed","subscription.paused","subscription.phase_activated","subscription.updated","subscription.cancellation_scheduled","subscription.cancelled","subscription.voided","subscription.errored","subscription.charged","subscription.commitment_renewed","subscription.reinstated","subscription.analytics_updated","invoice.created","invoice.grace_period.started","invoice.late","invoice.ready","invoice.reminder_sent","invoice.settled","invoice.errored","invoice.chargeback","invoice.voided","invoice.uncollectible","invoice.deleted","invoice.batch.creation_succeeded","invoice.batch.creation_failed","credit_note.ready","credit_note.settled","credit_note.voided","checkout.created","checkout.completed","payment_method.created","payment_method.activated","payment_method.errored","payment_method.deleted","payment_method.expiring_soon","payment_method.expired","wallet.credited","wallet.debited","wallet.low_projected_balance","daily_analytics.ready","dataloader.failed","credit.low_balance","credit.balance_refreshed","credit.created","credit.updated","credit.balance_at_zero","credit.topup_transaction_created","credit.usage_transaction_created","credit.expiration_transaction_created","quote.created","quote.updated","quote.approval_requested","quote.approved","quote.sent","quote.viewed","quote.signed","quote.voided","bank_account.created","bank_account.deleted","bank_account.errored","custom_property.created","custom_property.updated","custom_property.deleted","custom_property.value_created","custom_property.value_updated","aggregator.updated","aggregator.threshold_crossed","product.created","product.updated","product.archived","product.recovered","product.deleted","plan.created","plan.updated","plan.deleted","coupon.created","coupon.updated","coupon.deleted","pricebook.created","pricebook.updated","pricebook.deleted","subscription_transition.completed","approval_workflow.created","approval_workflow.updated","approval_workflow.deleted","approval_request.created","approval_request.step_requested","approval_request.step_approved","approval_request.step_rejected","approval_request.approved","approval_request.rejected","approval_request.cancelled","agent.run.completed"],"example":["customer.created"]},"required":false,"description":"Event types to consider.","name":"event_types","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":250},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"iterator","in":"query"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWebhookMessage"}}}}}}}},"webhooks":{}}